Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit core collection
Commits
e7ba8d5f
Commit
e7ba8d5f
authored
Jun 22, 2017
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[testbench/wr_streamers] bugfix of fixed latency verification
parent
059b6cd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
main.sv
testbench/wr_streamers/streamers_multi_test/main.sv
+10
-9
No files found.
testbench/wr_streamers/streamers_multi_test/main.sv
View file @
e7ba8d5f
...
...
@@ -95,7 +95,7 @@ module main;
reg
[
27
:
0
]
clk_cycle_counter
=
0
;
int
clk_cycle_tmout_ctr_before
=
0
;
int
clk_cycle_tmout_ctr_after
=
0
;
int
clk_cycle_frm_
rcv
d
=
0
;
int
clk_cycle_frm_
txe
d
=
0
;
int
clk_cycle_frm_valid
=
0
;
// TX Streamer signals
...
...
@@ -592,6 +592,8 @@ module main;
// Rx Test 5: Check the fixed latency is correct
//-----------------------------------------------
#
1u
s
// make sure that the previous frame has been received, otherwise
// the testbench might wrongly measure the latency
current_test
=
"Rx FIXED-LATENCY"
;
blk_size
=
rand_blk_size
;
frm_size
=
rand_frm_size
;
...
...
@@ -601,22 +603,22 @@ module main;
@
(
posedge
clk
)
tx_flush
=
0
;
tx_frm_queue
.
push_back
(
frm
)
;
@
(
posedge
rx_frame_received
)
clk_cycle_frm_rcv
d
=
tm_cycle_counter
;
//$display("frame received @ %d, time %t\n", clk_cycle_frm_
rcv
d, $time);
@
(
posedge
rx_streamer_
dvalid
)
clk_cycle_frm_valid
=
tm_cycle_counter
;
@
(
posedge
U_TX_Streamer
.
U_Wrapped_Streamer
.
U_Fab_Source
.
sof_i
)
clk_cycle_frm_txe
d
=
tm_cycle_counter
;
//$display("frame received @ %d, time %t\n", clk_cycle_frm_
txe
d, $time);
@
(
posedge
rx_streamer_
first
)
clk_cycle_frm_valid
=
tm_cycle_counter
;
//$display("frame out valid @ %d, time %t\n", clk_cycle_frm_valid, $time);
//fixed latency value is checked against range since i/o interface
//of streamers does not allow for exact latency measurement without
//probing an internal signal
if
((
fixed_latency
<=
clk_cycle_frm_valid
-
clk_cycle_frm_
rcv
d
+
24
)
&&
(
fixed_latency
>=
clk_cycle_frm_valid
-
clk_cycle_frm_
rcv
d
-
24
)
)
if
((
fixed_latency
<=
clk_cycle_frm_valid
-
clk_cycle_frm_
txe
d
+
24
)
&&
(
fixed_latency
>=
clk_cycle_frm_valid
-
clk_cycle_frm_
txe
d
-
24
)
)
begin
$
display
(
"[%t ns]: PASSED - TEST %d - %s
\n
"
,
$
time
,
test_num
,
current_test
)
;
//$display ("Fixed latency set to %.3f us, Rx output valid @ %.3f us",
//real'(fixed_latency) * 0.008, real'(clk_cycle_frm_valid-
//clk_cycle_frm_
rcv
d) * 0.008);
//clk_cycle_frm_
txe
d) * 0.008);
flatency_test
=
1
;
end
else
...
...
@@ -624,12 +626,11 @@ module main;
$
display
(
"[%t ns]: >>> FAILED - TEST %d - %s
\n
"
,
$
time
,
test_num
,
current_test
)
;
$
display
(
"Fixed latency set to %.3f us, Rx output latency valid @ %.3f us"
,
real
'
(
fixed_latency
)
*
0.008
,
real
'
(
clk_cycle_frm_valid
-
clk_cycle_frm_
rcv
d
)
*
0.008
)
;
clk_cycle_frm_
txe
d
)
*
0.008
)
;
// $stop;
end
test_num
++;
fixed_latency
=
28'd0
;
// Rx Test 6: Check frames dropped are signalled correctly
// -----------------------------------------------
current_test
=
"Rx DROP_FRAMES"
;
...
...
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