Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autowrap and network construction features #212

Merged
merged 30 commits into from
May 9, 2024
Merged

autowrap and network construction features #212

merged 30 commits into from
May 9, 2024

Conversation

sgherbst
Copy link
Contributor

@sgherbst sgherbst commented May 4, 2024

This PR adds a couple of new features:

  1. autowrap feature for SbDut that automatically generates Verilog wrapper code to instantiate a DUT and connect it to switchboard modules. This can eliminate the need to create a testbench.sv file in some cases.
  2. SbNetwork class allowing for the dynamic construction of networks of simulations. See examples/network for an example and documentation.
  3. Rate limiting: specify --max-rate X when running switchboard simulations to limit the speed of simulations and switchboard packet transmission to X 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.
    • Note: --max-rate X assumes cmdline=True was set for SbDut; if not, specify max_rate=X argument in the SbDut constructor. cmdline=True is a relatively new feature - it presents a standard command-line interface for setting tool, 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:

  1. Option to have SbNetwork compile into a single-netlist Verilog simulation for best accuracy.
  2. Option to use SbNetwork as a component in an SbNetwork. This, combined with (1), would allow for networks to be simulated by connecting together RTL simulations of sub-networks.
  3. Option for SbNetwork.connect() to connect over TCP to remote machines.

@sgherbst sgherbst changed the title Sgh/autowrap autowrap and network construction features May 4, 2024
@sgherbst sgherbst marked this pull request as ready for review May 4, 2024 01:36
@sgherbst sgherbst requested a review from azaidy May 4, 2024 01:36
This was referenced May 6, 2024
@sgherbst sgherbst linked an issue May 6, 2024 that may be closed by this pull request
Copy link
Collaborator

@azaidy azaidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


```python
axil = AxiLiteTxRx('axil', data_width=..., addr_width=...)
axi = dut.intfs['s_axil'] # type: AxiLiteTxRx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a typo. Should be axil = dut.intfs['s_axil']

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch - fixed

@sgherbst sgherbst merged commit b0a8be8 into main May 9, 2024
6 checks passed
@sgherbst sgherbst deleted the sgh/autowrap branch May 9, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generic Switchboard launch flow
2 participants