File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,13 @@ class ctrl_simulation;
5353 logic [AXIL_DATA_BITS - 1 : 0 ] read_data;
5454
5555 forever begin
56- mbx.get (trs);
56+ // We need this as non-blocking with @(...), otherwise timing might be off if we do a
57+ // busy wait and we would need to wait an additional cycle every time
58+ int success = mbx.try_get (trs);
59+ while (! success) begin
60+ @ (drv.axi.cbm);
61+ success = mbx.try_get (trs);
62+ end
5763
5864 if (trs.is_write) begin // Write a control register
5965 drv.write (trs.addr, trs.data);
Original file line number Diff line number Diff line change @@ -378,6 +378,9 @@ module tb_user;
378378
379379 # (RST_PERIOD ) aresetn = 1'b1 ;
380380
381+ // Wait some more because otherwise reset pipelining might swallow up some data
382+ # (RST_PERIOD );
383+
381384 env_threads ();
382385 env_done ();
383386
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ def read_register(
391391 periodically and waiting for the output is canceled when the event is set. In this case,
392392 None will be returned!
393393 """
394- self ._io_writer .ctrl_read (id , stop_event )
394+ return self ._io_writer .ctrl_read (id , stop_event )
395395
396396 def set_stream_input (
397397 self ,
You can’t perform that action at this time.
0 commit comments