[chiselsim] Add SimulatorAPI, reduce DefaultSimulator to nothing #4680
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a new
SimulatorAPItrait which provides methods for runningsimulations. This will submsume the existing
DefaultSimulator.simulatemethod and extends it with an "ABI" for how to startup simulations of
Chisel-generated Verilog.
This API includes two methods:
simulateRaw -- This is only usable with
RawModules where there isno information about the clock and reset. This is the same as
DefaultSimulator.simulate.simulate -- This is only usable with
Modules where there is adefined clock and reset. This is the method which implements an "ABI"
startup sequence which avoids problems with simulators, time zero
behavior, and race conditions.
Remove all methods from
DefaultSimulatorand replace them with methodsprovided by the
SimulatorAPI. This is change to the unreleasedsimulatemethod forDefaultSimulatorin that this will now require aModuleand uses the standard ABI bringup procedure.EphemeralSimulatoris left unchanged.Release Notes
Add a new ChiselSim trait,
SimulatorAPI, which adds methods for running simulations.