Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Gateware
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
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
Projects
White Rabbit Switch - Gateware
Commits
d8fa57ad
Commit
d8fa57ad
authored
11 years ago
by
Maciej Lipinski
Browse files
Options
Downloads
Patches
Plain Diff
[v4-dev] endpoint: tx-untagging bugfix
parent
233c4b19
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ip_cores/wr-cores
+1
-1
1 addition, 1 deletion
ip_cores/wr-cores
testbench/scb_top/main.sv
+30
-2
30 additions, 2 deletions
testbench/scb_top/main.sv
testbench/scb_top/simdrv_wr_endpoint.svh
+17
-1
17 additions, 1 deletion
testbench/scb_top/simdrv_wr_endpoint.svh
with
48 additions
and
4 deletions
wr-cores
@
6b584ab0
Subproject commit 6
7cd9ce053e3b3a43f0f4d29b1b03b
b5
e
c61
861f
Subproject commit 6
b584ab02828be266131fd7d3e42f
b5
8
c61
7ee98
This diff is collapsed.
Click to expand it.
testbench/scb_top/main.sv
+
30
−
2
View file @
d8fa57ad
...
...
@@ -199,6 +199,7 @@ module main;
integer
g_enable_WRtime
=
0
;
integer
g_tatsu_config
=
0
;
integer
g_fw_to_cpu_scenario
=
0
;
integer
g_set_untagging
=
0
;
int
lacp_df_hp_id
=
0
;
int
lacp_df_br_id
=
2
;
int
lacp_df_un_id
=
1
;
...
...
@@ -1164,7 +1165,7 @@ module main;
* quick forward/block massage detection and action
*
**/
//
/*
/*
initial begin
portUnderTest = 18'b000000000000000000;
g_tru_enable = 1;
...
...
@@ -1186,8 +1187,29 @@ module main;
mc.logic2(25, 1, PFilterMicrocode::MOV, 0);
mc.logic2(26, 1, PFilterMicrocode::MOV, 0);
end
*/
/** *************************** test scenario 38 ************************************* **/
/*
* tagging/untagging test
**/
//*
initial
begin
portUnderTest
=
18'b000000000000000111
;
qmode
=
0
;
//access
pvid
=
1
;
//tagging vlan
g_is_qvlan
=
0
;
//send VLAN-tagged frames
g_do_vlan_config
=
1
;
//enable vlan confgi
g_set_untagging
=
1
;
// set pre-defined untagging config (untag VIDs:0 - 10)
// tx ,rx ,opt
trans_paths
[
0
]
=
'
{
0
,
17
,
0
}
;
trans_paths
[
1
]
=
'
{
1
,
16
,
0
}
;
trans_paths
[
2
]
=
'
{
2
,
15
,
0
}
;
end
//*/
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -1562,7 +1584,7 @@ module main;
task
automatic
init_ports
(
ref
port_t
p
[$],
ref
CWishboneAccessor
wb
);
int
i
;
int
i
,
j
;
for
(
i
=
0
;
i
<
g_num_ports
;
i
++
)
begin
...
...
@@ -1586,6 +1608,12 @@ module main;
ep
.
pause_config
(
1
/*txpause_802_3*/
,
1
/*rxpause_802_3*/
,
0
/*txpause_802_1q*/
,
0
/*rxpause_802_1q*/
);
else
if
(
g_pause_mode
==
2
)
ep
.
pause_config
(
1
/*txpause_802_3*/
,
1
/*rxpause_802_3*/
,
1
/*txpause_802_1q*/
,
1
/*rxpause_802_1q*/
);
if
(
g_set_untagging
==
1
)
begin
for
(
j
=
0
;
j
<
10
;
j
++
)
ep
.
vlan_egress_untag
(
j
,
1
);
end
tmp
.
ep
=
ep
;
tmp
.
send
=
EthPacketSource
'
(
DUT
.
to_port
[
i
]);
tmp
.
recv
=
EthPacketSink
'
(
DUT
.
from_port
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
testbench/scb_top/simdrv_wr_endpoint.svh
+
17
−
1
View file @
d8fa57ad
...
...
@@ -9,14 +9,30 @@ class CSimDrv_WR_Endpoint;
protected
CBusAccessor
m_acc
;
protected
uint64_t
m_base
;
protected
uint16_t
untag_tab
[
256
];
function
new
(
CBusAccessor
acc
,
uint64_t
base
);
int
i
;
m_acc
=
acc
;
m_base
=
base
;
// for(i=0;i<10;i++)
// untag_tab[i]=0;
endfunction
// new
task
vlan_egress_untag
(
int
vid
,
int
untag
);
m_acc
.
write
(
m_base
+
`ADDR_EP_VCR1
,
vid
|
((
untag
?
1
:
0
)
<<
12
));
uint64_t
wval
=
0
;
if
(
untag
>
0
)
untag_tab
[(
vid
>>
4
)]
=
untag_tab
[(
vid
>>
4
)]
|
(
1
<<
(
'h000F
&
vid
));
else
untag_tab
[(
vid
>>
4
)]
=
untag_tab
[(
vid
>>
4
)]
&
!
(
1
<<
(
'h000F
&
vid
));
wval
=
(
untag_tab
[(
vid
>>
4
)]
<<
10
)
|
(
'h000003FF
&
(
vid
>>
4
));
$
display
(
"[vlan_egress_untag], write offset: %d, data: 0x%x (val=0x%x)"
,
(
vid
>>
4
),
untag_tab
[(
vid
>>
4
)],
wval
);
m_acc
.
write
(
m_base
+
`ADDR_EP_VCR1
,
wval
);
// m_acc.write(m_base + `ADDR_EP_VCR1, vid | ((untag ? 1: 0) << 12));
endtask
// vlan_egress_untag
task
vcr1_buffer_write
(
int
is_vlan
,
int
addr
,
uint64_t
data
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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