Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
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
Dmytro Levit
Software
Commits
1bf181d9
Commit
1bf181d9
authored
4 years ago
by
qzhou
Browse files
Options
Downloads
Patches
Plain Diff
add set mask function
parent
4906cd47
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!14
Monitoring
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Pcie40Libraries/pcie40_reg.cpp
+13
-0
13 additions, 0 deletions
Pcie40Libraries/pcie40_reg.cpp
Pcie40Libraries/pcie40_reg.h
+7
-6
7 additions, 6 deletions
Pcie40Libraries/pcie40_reg.h
with
20 additions
and
6 deletions
Pcie40Libraries/pcie40_reg.cpp
+
13
−
0
View file @
1bf181d9
...
...
@@ -108,6 +108,19 @@ int pcie40_b2l_mask(int dev, int ch){
return
(
(
ret
&
(
1
<<
(
SLC_BASE_BIT
+
ch
)
)
)
>>
(
SLC_BASE_BIT
+
ch
));
}
// set mask for corresponding b2l: 0->mask, 1->unmask
int
pcie40_b2l_set_mask
(
int
dev
,
int
ch
,
int
mask
){
int
ret
=
-
1
;
if
(
ch
>=
0
&&
ch
<=
23
){
ret
=
ecs_write
(
dev
,
SLC_BAR
,
SLC_B2LINK_MASK1
,
mask
);
if
(
ret
!=
0
)
return
-
1
;
}
else
if
(
ch
>=
24
&&
ch
<=
47
){
ret
=
ecs_write
(
dev
,
SLC_BAR
,
SLC_B2LINK_MASK2
,
mask
);
if
(
ret
!=
0
)
return
-
1
;
}
return
ret
;
}
int
pcie40_b2l_txstatus
(
int
dev
,
int
ch
){
int
ret
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Pcie40Libraries/pcie40_reg.h
+
7
−
6
View file @
1bf181d9
...
...
@@ -32,12 +32,12 @@ extern "C" {
#define SLC_B2LINK_RX_STATUS2 0x00050180 // link in the ready state for txdata, channel 0-23, 1 bit pre channel
#define SLC_B2LINK_TX_STATUS1 0x000501A0 // link in the ready state for txdata, channel 0-23, 1 bit pre channel
#define SLC_B2LINK_TX_STATUS2 0x000501C0 // link in the ready state for txdata, channel 0-23, 1 bit pre channel
#define SLC_B2LINK_VETOIDLE 0x000700
1
0 // count vetoidle
#define SLC_B2LINK_VETODATA 0x000700
0
0 // count vetodata
#define SLC_B2LINK_BUFDOWN0 0x000
9
0000 // buffer recent two words of rxdata
#define SLC_B2LINK_BUFDOWN1 0x000
8
0000 // buffer recent two words of rxdata
#define SLC_B2LINK_CNTDOWN 0x000A00
1
0 // buffer recent third words of rxdata [15 downto 0] + three charish {21 downto 16}
#define SLC_B2LINK_MONSTATUS 0x000A00
0
0 // buffer recent two words of rxdata
#define SLC_B2LINK_VETOIDLE 0x000700
0
0 // count vetoidle
#define SLC_B2LINK_VETODATA 0x000700
1
0 // count vetodata
#define SLC_B2LINK_BUFDOWN0 0x000
8
0000 // buffer recent two words of rxdata
#define SLC_B2LINK_BUFDOWN1 0x000
9
0000 // buffer recent two words of rxdata
#define SLC_B2LINK_CNTDOWN 0x000A00
0
0 // buffer recent third words of rxdata [15 downto 0] + three charish {21 downto 16}
#define SLC_B2LINK_MONSTATUS 0x000A00
1
0 // buffer recent two words of rxdata
#define SLC_B2LINK_STATUS1 0x000501E0 // link up/down channel 0-23, 1 bit pre channel
#define SLC_B2LINK_STATUS2 0x00050200 // link up/down channel 24-47, 1 bit pre channel
...
...
@@ -57,6 +57,7 @@ int pcie40_b2l_rxstatus(int dev, int ch);
int
pcie40_b2l_txready
(
int
dev
,
int
ch
);
int
pcie40_b2l_rxready
(
int
dev
,
int
ch
);
int
pcie40_b2l_mask
(
int
dev
,
int
ch
);
int
pcie40_b2l_set_mask
(
int
dev
,
int
ch
,
int
mask
);
int
pcie40_b2l_cnt_vetoidle
(
int
dev
,
int
ch
);
int
pcie40_b2l_cnt_vetodata
(
int
dev
,
int
ch
);
int
pcie40_b2l_3rdrxdata
(
int
dev
,
int
ch
);
...
...
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