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
0
Merge Requests
0
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
e0d5b5ba
Commit
e0d5b5ba
authored
May 16, 2019
by
Tomasz Wlostowski
Committed by
Maciej Lipinski
May 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_streamers: correct calculation of delay in fixed latency tb
parent
23901cd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
main.sv
testbench/wr_streamers/streamers-only-fixed-latency/main.sv
+6
-6
wave.do
testbench/wr_streamers/streamers-only-fixed-latency/wave.do
+25
-10
No files found.
testbench/wr_streamers/streamers-only-fixed-latency/main.sv
View file @
e0d5b5ba
...
...
@@ -71,7 +71,7 @@ module main;
// Size of data record to be used by the streamers - in our case, a 64-bit
// word.
parameter
g_record_size
=
64
;
parameter
g_wr_cycles_per_second
=
10
000
;
parameter
g_wr_cycles_per_second
=
625
000
;
...
...
@@ -295,6 +295,8 @@ module main;
// Got a record? Compare it against the copy stored in queue.
automatic
t_queue_entry
qe
=
queue
.
pop_front
()
;
automatic
time
ts_rx
=
$
time
,
delta
;
const
time
c_pipeline_delay
=
64
ns
;
if
(
rx_streamer_data
!=
qe
.
data
)
begin
...
...
@@ -302,14 +304,12 @@ module main;
end
//$display("Tx ts %t rx ts %t", qe.ts, ts_rx);
delta
=
ts_rx
-
qe
.
ts
-
rx_streamer_cfg
.
fixed_latency
*
8
ns
;
// $display("Tx ts %t rx ts %t", qe.ts, ts_rx);
delta
=
ts_rx
-
qe
.
ts
-
rx_streamer_cfg
.
fixed_latency
*
16
ns
-
c_pipeline_delay
;
$
display
(
"delta: %
t"
,
delta
)
;
$
display
(
"delta: %
.3f us %t"
,
real
'
(
delta
)
/
real
'
(
1u
s
)
,
delta
)
;
end
// if (rx_streamer_dvalid)
end
// else: !if(!rst)
...
...
testbench/wr_streamers/streamers-only-fixed-latency/wave.do
View file @
e0d5b5ba
...
...
@@ -98,7 +98,6 @@ add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_data_
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_last_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_sync_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_target_ts_en_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_target_ts_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_valid_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_drop_i
add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/d_accept_i
...
...
@@ -133,22 +132,38 @@ add wave -noupdate -group FixDelay /main/U_RX_Streamer/U_FixLatencyDelay/delay_m
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/clk_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/rst_n_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/arm_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/ts_origin_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/ts_latency_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/tm_time_valid_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/tm_tai_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/tm_cycles_i
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/match_o
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/miss_o
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/ts_adjusted
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/target_cycles
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/delta
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/arm_d
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/armed
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/tm_cycles_scaled
add wave -noupdate -expand -group TSCompare /main/U_RX_Streamer/U_FixLatencyDelay/U_Compare/ts_latency_scaled
add wave -noupdate -expand -group Top /main/clk_ref
add wave -noupdate -expand -group Top /main/clk_sys
add wave -noupdate -expand -group Top /main/rst
add wave -noupdate -expand -group Top /main/tx_streamer_dvalid
add wave -noupdate -expand -group Top /main/tx_streamer_data
add wave -noupdate -expand -group Top /main/tx_streamer_flush
add wave -noupdate -expand -group Top /main/tx_streamer_last
add wave -noupdate -expand -group Top /main/tx_streamer_dreq
add wave -noupdate -expand -group Top /main/tx_streamer_sync
add wave -noupdate -expand -group Top /main/rx_streamer_dreq
add wave -noupdate -expand -group Top /main/rx_streamer_data
add wave -noupdate -expand -group Top /main/rx_streamer_dvalid
add wave -noupdate -expand -group Top /main/rx_streamer_lost
add wave -noupdate -expand -group Top /main/rx_latency
add wave -noupdate -expand -group Top /main/rx_latency_valid
add wave -noupdate -expand -group Top /main/tm_cycles
add wave -noupdate -expand -group Top /main/tm_tai
add wave -noupdate -expand -group Top /main/tx_counter
add wave -noupdate -expand -group Top /main/rx_streamer_cfg
add wave -noupdate -expand -group Top /main/tx_streamer_cfg
add wave -noupdate -expand -group Top /main/src_out
add wave -noupdate -expand -group Top /main/src_in
add wave -noupdate -expand -group Top /main/tx_delay_count
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {
155661017
ps} 0}
WaveRestoreCursors {{Cursor 1} {
2269068
ps} 0}
configure wave -namecolwidth 191
configure wave -valuecolwidth 152
configure wave -justifyvalue left
...
...
@@ -163,4 +178,4 @@ configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ns
update
WaveRestoreZoom {0 ps} {
672 u
s}
WaveRestoreZoom {0 ps} {
10500 n
s}
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