Open
Description
Integrating CXXSim requires a number of improvements to the Yosys CXXRTL backend that have to be done upstream.
Remaining tasks
See also #324 for nMigen-side view of these tasks.
Blockers (to be completed pre-merge)
- CXXRTL designs should have a dedicated
reset
method. (cxxrtl: provide a way to perform unobtrusive power-on reset YosysHQ/yosys#2466) Although it is always possible to destroy and recreate the entire simulation, this has two downsides:- Memory addresses in debug items will get invalidated and will need to be reacquired. This may be quite costly to Python code.
- The issue above can be partially solved by assigning a new default-initialized instance on C++ side using a new C API function. However, this would still destroy the state of every black box. Given that black boxes are explicitly intended to acquire heavyweight resources like GUI windows and OS network interfaces, this is undesirable.
- CXXRTL generated code should have an option to disable assertions of RTL invariants without enabling
-DNDEBUG
, since-DNDEBUG
would also disable assertions of CXXRTL API contracts, and most if not all CXXRTL embedders do not want the generated code toabort()
. (cxxrtl: use CXXRTL_ASSERT for RTL contract violations instead of assert YosysHQ/yosys#2468) - CXXRTL API should allow placing modules at non-root hierarchy for VCD dumps. (cxxrtl: allow customizing the root module path in the C API YosysHQ/yosys#2470)
- Investigate whether memory writes can be done using the C API without race conditions.
Non-blockers (may be completed post-merge)
- Add support for Yosys enumerated signal attributes and/or arbitrary user-specified decoders to the CXXRTL VCD writer.
- Add basic support for
$print
and$assert
(& its related cells) that translate to console output and RTL assertions respectively. - Add advanced support for
$print
and$assert
(& its related cells) that queue these events for consumption through the C API. (Add support for Print in simulation #432, Add support for Assert in simulation #427) - Investigate whether some kind of shared event manager/dispatcher would be a good solution to systematic issues with edge-triggered logic. (fsm_state changes mid cycle #439)