Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
3210994c
Commit
3210994c
authored
Dec 02, 2010
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swcore: improvements in input block
parent
aaa7c3db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
9 deletions
+44
-9
fabric_emu_funcs.sv
fabric_emu_funcs.sv
+1
-1
swc_core.v4.sv
swc_core.v4.sv
+43
-8
vsim.wlf
vsim.wlf
+0
-0
No files found.
fabric_emu_funcs.sv
View file @
3210994c
...
...
@@ -159,6 +159,6 @@ task dump_frame_header(string s, ether_frame_t frame);
else
begin
$
display
(
"%s %s (size: %d, port_id: %4d) length = %d %s %s =>> ERROR here"
,
s
,
format_ether_header
(
frame
.
hdr
)
,
frame
.
hdr
.
ethertype
,
frame
.
hdr
.
src
>>
44
,
frame
.
size
,
frame
.
error
?
"ERROR"
:
"OK"
,
frame
.
hdr
.
has_timestamp
?
"TS"
:
"NoTS"
)
;
//
$fatal("dupa");
$
fatal
(
"dupa"
)
;
end
endtask
//
dump_frame_header
\ No newline at end of file
swc_core.v4.sv
View file @
3210994c
...
...
@@ -388,13 +388,29 @@ module main;
// mask = 'h00F;;
// mask = 'h7FF;;
mask
=
(
4
*
cnt
+
3
*
cnt
+
2
*
cnt
+
cnt
)
%
2047
;
mask
=
(
port
*
cnt
+
3
*
cnt
+
2
*
cnt
+
cnt
)
%
2047
;
if
(
(
i
/
50
)
%
20
>
10
)
drop
=
1
;
else
drop
=
0
;
// drop = 0;
send_pck
(
hdr
,
buffer
,
i
,
port
,
drop
,
(
i
/
50
)
%
7
,
mask
,
cnt
)
;
send_pck
(
hdr
,
buffer
,
i
,
port
,
drop
,
(
(
port
*
i
)
/
50
)
%
7
,
mask
,
cnt
)
;
if
(
i
>
600
)
begin
test_input_block_0
.
simulate_rx_abort
(
0
,
10
)
;
test_input_block_1
.
simulate_rx_abort
(
0
,
20
)
;
test_input_block_2
.
simulate_rx_abort
(
0
,
30
)
;
test_input_block_3
.
simulate_rx_abort
(
0
,
40
)
;
test_input_block_4
.
simulate_rx_abort
(
0
,
50
)
;
test_input_block_5
.
simulate_rx_abort
(
0
,
60
)
;
test_input_block_6
.
simulate_rx_abort
(
0
,
70
)
;
test_input_block_7
.
simulate_rx_abort
(
0
,
80
)
;
test_input_block_8
.
simulate_rx_abort
(
0
,
90
)
;
test_input_block_9
.
simulate_rx_abort
(
0
,
100
)
;
test_input_block_10
.
simulate_rx_abort
(
0
,
110
)
;
end
/*
if(drop == 0)
begin
...
...
@@ -434,9 +450,9 @@ module main;
wait
(
test_input_block_8
.
ready
)
;
wait
(
test_input_block_9
.
ready
)
;
wait
(
test_input_block_10
.
ready
)
;
test_input_block_0
.
simulate_tx_throttling
(
1
,
1
0
)
;
test_input_block_0
.
simulate_tx_throttling
(
1
,
5
0
)
;
test_input_block_1
.
simulate_tx_throttling
(
1
,
20
)
;
test_input_block_2
.
simulate_tx_throttling
(
1
,
30
)
;
test_input_block_3
.
simulate_tx_throttling
(
1
,
40
)
;
...
...
@@ -454,10 +470,29 @@ module main;
test_input_block_1
.
simulate_rx_throttling
(
1
,
20
)
;
test_input_block_2
.
simulate_rx_throttling
(
1
,
10
)
;
test_input_block_3
.
simulate_rx_throttling
(
1
,
20
)
;
test_input_block_4
.
simulate_rx_throttling
(
1
,
10
)
;
test_input_block_5
.
simulate_rx_throttling
(
1
,
20
)
;
test_input_block_6
.
simulate_rx_throttling
(
1
,
10
)
;
test_input_block_7
.
simulate_rx_throttling
(
1
,
20
)
;
test_input_block_8
.
simulate_rx_throttling
(
1
,
10
)
;
test_input_block_9
.
simulate_rx_throttling
(
1
,
20
)
;
test_input_block_10
.
simulate_rx_throttling
(
1
,
10
)
;
test_input_block_0
.
simulate_rx_abort
(
1
,
10
)
;
test_input_block_1
.
simulate_rx_abort
(
1
,
20
)
;
test_input_block_2
.
simulate_rx_abort
(
1
,
30
)
;
test_input_block_3
.
simulate_rx_abort
(
1
,
40
)
;
test_input_block_4
.
simulate_rx_abort
(
1
,
50
)
;
test_input_block_5
.
simulate_rx_abort
(
1
,
60
)
;
test_input_block_6
.
simulate_rx_abort
(
1
,
70
)
;
test_input_block_7
.
simulate_rx_abort
(
1
,
80
)
;
test_input_block_8
.
simulate_rx_abort
(
1
,
90
)
;
test_input_block_9
.
simulate_rx_abort
(
1
,
100
)
;
test_input_block_10
.
simulate_rx_abort
(
1
,
110
)
;
//test_input_block_0.simulate_tx_error(1,110);
//
test_input_block_0.simulate_rx_abort(1,80);
//
test_input_block_0.simulate_rx_abort(1,80);
// test_input_block_1.send(hdr, buffer, 911);
...
...
@@ -541,7 +576,7 @@ module main;
tx_port_finished
[
5
]
&
tx_port_finished
[
6
]
&
tx_port_finished
[
7
]
&
tx_port_finished
[
8
]
&
tx_port_finished
[
9
]
&
tx_port_finished
[
10
])
;
wait_cycles
(
1
00000
)
;
wait_cycles
(
5
00000
)
;
$
display
(
"=============================================== DBG ================================================="
)
;
$
display
(
"Rx Ports : P 0 | P 1 | P 2 | P 3 | P 4 | P 5 | P 6 | P 7 | P 8 | P 9 | P10 | "
)
;
$
display
(
"-----------------------------------------------------------------------------------------------------"
)
;
...
...
vsim.wlf
View file @
3210994c
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment