This reporsitory contains SteelBrew, the Bachelor's project by Rasmus Wiuff (rwiuff@gmail.com).
Verilator, GNU Make and gcc is required to run the software.
If on Windows, install and enable Ubuntu on WSL.
A guide can be found here.
For installing Verilator follow the guide here.
As of now the project is run by downloading the repo:
git clone https://github.com/rwiuff/SteelBrew.git
To play around with the demo do as follows:
- Open the cloned repo in your favourite Gradle enabled editor.
- Go to the file
app/src/main/java/org/rwiuff/steelbrew/Driver.java
- Edit the driver and run the java application.
Start the tests by creating a SteelBrew object as such:
SteelBrew steelBrew = new SteelBrew();
Then if on Windows, enable WSL:
Forge.enableWSL(true);
Devices can easily be added with the following:
Brewer dut = new Brewer("dut");
It is important that the string given to the Brewer constructor matches the filename of the .sv file containing the device under test SystemVerilog code.
To set the number of clockcycles:
dut.clocks(n);
with n being some integer.
The signals used in the tests are declared using the Signal object:
Signal in = new Signal("in_valid", 1);
where the signal name matches the signal in the device code. The 1 is the signal width and is for later versions of SteelBrew.
The test scenarios are created using a Batch:
Batch batch = new Batch("Tests");
The use the following commands to carry out tests:
peekto see the value of a previously defined signalbatch.peek(signal);poketo change the value of a previously defined signalbatch.poke(signal, BigInteger.ONE);stepto go to the next clock cyclebatch.step();expectto raise an alarm if some signal does not match a given valuebatch.expect(signal, BigInteger.ONE);
Once the tests are defined, add them to the DUT:
dut.brew(batch);
Then, run the simulations:
Forge.simulate();
From a declared SteelBrew object, there are commands to clean the working directory:
.cleanAux()for removing the testbenches, waveforms and stamps..dleanObj()for removing theobj_dir.clean()for executing both of the above
- Clean up the STDOUT for a nicer user experience.
- Rewrite testbench heuristics to allow for time-independent tests.
- Implement assertions
- Implement ABV as per SVA
- Enable Verilator multithreading
- Refactor into deployable plugin
