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
bd219537
Commit
bd219537
authored
11 years ago
by
Maciej Lipinski
Browse files
Options
Downloads
Patches
Plain Diff
adding to testbench simulation test case of tagging/untagging
parent
b21ab5a4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testbench/scb_top/main.sv
+32
-4
32 additions, 4 deletions
testbench/scb_top/main.sv
with
32 additions
and
4 deletions
testbench/scb_top/main.sv
+
32
−
4
View file @
bd219537
...
...
@@ -23,7 +23,7 @@ module main;
reg
rst_n
=
0
;
parameter
g_max_ports
=
18
;
parameter
g_num_ports
=
18
;
parameter
g_mvlan
=
3
;
//max simulation vlans
parameter
g_mvlan
=
4
;
//max simulation vlans
parameter
g_max_dist_port_number
=
4
;
typedef
enum
{
PAUSE
=
0
,
...
...
@@ -146,6 +146,7 @@ module main;
int
pvid
=
0
;
// mask , fid , prio,has_p,overr, drop , vid, valid
t_sim_vlan_entry
sim_vlan_tab
[
g_mvlan
]
=
'
{
'
{
'
{
32'hFFFFFFFF
,
8'h0
,
3'h0
,
1'b0
,
1'b0
,
1'b0
}
,
0
,
1'b1
}
,
'
{
'
{
32'hFFFFFFFF
,
8'h0
,
3'h0
,
1'b0
,
1'b0
,
1'b0
}
,
1
,
1'b1
}
,
'
{
'
{
32'hFFFFFFFF
,
8'h0
,
3'h0
,
1'b0
,
1'b0
,
1'b0
}
,
100
,
1'b1
}
,
'
{
'
{
32'hFFFFFFFF
,
8'h0
,
3'h0
,
1'b0
,
1'b0
,
1'b0
}
,
200
,
1'b1
}}
;
integer
tru_config_opt
=
0
;
...
...
@@ -1191,9 +1192,13 @@ module main;
*/
/** *************************** test scenario 38 ************************************* **/
/*
* tagging/untagging test
* simple tagging/untagging test:
* 1) send untaggged frames
* 2) they get tagged at ingress port
* 3) they get forwarded for pvid VLAN id
* 4) they get untagged on egress
**/
/
/*
/*
initial begin
portUnderTest = 18'b000000000000000111;
...
...
@@ -1208,8 +1213,31 @@ module main;
trans_paths[2] = '{2 ,15 , 0 };
end
//*/
/*/
/** *************************** test scenario 39 ************************************* **/
/*
* tagging+untaggint + HP
**/
//*
initial
begin
portUnderTest
=
18'b000000000000000001
;
qmode
=
0
;
//access
pvid
=
1
;
//tagging vlan
prio_val
=
7
;
//tag with prio 7 (7 is for HP)
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)
mac_br
=
1
;
// fast forward broadcast
// tx ,rx ,opt
trans_paths
[
0
]
=
'
{
0
,
17
,
1
}
;
// trans_paths[1] = '{1 ,16 , 0 };
// trans_paths[2] = '{2 ,15 , 0 };
end
//*/
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
...
...
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