ibex icon indicating copy to clipboard operation
ibex copied to clipboard

Core_sleep_o issue

Open udinator opened this issue 7 years ago • 5 comments

Hi, I was running a wfi test, expecting the new core_sleep_o signal (#284) to be asserted after the wfi started being executed, but instead it looks like this signal remains at 1'b0 for the entire test, and switches to 1'bX at some points as well, as shown in the waveform below: Screenshot from 2019-09-10 16-14-01 Additionally, there may be an issue with clock_en, as it is 1'b1 through the entire simulation, but changes to 1'bX after a wfi is executing.

udinator avatar Sep 10 '19 23:09 udinator

The current implementation of the sleep signal is very simple, it just exposes the inverted clock_en to the outside world. Hence issues in one will match issues in the other. I suspect we'll want something more sophisticated eventually (current version may not give good timing for one thing).

As verilator doesn't do X I can't reproduce the issue other than confirm sleep works as I'd expect on an verilator simulation (goes high on a WFI).

The issue may be X on other inputs, debug_req_i, irq_nm_i, irq_software_i, irq_timer_i, irq_external_i, irq_fast_i or Xs in the mie_q flop.

GregAC avatar Sep 11 '19 09:09 GregAC

@udinator let me know if you want me to help take a look at anything.

tjaychen avatar Sep 11 '19 18:09 tjaychen

Hi @udinator , thanks for creating the issue. As Greg pointed out we can't see the X in Verilator and cannot really tell what the issue is. If you can forward us the waves generated at your end, we can study them and hopefully find a solution. We would need the waves of the entire processor (ibex_core.sv). You can directly upload them here inside a .zip-file.

Best, Pirmin

vogelpi avatar Sep 13 '19 08:09 vogelpi

Hi @vogelpi and @GregAC, I will first update our testbench to ensure there are no X signals being driven/seen anywhere, and if that does not appear to solve the issue, I'll dig deeper into this and try to root cause it before updating this thread. Best, Udi

udinator avatar Sep 13 '19 14:09 udinator

Updating this issue to confirm that after modifying the testbench to drive all external stimulus wires to 0 after reset, core_sleep_o appears to be working as intended, going high several cycles after a wfi starts executing. Closing this issue for now.

udinator avatar Sep 19 '19 15:09 udinator