6.2. Hammer End-to-End Integration Tests
The hammer/e2e folder contains an end-to-end (RTL -> GDS) smoketest flow using Hammer, either the Cadence or OpenROAD toolchain, and the ASAP7 or Skywater 130 PDKs.
6.2.1. Setup
First, follow the Hammer Power User Setup to clone Hammer and install/activate the virtual environment.
6.2.2. Overview
6.2.2.1. Flow Selection
The following variables in the Makefile select the target flow to run:
design- RTL name{
pass,gcd,sram_wrapper_sky130}
pdk- PDK name{
sky130,asap7}
tools- CAD tool flow{
cm(commercial),or(OpenROAD)}
env- compute environment{
bwrc(BWRC),a(Millenium),inst(instructional machines)}
The outputs of the flow by default reside in OBJ_DIR=build-<pdk>-<tools>/<design>/
6.2.2.2. Configs
The Hammer configuration files consist of environment (ENV_YML) and project (PROJ_YMLS) configurations.
The environment configs take precedence over ALL project configs.
The order of precedence for the project configs reads from right to left (i.e. each file overrides all files to its left).
All configuration files are summarized below.
# lowest precedence -------------------------------------------> highest precendence
CONFS ?= $(PDK_CONF) $(TOOLS_CONF) $(DESIGN_CONF) $(DESIGN_PDK_CONF) $(SIM_CONF) $(POWER_CONF)
ENV_YML- Environment configs that specify CAD tool license servers and paths are inconfigs-env. This will take precedence over any other config filePDK_CONF- PDK configs shared across all runs with this PDK are inconfigs-pdkTOOLS_CONF- Tool configs to select which CAD tool flow to use are inconfigs-toolsDesign-specific configs are located in
configs-design/<design>, and are summarized below:DESIGN_CONF- the common design config (design input files, anything else design-specific)DESIGN_PDK_CONF- PDK-specific configs for this particular design (clock, placement, pin constraints)SIM_CONF- Simulation configs for post-RTL, Synthesis, or PnR simulationPOWER_CONF- Power simulation configs for post-RTL, Synthesis, or PnR simulation (NOTE: The Makefile expects the power config filename for each simulation level + PDK to be in the formatpower-{rtl,syn,par}-<pdk>.yml, while thejoules.ymlandvoltus.ymlfiles serve as templates for the Cadence Joules/Voltus power tools)
6.2.3. Run the Flow
First, use Hammer to construct a Makefile fragment with targets for all parts of the RTL -> GDS flow.
Specify the appropriate env/tools/pdk/design variables to select which configs will be used.
make build
# same as: `make env=bwrc tools=cm pdk=sky130 design=pass build`
Hammer will generate a Makefile fragment in OBJ_DIR/hammer.d.
Then run the rest of the flow, making sure to set the env/tools/pdk/design variables as needed:
make sim-rtl
make power-rtl
make syn
make sim-syn
make power-syn
make par
make sim-par
make power-par
make drc
make lvs
These actions are summarized in more detail:
SRAM generation
make sramsGenerated SRAM configs in
OBJ_DIR/sram_generator-output.json(empty unlessvlsi.inputs.sram_parametersis specified)
RTL simulation
make sim-rtlGenerated waveform in
OBJ_DIR/sim-rtl-rundir/output.fsdb
Post-RTL Power simulation
make sim-rtl-to-powermake power-rtlGenerated power reports in
OBJ_DIR/power-rtl-rundir/reports
Synthesis
make synGate-level netlist in
OBJ_DIR/syn-rundir/<design>.mapped.v
Post-Synthesis simulation
make syn-to-simmake sim-synGenerated waveform and register forcing ucli script in
OBJ_DIR/sim-syn-rundir
Post-Synthesis Power simulation
make syn-to-powermake sim-syn-to-powermake power-synGenerated power reports in
OBJ_DIR/power-syn-rundir/reports
PnR
make syn-to-parmake parLVS netlist (
<design>.lvs.v) and GDS (<design>.gds) inOBJ_DIR/par-rundir
Post-PnR simulation
make par-to-simmake sim-par
Post-PnR Power simulation
make par-to-powermake sim-par-to-powermake power-parGenerated power reports in
OBJ_DIR/power-par-rundir
6.2.3.1. Flow Customization
If at any point you would like to use custom config files (that will override any previous configs), assign the extra Make variable to a space-separated list of these files.
For example, to run the pass design with sky130 through the commercial flow, but run LVS with Cadence Pegasus instead of the default Siemens Calibre,
simply run the following:
make extra="configs-tool/pegasus.yml" build
To use the Hammer step flow control, prepend redo- to any VLSI flow action,
then assign the args Make variable to the appropriate Hammer command line args.
For example, to only run the report_power step of the power-rtl action (i.e. bypass synthesis), run the following:
make args="--only_step report_power" redo-power-rtl
6.2.4. Custom Setups
If you’re not using a Berkeley EECS compute node, you can create your own environment setup.
Create an environment config similar to those in
configs-envfor your node to specify the CAD tool license servers and paths/versions of CAD tools and the PDK, and set theENV_YMLvariable to this file.The rest of the flow should be identical
6.2.4.1. ASAP7 Install
Clone the asap7 repo somewhere and reference the path in your ENV_YML config.
6.2.4.2. Sky130 Install
Refer to the Hammer Sky130 plugin README
to install the Sky130 PDK, then reference the path in your ENV_YML config (only the technology.sky130.sky130A key is required).
6.2.5. Pipecleaning
We have provided several reference designs of increasing complexity to aid with pipecleaning your Hammer VLSI flow setup. These are summarized as follows, in order of complexity:
pass: single registergcd: computes greatest common denominator, good for testing more complex logicsram_wrapper_sky130: example wrapper for an SRAM instance in Sky130, useful for ensuring correct SRAM integration into flowwraps any Sky130 SRAM instance available in
hammer/hammer/technology/sky130/sram-cache.jsonSRAM instance specified via defines in
configs-design/sram_wrapper_sky130/common.ymlall SRAM configurations are loaded via these config fragments in
configs-design/sram_wrapper_sky130/sky130.yml:# Compile all srams in our cache vlsi.inputs.sram_parameters: "../../../hammer/technology/sky130/sram-cache.json" vlsi.inputs.sram_parameters_meta: ["prependlocal", "transclude", "json2list"]