Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fe-vmm-tbl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nice
dev-epics-modules
fe-vmm-tbl
Commits
ffe38695
Commit
ffe38695
authored
11 months ago
by
Douglas Araujo
Browse files
Options
Downloads
Patches
Plain Diff
Add configFEN method
parent
8de52010
No related branches found
No related tags found
1 merge request
!1
ICSHWI-14275: Create VMM FEN Epics module
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vmmTblApp/src/vmm_config.cpp
+40
-0
40 additions, 0 deletions
vmmTblApp/src/vmm_config.cpp
vmmTblApp/src/vmm_config.h
+5
-0
5 additions, 0 deletions
vmmTblApp/src/vmm_config.h
with
45 additions
and
0 deletions
vmmTblApp/src/vmm_config.cpp
+
40
−
0
View file @
ffe38695
...
...
@@ -17,6 +17,46 @@ FENConfigModule::FENConfigModule(FrontEndBase& frontend) : pFEN(&frontend) {
FENConfigModule
::~
FENConfigModule
()
{
}
void
FENConfigModule
::
configFEN
()
{
pFEN
->
user_reg_write
(
"app_debug_data_format"
,
0
);
pFEN
->
user_reg_write
(
"app_latency_reset"
,
27
);
pFEN
->
user_reg_write
(
"app_latency_data_max"
,
1024
);
pFEN
->
user_reg_write
(
"app_latency_data_jitter"
,
0
);
pFEN
->
user_reg_write
(
"app_tp_offset_first"
,
100
);
pFEN
->
user_reg_write
(
"app_tp_offset"
,
1000
);
pFEN
->
user_reg_write
(
"app_tp_latency"
,
46
);
pFEN
->
user_reg_write
(
"app_tp_number"
,
1
);
pFEN
->
user_reg_write
(
"app_chmask"
,
getChMap
());
pFEN
->
user_reg_write
(
"sc_cfg_app"
,
0x00000000
);
pFEN
->
user_reg_write
(
"sc_cfg_app"
,
0x00000001
);
pFEN
->
user_reg_write
(
"sc_cfg_app"
,
0x00000000
);
}
uint16_t
FENConfigModule
::
getChMap
()
{
std
::
string
chMapString
=
"0000000000000000"
;
for
(
int
hybrid
=
0
;
hybrid
<
HYBRIDS_PER_FEN
;
hybrid
++
)
{
if
(
isHybridEnabled
(
hybrid
))
{
for
(
int
vmm
=
0
;
vmm
<
VMMS_PER_HYBRID
;
vmm
++
)
{
chMapString
.
replace
(
15
-
(
hybrid
*
2
+
vmm
),
1
,
"1"
);
}
}
}
uint16_t
chMap
=
std
::
stoi
(
chMapString
,
nullptr
,
2
);
return
chMap
;
}
bool
FENConfigModule
::
enableHybrid
(
int
hybrid
,
bool
onOff
)
{
if
(
hybrid
<
HYBRIDS_PER_FEN
)
{
enabled_hybrids
[
hybrid
]
=
onOff
;
return
true
;
}
else
return
false
;
}
bool
FENConfigModule
::
isHybridEnabled
(
int
hybrid
)
{
if
(
hybrid
<
HYBRIDS_PER_FEN
)
return
enabled_hybrids
[
hybrid
];
else
return
false
;
}
Hybrid
&
FENConfigModule
::
getHybrid
(
int
index
)
{
if
(
index
<
0
||
index
>=
HYBRIDS_PER_FEN
)
throw
std
::
out_of_range
(
"Invalid hybrid index"
);
...
...
This diff is collapsed.
Click to expand it.
vmmTblApp/src/vmm_config.h
+
5
−
0
View file @
ffe38695
...
...
@@ -14,15 +14,20 @@ class FENConfigModule {
public:
FENConfigModule
(
FrontEndBase
&
frontend
);
~
FENConfigModule
();
void
configFEN
();
bool
configVMM
(
int
hybrid_index
,
int
vmm_index
,
bool
enableConfigCheck
=
false
);
void
fillGlobalRegisters
(
std
::
vector
<
std
::
string
>&
global
,
int
hybrid_index
,
int
vmm_index
);
void
fillGlobalRegisters2
(
std
::
vector
<
std
::
string
>&
global
,
int
hybrid_index
,
int
vmm_index
);
void
fillChRegisters
(
std
::
vector
<
std
::
string
>&
registers
,
int
hybrid_index
,
int
vmm_index
);
int
readADC
(
int
hybrid_index
,
int
vmm_index
);
Hybrid
&
getHybrid
(
int
index
);
bool
enableHybrid
(
int
hybrid
,
bool
onOff
);
bool
isHybridEnabled
(
int
hybrid
);
private:
FrontEndBase
*
pFEN
;
Hybrid
hybrids
[
HYBRIDS_PER_FEN
];
bool
enabled_hybrids
[
HYBRIDS_PER_FEN
]
=
{};
uint32_t
readWriteRegs
(
std
::
string
command_reg
,
int
index
,
std
::
string
read_reg
);
uint16_t
getChMap
();
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment