autowrap and network construction features #212
Merged
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.
This PR adds a couple of new features:
autowrap
feature forSbDut
that automatically generates Verilog wrapper code to instantiate a DUT and connect it to switchboard modules. This can eliminate the need to create atestbench.sv
file in some cases.SbNetwork
class allowing for the dynamic construction of networks of simulations. Seeexamples/network
for an example and documentation.--max-rate X
when running switchboard simulations to limit the speed of simulations and switchboard packet transmission toX
Hz in wall time. This comes in handy in several cases: (1) prevents generating giant VCD files, (2) makes it easier to saturate links since the driver doesn't need to be as fast, and (3) makes it easier to achieve good sharing of processor cores when running many simulations in parallel.--max-rate X
assumescmdline=True
was set forSbDut
; if not, specifymax_rate=X
argument in theSbDut
constructor.cmdline=True
is a relatively new feature - it presents a standard command-line interface for settingtool
,fast
,trace
, etc.These new features are big enough that I think it's worth bumping the version number of switchboard to 0.2.0. This new version should be fully backwards-compatible with 0.1.0.
Future updates planned for 0.2.X include:
SbNetwork
compile into a single-netlist Verilog simulation for best accuracy.SbNetwork
as a component in anSbNetwork
. This, combined with (1), would allow for networks to be simulated by connecting together RTL simulations of sub-networks.SbNetwork.connect()
to connect over TCP to remote machines.