Merge remote-tracking branch 'upstream/main' into graphics
This commit is contained in:
4
.github/scripts/check-commit.sh
vendored
4
.github/scripts/check-commit.sh
vendored
@@ -12,9 +12,7 @@ source $SCRIPT_DIR/defaults.sh
|
||||
cd $LOCAL_CHIPYARD_DIR
|
||||
|
||||
# ignore the private vlsi submodules
|
||||
git config submodule.vlsi/hammer-cadence-plugins.update none
|
||||
git config submodule.vlsi/hammer-mentor-plugins.update none
|
||||
git config submodule.vlsi/hammer-synopsys-plugins.update none
|
||||
|
||||
# initialize submodules and get the hashes
|
||||
git submodule update --init
|
||||
@@ -47,7 +45,7 @@ search () {
|
||||
done
|
||||
}
|
||||
|
||||
submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor" "mempress")
|
||||
submodules=("cva6" "boom" "ibex" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor" "mempress")
|
||||
dir="generators"
|
||||
branches=("master" "main" "dev")
|
||||
search
|
||||
|
||||
54
.github/workflows/chipyard-full-flow.yml
vendored
54
.github/workflows/chipyard-full-flow.yml
vendored
@@ -107,6 +107,60 @@ jobs:
|
||||
source env.sh
|
||||
cd sims/verilator
|
||||
make verilog
|
||||
- name: VLSI test
|
||||
run: |
|
||||
cd ${{ env.REMOTE_WORK_DIR }}
|
||||
eval "$(conda shell.bash hook)"
|
||||
source env.sh
|
||||
|
||||
cd vlsi
|
||||
|
||||
# NOTE: most conda installs are in separate conda envs because they mess up
|
||||
# each other's versions (for no apparent reason) and we need the latest versions
|
||||
conda config --add channels defaults
|
||||
conda config --add channels litex-hub
|
||||
|
||||
# installs for example-sky130.yml
|
||||
conda create -y --prefix ./.conda-sky130 open_pdks.sky130a=1.0.399_0_g63dbde9
|
||||
git clone https://github.com/rahulk29/sram22_sky130_macros.git
|
||||
|
||||
# installs for example-openroad.yml
|
||||
conda create -y --prefix ./.conda-yosys yosys=0.27_4_gb58664d44
|
||||
conda create -y --prefix ./.conda-openroad openroad=2.0_7070_g0264023b6
|
||||
conda create -y --prefix ./.conda-klayout klayout=0.28.5_98_g87e2def28
|
||||
conda create -y --prefix ./.conda-signoff magic=8.3.376_0_g5e5879c netgen=1.5.250_0_g178b172
|
||||
|
||||
echo "# Tutorial configs" > tutorial.yml
|
||||
echo "# pdk" > tutorial.yml
|
||||
echo "technology.sky130.sky130A: $PWD/.conda-sky130/share/pdk/sky130A" >> tutorial.yml
|
||||
echo "technology.sky130.sram22_sky130_macros: $PWD/sram22_sky130_macros" >> tutorial.yml
|
||||
echo "" >> tutorial.yml
|
||||
echo "# tools" >> tutorial.yml
|
||||
echo "synthesis.yosys.yosys_bin: $PWD/.conda-yosys/bin/yosys" >> tutorial.yml
|
||||
echo "par.openroad.openroad_bin: $PWD/.conda-openroad/bin/openroad" >> tutorial.yml
|
||||
echo "par.openroad.klayout_bin: $PWD/.conda-klayout/bin/klayout" >> tutorial.yml
|
||||
echo "drc.magic.magic_bin: $PWD/.conda-signoff/bin/magic" >> tutorial.yml
|
||||
echo "lvs.netgen.netgen_bin: $PWD/.conda-signoff/bin/netgen" >> tutorial.yml
|
||||
echo "" >> tutorial.yml
|
||||
echo "# speed up tutorial runs & declutter log output" >> tutorial.yml
|
||||
echo "par.openroad.timing_driven: false" >> tutorial.yml
|
||||
echo "par.openroad.write_reports: false" >> tutorial.yml
|
||||
|
||||
conda config --remove channels litex-hub
|
||||
conda config --remove channels defaults
|
||||
|
||||
export tutorial=sky130-openroad
|
||||
export EXTRA_CONFS=tutorial.yml
|
||||
export VLSI_TOP=RocketTile
|
||||
make buildfile
|
||||
make syn
|
||||
# openroad freezes during some write commands after detailed route
|
||||
# so need to stop the flow & run last step separately
|
||||
make par HAMMER_EXTRA_ARGS="--stop_after_step extraction"
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_before_step extraction"
|
||||
make drc
|
||||
make lvs
|
||||
|
||||
|
||||
cleanup:
|
||||
name: cleanup
|
||||
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -34,12 +34,6 @@
|
||||
[submodule "generators/sha3"]
|
||||
path = generators/sha3
|
||||
url = https://github.com/ucb-bar/sha3.git
|
||||
[submodule "vlsi/hammer-cadence-plugins"]
|
||||
path = vlsi/hammer-cadence-plugins
|
||||
url = https://github.com/ucb-bar/hammer-cadence-plugins.git
|
||||
[submodule "vlsi/hammer-synopsys-plugins"]
|
||||
path = vlsi/hammer-synopsys-plugins
|
||||
url = https://github.com/ucb-bar/hammer-synopsys-plugins.git
|
||||
[submodule "vlsi/hammer-mentor-plugins"]
|
||||
path = vlsi/hammer-mentor-plugins
|
||||
url = https://github.com/ucb-bar/hammer-mentor-plugins.git
|
||||
|
||||
@@ -5,8 +5,6 @@ build:
|
||||
tools:
|
||||
python: "mambaforge-4.10"
|
||||
|
||||
formats: all
|
||||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
|
||||
81
CHANGELOG.md
81
CHANGELOG.md
@@ -2,6 +2,87 @@
|
||||
|
||||
This changelog follows the format defined here: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
## [1.9.0] - 2023-03-23
|
||||
|
||||
Faster FIRRTL build support work CIRCT. New software support for RISC-V GCC12 and Linux 6.2. Various bumps and fixes of all submodules.
|
||||
|
||||
### Added
|
||||
* Add example ring-only NoC Config by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1325
|
||||
* Bump Gemmini by @hngenc, @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1276 https://github.com/ucb-bar/chipyard/pull/1326
|
||||
* Bump FireMarshal, Bump to newer RV toolchain (deprecate use of esp-tools for Gemmini) by @abejgonzalez, @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1284 https://github.com/ucb-bar/chipyard/pull/1304 https://github.com/ucb-bar/chipyard/pull/1306 https://github.com/ucb-bar/chipyard/pull/1327 https://github.com/ucb-bar/chipyard/pull/1334 https://github.com/ucb-bar/chipyard/pull/1335 https://github.com/ucb-bar/chipyard/pull/1344 https://github.com/ucb-bar/chipyard/pull/1394 https://github.com/ucb-bar/chipyard/pull/1403 https://github.com/ucb-bar/chipyard/pull/1415
|
||||
* Add support for VC707 FPGA board by @Lorilandly in https://github.com/ucb-bar/chipyard/pull/1278
|
||||
* Fail simulations on TSI errors by @tymcauley in https://github.com/ucb-bar/chipyard/pull/1288
|
||||
* Add pre-commit support by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1294 https://github.com/ucb-bar/chipyard/pull/1310
|
||||
* Bump mempress by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1305
|
||||
* CIRCT Integration by @abejgonzalez, @joey0320 in https://github.com/ucb-bar/chipyard/pull/1239 https://github.com/ucb-bar/chipyard/pull/1312 https://github.com/ucb-bar/chipyard/pull/1372 https://github.com/ucb-bar/chipyard/pull/1396
|
||||
* Bump to scala 2.13.10/chisel 3.5.5/latest rocketchip by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1303
|
||||
* Spike-as-a-Tile and use for co-simulation by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1307 https://github.com/ucb-bar/chipyard/pull/1323 https://github.com/ucb-bar/chipyard/pull/1360
|
||||
* Add clone-tile configs by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1322
|
||||
* New Hammer by @harrisonliew in https://github.com/ucb-bar/chipyard/pull/1324 https://github.com/ucb-bar/chipyard/pull/1368 https://github.com/ucb-bar/chipyard/pull/1374 https://github.com/ucb-bar/chipyard/pull/1369 https://github.com/ucb-bar/chipyard/pull/1410
|
||||
* Config finder `make` target by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1328 https://github.com/ucb-bar/chipyard/pull/1381
|
||||
* Arty100T board + TSI-over-UART by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1345
|
||||
* Add graphml visualization section to docs by @schwarz-em in https://github.com/ucb-bar/chipyard/pull/1387
|
||||
* Add a frag./config for MMIO only FireSim bridges by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1393
|
||||
* Add log of chisel elaboration to generated src by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1400
|
||||
* Xcelium support by @sagark in https://github.com/ucb-bar/chipyard/pull/1386
|
||||
* Bump Sodor @a0u in https://github.com/ucb-bar/chipyard/pull/1338
|
||||
* Bump Constellation by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1339
|
||||
|
||||
### Changed
|
||||
* remove RocketTilesKey by @SingularityKChen in https://github.com/ucb-bar/chipyard/pull/1264
|
||||
* Move setup script to scripts/, use a symlink at top-level by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1271
|
||||
* Decoupled sbus width from boom|hwacha|gemmini memory interface widths by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1273
|
||||
* Remove conda from build-toolchains-extra.sh by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1266
|
||||
* Rework build-setup | Add single-node CI by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1282
|
||||
* Switch simulators to C++17. by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1285
|
||||
* Init FPGA submodules in build-setup.sh by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1292
|
||||
* Stripped down rocket configs for FireSim testing by @t14916 in https://github.com/ucb-bar/chipyard/pull/1302
|
||||
* Add more minimal firesim configs for testing by @t14916 in https://github.com/ucb-bar/chipyard/pull/1313
|
||||
* Add workshop info to README.md by @sagark in https://github.com/ucb-bar/chipyard/pull/1314
|
||||
* Removed FireSim tests and harnesses by @nandor in https://github.com/ucb-bar/chipyard/pull/1317
|
||||
* Move boom's tracegen interface to boom submodule by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1331
|
||||
* Split up RocketConfigs.scala by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1340
|
||||
* Sky130/Openroad Tutorial Fixes by @nayiri-k in https://github.com/ucb-bar/chipyard/pull/1392
|
||||
* Testing VLSI commands for chipyard tutorial by @nayiri-k in https://github.com/ucb-bar/chipyard/pull/1395
|
||||
* Reduce test cases for noc-config in CI by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1359
|
||||
* Remove TLHelper, directly use tilelink node constructors by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1358
|
||||
* Remove chisel-testers submodule by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1378
|
||||
* Cache `.ivy2` and `.sbt` within Chipyard root directory by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1362
|
||||
|
||||
### Fixed
|
||||
* Remove extra parenthesis by @odxa20 in https://github.com/ucb-bar/chipyard/pull/1261
|
||||
* Fixed typo in Initial-Repo-Setup.rst by @PisonJay in https://github.com/ucb-bar/chipyard/pull/1269
|
||||
* fix: S-interpolator for assert, assume and printf by @SingularityKChen in https://github.com/ucb-bar/chipyard/pull/1242
|
||||
* Revert "fix: S-interpolator for assert, assume and printf" by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1272
|
||||
* changelog: fixed TinyRocketArtyConfig FPGA reset signal polarity (Please Backport) by @T-K-233 in https://github.com/ucb-bar/chipyard/pull/1257
|
||||
* Fix CY logo in README by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1295
|
||||
* More files to gitignore by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1297
|
||||
* Bump rocket-dsp-utils for ShiftRegisterMem fix. by @milovanovic in https://github.com/ucb-bar/chipyard/pull/1298
|
||||
* Set VLOGMODEL=MODEL by default in variables.mk by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1337
|
||||
* Fix compile breaking due to merge conflict by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1321
|
||||
* Makefile bug fixes by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1336
|
||||
* Fix Verilog Prerequisites + Ignore `mv` stdout by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1406
|
||||
* Fix Chisel hierarchy API - Fixes #1356 by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1361
|
||||
* Remove gen-collateral when rebuilding by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1342
|
||||
* Fix VLSI input files list emission to avoid bash "too many arguments" error by @sagark in https://github.com/ucb-bar/chipyard/pull/1348
|
||||
* Small build system improvements by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1349
|
||||
* Fix socket name length issues on CI by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1353
|
||||
* Fix TestDriver.v missing from gen-collateral after recompiling by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1354
|
||||
* Consolidate CI testing configs to improve CI runtime by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1352
|
||||
* Remove Duplicate Compiler Flags by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1351
|
||||
* fpga makefile clean fix by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1357
|
||||
* Fix newline in message in build-setup.sh by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1365
|
||||
* Update assert message if configs can't be split by `:` by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1373
|
||||
* Remove Duplicate Compiler Flags by @joey0320 in https://github.com/ucb-bar/chipyard/pull/1367
|
||||
* Move more tmp/ folders to a unique location by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1382
|
||||
* Remove stale conda env's after 2 days by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1389
|
||||
* Match CY/FireSim deps | Unpin deps | Update lockfiles by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1391
|
||||
* Only support HTML docs by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1401
|
||||
* Only HTML docs v2 by @abejgonzalez in https://github.com/ucb-bar/chipyard/pull/1402
|
||||
* Fix ANSI color output by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1407
|
||||
* Fix chisel elab errors not causing flow to stop by @jerryz123 in https://github.com/ucb-bar/chipyard/pull/1409
|
||||
* lean gemmini tutorial by @sagark in https://github.com/ucb-bar/chipyard/pull/1413
|
||||
|
||||
## [1.8.1] - 2022-10-18
|
||||
|
||||
Various fixes and improvements, bump FireSim to 1.15.1.
|
||||
|
||||
@@ -84,6 +84,7 @@ These additional publications cover many of the internal components used in Chip
|
||||
* **FireMarshal**: N. Pemberton, et al., *ISPASS'21*. [PDF](https://ieeexplore.ieee.org/document/9408192).
|
||||
* **VLSI**
|
||||
* **Hammer**: E. Wang, et al., *ISQED'20*. [PDF](https://www.isqed.org/English/Archives/2020/Technical_Sessions/113.html).
|
||||
* **Hammer**: H. Liew, et al., *DAC'22*. [PDF](https://dl.acm.org/doi/abs/10.1145/3489517.3530672).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
|
||||
17
common.mk
17
common.mk
@@ -18,7 +18,7 @@ HELP_COMPILATION_VARIABLES += \
|
||||
" EXTRA_SIM_REQS = additional make requirements to build the simulator" \
|
||||
" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best when overridding SBT_BIN with the mainline sbt script)" \
|
||||
" ENABLE_CUSTOM_FIRRTL_PASS = if set, enable custom firrtl passes (SFC lowers to LowFIRRTL & MFC converts to Verilog)" \
|
||||
" ENABLE_YOSYS_FLOW = if set, add compilation flags to enable the vlsi flow for yosys(tutorial flow) \
|
||||
" ENABLE_YOSYS_FLOW = if set, add compilation flags to enable the vlsi flow for yosys(tutorial flow)" \
|
||||
" EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \
|
||||
" EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler"
|
||||
|
||||
@@ -57,6 +57,7 @@ HELP_COMMANDS += \
|
||||
# see HELP_COMPILATION_VARIABLES
|
||||
#########################################################################################
|
||||
include $(base_dir)/generators/cva6/cva6.mk
|
||||
include $(base_dir)/generators/ibex/ibex.mk
|
||||
include $(base_dir)/generators/tracegen/tracegen.mk
|
||||
include $(base_dir)/generators/nvdla/nvdla.mk
|
||||
include $(base_dir)/tools/dromajo/dromajo.mk
|
||||
@@ -104,14 +105,14 @@ $(BOOTROM_TARGETS): $(build_dir)/bootrom.%.img: $(TESTCHIP_RSRCS_DIR)/testchipip
|
||||
# create firrtl file rule and variables
|
||||
#########################################################################################
|
||||
# AG: must re-elaborate if cva6 sources have changed... otherwise just run firrtl compile
|
||||
$(FIRRTL_FILE) $(ANNO_FILE) &: $(SCALA_SOURCES) $(SCALA_BUILDTOOL_DEPS) $(EXTRA_GENERATOR_REQS)
|
||||
$(FIRRTL_FILE) $(ANNO_FILE) $(CHISEL_LOG_FILE) &: $(SCALA_SOURCES) $(SCALA_BUILDTOOL_DEPS) $(EXTRA_GENERATOR_REQS)
|
||||
mkdir -p $(build_dir)
|
||||
$(call run_scala_main,$(SBT_PROJECT),$(GENERATOR_PACKAGE).Generator,\
|
||||
(set -o pipefail && $(call run_scala_main,$(SBT_PROJECT),$(GENERATOR_PACKAGE).Generator,\
|
||||
--target-dir $(build_dir) \
|
||||
--name $(long_name) \
|
||||
--top-module $(MODEL_PACKAGE).$(MODEL) \
|
||||
--legacy-configs $(CONFIG_PACKAGE):$(CONFIG) \
|
||||
$(EXTRA_CHISEL_OPTIONS))
|
||||
$(EXTRA_CHISEL_OPTIONS)) | tee $(CHISEL_LOG_FILE))
|
||||
|
||||
define mfc_extra_anno_contents
|
||||
[
|
||||
@@ -174,7 +175,7 @@ MFC_BASE_LOWERING_OPTIONS = emittedLineLength=2048,noAlwaysComb,disallowLocalVar
|
||||
# hack: lower to low firrtl if Fixed types are found
|
||||
# hack: when using dontTouch, io.cpu annotations are not removed by SFC,
|
||||
# hence we remove them manually by using jq before passing them to firtool
|
||||
$(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) $(FINAL_ANNO_FILE) $(MFC_LOWERING_OPTIONS) &: $(FIRRTL_FILE) $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE)
|
||||
$(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS) $(FINAL_ANNO_FILE) $(MFC_LOWERING_OPTIONS) &: $(FIRRTL_FILE) $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) $(VLOG_SOURCES)
|
||||
ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS))
|
||||
$(eval SFC_LEVEL := $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), low, none))
|
||||
$(eval EXTRA_FIRRTL_OPTIONS += $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), $(SFC_REPL_SEQ_MEM),))
|
||||
@@ -191,7 +192,7 @@ endif
|
||||
if [ $(SFC_LEVEL) = none ]; then cat $(EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE); fi
|
||||
|
||||
$(SFC_MFC_TARGETS) &: private TMP_DIR := $(shell mktemp -d -t cy-XXXXXXXX)
|
||||
$(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS)
|
||||
$(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(SFC_LEVEL) $(EXTRA_FIRRTL_OPTIONS)
|
||||
rm -rf $(GEN_COLLATERAL_DIR)
|
||||
$(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateModelStageMain,\
|
||||
--no-dedup \
|
||||
@@ -204,7 +205,7 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE
|
||||
--allow-unrecognized-annotations \
|
||||
-X $(SFC_LEVEL) \
|
||||
$(EXTRA_FIRRTL_OPTIONS))
|
||||
-mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) # Optionally change file type when SFC generates LowFIRRTL
|
||||
-mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) 2> /dev/null # Optionally change file type when SFC generates LowFIRRTL
|
||||
@if [ $(SFC_LEVEL) = low ]; then cat $(SFC_ANNO_FILE) | jq 'del(.[] | select(.target | test("io.cpu"))?)' > $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json; fi
|
||||
@if [ $(SFC_LEVEL) = low ]; then cat $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json | jq 'del(.[] | select(.class | test("SRAMAnnotation"))?)' > $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json; fi
|
||||
@if [ $(SFC_LEVEL) = low ]; then cat $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json > $(SFC_ANNO_FILE) && rm $(TMP_DIR)/unnec-anno-deleted.sfc.anno.json && rm $(TMP_DIR)/unnec-anno-deleted2.sfc.anno.json; fi
|
||||
@@ -226,7 +227,7 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE
|
||||
--split-verilog \
|
||||
-o $(GEN_COLLATERAL_DIR) \
|
||||
$(SFC_FIRRTL_FILE)
|
||||
-mv $(SFC_SMEMS_CONF) $(MFC_SMEMS_CONF)
|
||||
-mv $(SFC_SMEMS_CONF) $(MFC_SMEMS_CONF) 2> /dev/null
|
||||
$(SED) -i 's/.*/& /' $(MFC_SMEMS_CONF) # need trailing space for SFC macrocompiler
|
||||
# DOC include end: FirrtlCompiler
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
channels:
|
||||
- ucb-bar
|
||||
- conda-forge
|
||||
- litex-hub
|
||||
- nodefaults
|
||||
|
||||
platforms:
|
||||
@@ -46,7 +47,6 @@ dependencies:
|
||||
- doit>=0.34.0
|
||||
- gitpython
|
||||
- humanfriendly
|
||||
- e2fsprogs
|
||||
- ctags
|
||||
- bison
|
||||
- flex
|
||||
@@ -101,8 +101,9 @@ dependencies:
|
||||
|
||||
# hammer packages
|
||||
- sty
|
||||
- open_pdks.sky130a
|
||||
- pip:
|
||||
- hammer-vlsi[asap7]==1.0.1
|
||||
- hammer-vlsi[asap7]==1.1.0
|
||||
|
||||
# doc requirements
|
||||
- sphinx
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
channels:
|
||||
- ucb-bar
|
||||
- conda-forge
|
||||
- litex-hub
|
||||
- nodefaults
|
||||
|
||||
platforms:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
channels:
|
||||
- ucb-bar
|
||||
- conda-forge
|
||||
- litex-hub
|
||||
- nodefaults
|
||||
|
||||
platforms:
|
||||
@@ -14,4 +15,4 @@ dependencies:
|
||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/pkg-specs.html#package-match-specifications
|
||||
# documentation on package_spec syntax for constraining versions
|
||||
|
||||
- riscv-tools=1.0.1 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock
|
||||
- riscv-tools=1.0.3 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock
|
||||
|
||||
@@ -10,15 +10,18 @@ Transforms are a powerful tool to take in the FIRRTL IR that is emitted from Chi
|
||||
|
||||
The Scala FIRRTL Compiler and the MLIR FIRRTL Compiler
|
||||
------------------------------------------------------
|
||||
In Chipyard, two FIRRTL compilers work together to compile Chisel into Verilog. The Scala FIRRTL compiler(SFC) and the MLIR FIRRTL compiler(MFC).
|
||||
They are basically doing the same thing, except that MFC is written in C++ which makes compilation much faster. In the default setting, the SFC will compile Chisel into CHIRRTL and MFC will
|
||||
compile CHIRRTL into Verilog(as of now, we are using SFC as a backup for cases when MFC doesn't work, e.g., when the design is using Fixed types). By setting the ``ENABLE_CUSTOM_FIRRTL_PASS`` env variable to a non-zero value, we can make the SFC compile Chisel into LowFIRRTL so that our custom FIRRTL passes are applied.
|
||||
In Chipyard, two FIRRTL compilers work together to compile Chisel into Verilog. The Scala FIRRTL compiler (SFC) and the MLIR FIRRTL compiler (MFC).
|
||||
They are basically doing the same thing, except that MFC is written in C++ which makes compilation much faster (the generated Verilog will be different). In the default setting, the SFC will compile Chisel into CHIRRTL and MFC will
|
||||
compile CHIRRTL into Verilog (as of now, we are using SFC as a backup for cases when MFC doesn't work, e.g., when the design is using Fixed types). By setting the ``ENABLE_CUSTOM_FIRRTL_PASS`` env variable to a non-zero value,
|
||||
we can make the SFC compile Chisel into LowFIRRTL so that our custom FIRRTL passes are applied.
|
||||
|
||||
For more information on MLIR FIRRTL Compiler, please visit https://mlir.llvm.org/ and https://circt.llvm.org/.
|
||||
|
||||
Where to add transforms
|
||||
-----------------------
|
||||
|
||||
In Chipyard, the FIRRTL compiler is called multiple times to create a "Top" file that contains the DUT and a "Harness" file containing the test harness, which instantiates the DUT.
|
||||
The "Harness" file does not contain the DUT's module definition or any of its submodules.
|
||||
In Chipyard, the FIRRTL compiler is called multiple times to create a "Top" file that contains the DUT and a "Model" file containing the test harness, which instantiates the DUT.
|
||||
The "Model" file does not contain the DUT's module definition or any of its submodules.
|
||||
This is done by the ``tapeout`` SBT project (located in ``tools/barstools/tapeout``) which calls ``GenerateModelStageMain`` (a function that wraps the multiple FIRRTL compiler calls and extra transforms).
|
||||
|
||||
.. literalinclude:: ../../common.mk
|
||||
|
||||
@@ -3,8 +3,10 @@ FIRRTL
|
||||
|
||||
`FIRRTL <https://github.com/freechipsproject/firrtl>`__ is an intermediate representation of your circuit.
|
||||
It is emitted by the Chisel compiler and is used to translate Chisel source files into another representation such as Verilog.
|
||||
Without going into too much detail, FIRRTL is consumed by a FIRRTL compiler (another Scala program) which passes the circuit through a series of circuit-level transformations.
|
||||
Without going into too much detail, FIRRTL is consumed by FIRRTL compilers which passes the circuit through a series of circuit-level transformations.
|
||||
An example of a FIRRTL pass (transformation) is one that optimizes out unused signals.
|
||||
Once the transformations are done, a Verilog file is emitted and the build process is done.
|
||||
|
||||
For more information on please visit their `website <https://chisel-lang.org/firrtl/>`__.
|
||||
To see how FIRRTL is transformed to Verilog in Chipyard, please visit the :ref:`firrtl-transforms` section.
|
||||
|
||||
For more information on FIRRTL, please visit their `website <https://chisel-lang.org/firrtl/>`__.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
ASAP7 Tutorial
|
||||
==============
|
||||
The ``vlsi`` folder of this repository contains an example Hammer flow with the SHA-3 accelerator and a dummy hard macro. This example tutorial uses the built-in ASAP7 technology plugin and requires access to the included Cadence and Mentor tool plugin submodules. Cadence is necessary for synthesis & place-and-route, while Mentor is needed for DRC & LVS.
|
||||
The ``vlsi`` folder of this repository contains an example Hammer flow with the SHA-3 accelerator and a dummy hard macro. This example tutorial uses the built-in ASAP7 technology plugin and requires access to the included Mentor tool plugin submodule, which is needed for DRC & LVS.
|
||||
|
||||
Project Structure
|
||||
-----------------
|
||||
@@ -126,9 +126,9 @@ To run DRC & LVS, and view the results in Calibre:
|
||||
.. code-block:: shell
|
||||
|
||||
make drc CONFIG=TinyRocketConfig
|
||||
./build/drc-rundir/generated-scripts/view-drc
|
||||
./build/chipyard.TestHarness.TinyRocketConfig-ChipTop/drc-rundir/generated-scripts/view-drc
|
||||
make lvs CONFIG=TinyRocketConfig
|
||||
./build/lvs-rundir/generated-scripts/view-lvs
|
||||
./build/chipyard.TestHarness.TinyRocketConfig-ChipTop/lvs-rundir/generated-scripts/view-lvs
|
||||
|
||||
Some DRC errors are expected from this PDK, as explained in the `ASAP7 plugin readme <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/asap7>`__.
|
||||
Furthermore, the dummy SRAMs that are provided in this tutorial and PDK do not have any geometry inside, so will certainly cause DRC errors.
|
||||
|
||||
@@ -162,7 +162,7 @@ Simulation-exacted power estimation often requires a dedicated testharness for t
|
||||
The simulation-extracted power estimation flow implicitly uses Hammer's gate-level simulation flow (in order to generate the ``saif`` activity data file). This gate-level simulation flow can also be run independantly from the power estimation flow using the ``make sim-par`` command.
|
||||
|
||||
|
||||
.. Note:: The gate-level simulation flow (and there the simulation-extracted power-estimation) is currently integrated only with the Synopsys VCS simulation (Verilator does not support gate-level simulation. Support for Cadence Incisive is work-in-progress)
|
||||
.. Note:: The gate-level simulation flow (and there the simulation-extracted power-estimation) is currently integrated only with the Synopsys VCS simulation (Verilator does not support gate-level simulation. Support for Cadence Xcelium is work-in-progress)
|
||||
|
||||
|
||||
Signoff
|
||||
|
||||
@@ -46,7 +46,7 @@ The current set of all available Hammer APIs is codified `here <https://github.c
|
||||
Tool Plugins
|
||||
============
|
||||
|
||||
Hammer supports separately managed plugins for different CAD tool vendors. You may be able to acquire access to the included Cadence, Synopsys, and Mentor plugins repositories with permission from the respective CAD tool vendor.
|
||||
Hammer supports separately managed plugins for different CAD tool vendors. You may be able to acquire access to the included Mentor plugins submodule with permission from the respective CAD tool vendor.
|
||||
The types of tools (by Hammer names) supported currently include:
|
||||
|
||||
* synthesis
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _sky130-commercial-tutorial:
|
||||
|
||||
Sky130 Tutorial
|
||||
===============
|
||||
The ``vlsi`` folder of this repository contains an example Hammer flow with the TinyRocketConfig from Chipyard. This example tutorial uses the built-in Sky130 technology plugin and requires access to the included Cadence and Mentor tool plugin submodules. Cadence is necessary for synthesis & place-and-route, while Mentor is needed for DRC & LVS.
|
||||
Sky130 Commercial Tutorial
|
||||
==========================
|
||||
The ``vlsi`` folder of this repository contains an example Hammer flow with the TinyRocketConfig from Chipyard. This example tutorial uses the built-in Sky130 technology plugin and requires access to the included Mentor tool plugin submodule, which is needed for DRC & LVS.
|
||||
|
||||
Project Structure
|
||||
-----------------
|
||||
@@ -47,7 +47,23 @@ Prerequisites
|
||||
|
||||
* Python 3.9+
|
||||
* Genus, Innovus, Voltus, VCS, and Calibre licenses
|
||||
* Sky130 PDK, install using `these directions <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
* Sky130A PDK, install `using conda <https://anaconda.org/litex-hub/open_pdks.sky130a>`__ or `these directions <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
* `Sram22 Sky130 SRAM macros <https://github.com/rahulk29/sram22_sky130_macros>`__
|
||||
|
||||
* These SRAM macros were generated using the `Sram22 SRAM generator <https://github.com/rahulk29/sram22>`__ (still very heavily under development)
|
||||
|
||||
Quick Prerequisite Setup
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
As of recently, the Sky130A PDK may be installed via conda.
|
||||
The prerequisite setup for this tutorial may eventually be scripted, but for now the directions to set them up are below.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# download all files for Sky130A PDK
|
||||
conda create -c litex-hub --prefix ~/.conda-sky130 open_pdks.sky130a=1.0.399_0_g63dbde9
|
||||
# clone the SRAM22 Sky130 SRAM macros
|
||||
git clone https://github.com/rahulk29/sram22_sky130_macros ~/sram22_sky130_macros
|
||||
|
||||
|
||||
Initial Setup
|
||||
-------------
|
||||
@@ -59,6 +75,38 @@ In the Chipyard root, ensure that you have the Chipyard conda environment activa
|
||||
|
||||
to pull and install the plugin submodules. Note that for technologies other than ``sky130`` or ``asap7``, the tech submodule must be added in the ``vlsi`` folder first.
|
||||
|
||||
Now navigate to the ``vlsi`` directory. The remainder of the tutorial will assume you are in this directory.
|
||||
We will summarize a few files in this directory that will be important for the rest of the tutorial.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd ~chipyard/vlsi
|
||||
|
||||
example-vlsi-sky130
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
This is the entry script with placeholders for hooks. In the ``ExampleDriver`` class, a list of hooks is passed in the ``get_extra_par_hooks``. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in this example. Refer to the Hammer documentation on hooks for a detailed description of how these are injected into the VLSI flow.
|
||||
|
||||
|
||||
example-sky130.yml
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for this example project. Example clock constraints, power straps definitions, placement constraints, and pin constraints are given. Additional configuration for the extra libraries and tools are at the bottom.
|
||||
|
||||
Add the following YAML keys to the top of this file to specify the location of the Sky130A PDK and SRAM macros.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# all ~ should be replaced with absolute paths to these directories
|
||||
# technology paths
|
||||
technology.sky130.sky130A: ~/.conda-sky130/share/pdk/sky130A
|
||||
technology.sky130.sram22_sky130_macros: ~/sram22_sky130_macros
|
||||
|
||||
|
||||
example-tools.yml
|
||||
^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for a commercial tool flow.
|
||||
It selects tools for synthesis (Cadence Genus), place and route (Cadence Innovus), DRC and LVS (Mentor Calibre).
|
||||
|
||||
|
||||
Building the Design
|
||||
--------------------
|
||||
To elaborate the ``TinyRocketConfig`` and set up all prerequisites for the build system to push the design and SRAM macros through the flow:
|
||||
@@ -71,12 +119,21 @@ The command ``make buildfile`` generates a set of Make targets in ``build/hammer
|
||||
It needs to be re-run if environment variables are changed.
|
||||
It is recommended that you edit these variables directly in the Makefile rather than exporting them to your shell environment.
|
||||
|
||||
The ``buildfile`` make target has dependencies on both (1) the Verilog that is elaborated from all Chisel sources
|
||||
and (2) the mapping of memory instances in the design to SRAM macros;
|
||||
all files related to these two steps reside in the ``generated-src/chipyard.TestHarness.TinyRocketConfig-ChipTop`` directory.
|
||||
Note that the files in ``generated-src`` vary for each tool/technology flow.
|
||||
This especially applies to the Sky130 Commercial vs OpenROAD tutorial flows
|
||||
(due to the ``ENABLE_YOSYS_FLOW`` flag present for the OpenROAD flow), so these flows should be run in separate
|
||||
chipyard installations. If the wrong sources are generated, simply run ``make buildfile -B`` to rebuild all targets correctly.
|
||||
|
||||
|
||||
For the purpose of brevity, in this tutorial we will set the Make variable ``tutorial=sky130-commercial``,
|
||||
which will cause additional variables to be set in ``tutorial.mk``, a few of which are summarized as follows:
|
||||
|
||||
* ``CONFIG=TinyRocketConfig`` selects the target generator config in the same manner as the rest of the Chipyard framework. This elaborates a stripped-down Rocket Chip in the interest of minimizing tool runtime.
|
||||
* ``tech_name=sky130`` sets a few more necessary paths in the ``Makefile``, such as the appropriate Hammer plugin
|
||||
* ``TOOLS_CONF`` and ``TECH_CONF`` select the approproate YAML configuration files, ``example-tools.yml`` and ``example-sky130.yml``, which are described below
|
||||
* ``TOOLS_CONF`` and ``TECH_CONF`` select the approproate YAML configuration files, ``example-tools.yml`` and ``example-sky130.yml``, which are described above
|
||||
* ``DESIGN_CONF`` and ``EXTRA_CONFS`` allow for additonal design-specific overrides of the Hammer IR in ``example-sky130.yml``
|
||||
* ``VLSI_OBJ_DIR=build-sky130-commercial`` gives the build directory a unique name to allow running multiple flows in the same repo. Note that for the rest of the tutorial we will still refer to this directory in file paths as ``build``, again for brevity.
|
||||
* ``VLSI_TOP`` is by default ``ChipTop``, which is the name of the top-level Verilog module generated in the Chipyard SoC configs. By instead setting ``VLSI_TOP=Rocket``, we can use the Rocket core as the top-level module for the VLSI flow, which consists only of a single RISC-V core (and no caches, peripherals, buses, etc). This is useful to run through this tutorial quickly, and does not rely on any SRAMs.
|
||||
@@ -84,24 +141,6 @@ which will cause additional variables to be set in ``tutorial.mk``, a few of whi
|
||||
Running the VLSI Flow
|
||||
---------------------
|
||||
|
||||
example-vlsi-sky130
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
This is the entry script with placeholders for hooks. In the ``ExampleDriver`` class, a list of hooks is passed in the ``get_extra_par_hooks``. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in this example. Refer to the Hammer documentation on hooks for a detailed description of how these are injected into the VLSI flow.
|
||||
|
||||
|
||||
example-sky130.yml
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for this example project. Example clock constraints, power straps definitions, placement constraints, and pin constraints are given. Additional configuration for the extra libraries and tools are at the bottom.
|
||||
|
||||
First, set ``technology.sky130.sky130A/sky130_nda/openram_lib`` to the absolute path of the respective directories containing the Sky130 PDK and SRAM files. See the
|
||||
`Sky130 Hammer plugin README <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
for details about the PDK setup.
|
||||
|
||||
example-tools.yml
|
||||
^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for a commercial tool flow.
|
||||
It selects tools for synthesis (Cadence Genus), place and route (Cadence Innovus), DRC and LVS (Mentor Calibre).
|
||||
|
||||
Synthesis
|
||||
^^^^^^^^^
|
||||
.. code-block:: shell
|
||||
@@ -160,3 +199,20 @@ Post-P&R power and rail (IR drop) analysis is supported with Voltus:
|
||||
If you append the ``BINARY`` variable to the command, it will use the activity file generated from a ``sim-<syn/par>-debug`` run and report dynamic power & IR drop from the toggles encoded in the waveform.
|
||||
|
||||
To bypass gate-level simulation, you will need to run the power tool manually (see the generated commands in the generated ``hammer.d`` buildfile). Static and active (vectorless) power & IR drop will be reported.
|
||||
|
||||
|
||||
VLSI Flow Control
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Firt, refer to the :ref:`VLSI/Hammer:VLSI Flow Control` documentation. The below examples use the ``redo-par`` Make target to re-run only place-and-route. ``redo-`` may be prepended to any of the VLSI flow actions to re-run only that action.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# the following two statements are equivalent because the
|
||||
# extraction step immediately precedes the write_design step
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_after_step extraction"
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_before_step write_design"
|
||||
|
||||
# example of re-running only floorplanning to test out a new floorplan configuration
|
||||
# the "-p file.yml" causes file.yml to override any previous yaml/json configurations
|
||||
make redo-par \
|
||||
HAMMER_EXTRA_ARGS="--only_step floorplan_design -p example-designs/sky130-openroad.yml"
|
||||
|
||||
@@ -20,7 +20,7 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo
|
||||
|
||||
* ``env.yml``
|
||||
|
||||
* A template file for tool environment configuration. Fill in the install and license server paths for your environment. For SLICE and BWRC affiliates, example environment configs are found `here <https://github.com/ucb-bar/hammer/tree/master/e2e/env>`__.
|
||||
* This file is not used in this tutorial, but is required for the commercial tool flow. A template file for tool environment configuration. Fill in the install and license server paths for your environment. For SLICE and BWRC affiliates, example environment configs are found `here <https://github.com/ucb-bar/hammer/tree/master/e2e/env>`__.
|
||||
|
||||
* ``example-vlsi-sky130``
|
||||
|
||||
@@ -28,7 +28,7 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo
|
||||
|
||||
* ``example-sky130.yml``, ``example-openroad.yml``, ``example-designs/sky130-openroad.yml``
|
||||
|
||||
* Hammer IR for this tutorial. For SLICE and BWRC affiliates, an example ASAP7 config is found `here <https://github.com/ucb-bar/hammer/tree/master/e2e/pdks>`__.
|
||||
* Hammer IR for this tutorial. For SLICE and BWRC affiliates, an example Sky130 config is found `here <https://github.com/ucb-bar/hammer/tree/master/e2e/pdks>`__.
|
||||
|
||||
* ``example-design.yml``, ``example-asap7.yml``, ``example-tech.yml``
|
||||
|
||||
@@ -48,12 +48,35 @@ Prerequisites
|
||||
* Python 3.9+
|
||||
* OpenROAD flow tools:
|
||||
|
||||
* Yosys (synthesis), install `from source <https://yosyshq.net/yosys/download.html>`__ or `using conda <https://anaconda.org/TimVideos/yosys>`__
|
||||
* OpenROAD (place-and-route), install `from source <https://openroad.readthedocs.io/en/latest/main/README.html#install-dependencies>`__
|
||||
* Magic (DRC), install `from source <http://www.opencircuitdesign.com/magic/install.html>`__
|
||||
* NetGen (LVS), install `from source <http://www.opencircuitdesign.com/netgen/install.html>`__ or `using conda <https://anaconda.org/conda-forge/netgen>`__
|
||||
* Yosys (synthesis), install `using conda <https://anaconda.org/litex-hub/yosys>`__ or `from source <https://yosyshq.net/yosys/download.html>`__
|
||||
* OpenROAD (place-and-route), install `using conda <https://anaconda.org/litex-hub/openroad>`__ (note that GUI is disabled in conda package) or `from source <https://openroad.readthedocs.io/en/latest/main/README.html#install-dependencies>`__
|
||||
* KLayout (DEF to GDSII conversion), install `using conda <https://anaconda.org/litex-hub/klayout>`__ or `from source <https://www.klayout.de/build.html>`__
|
||||
* Magic (DRC), , install `using conda <https://anaconda.org/litex-hub/magic>`__ or `from source <http://www.opencircuitdesign.com/magic/install.html>`__
|
||||
* NetGen (LVS), , install `using conda <https://anaconda.org/litex-hub/netgen>`__ or `from source <http://www.opencircuitdesign.com/netgen/install.html>`__
|
||||
|
||||
* Sky130 PDK, install using `these directions <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
* Sky130A PDK, install `using conda <https://anaconda.org/litex-hub/open_pdks.sky130a>`__ or `these directions <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
* `Sram22 Sky130 SRAM macros <https://github.com/rahulk29/sram22_sky130_macros>`__
|
||||
|
||||
* These SRAM macros were generated using the `Sram22 SRAM generator <https://github.com/rahulk29/sram22>`__ (still very heavily under development)
|
||||
|
||||
Quick Prerequisite Setup
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
As of recently, most of the prerequisites of this tutorial may now be installed as conda packages.
|
||||
The prerequisite setup for this tutorial may eventually be scripted, but for now the directions to set them up are below.
|
||||
Note that we create a new conda environment for each tool because some of them have conflicting dependencies.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# download all files for Sky130A PDK
|
||||
conda create -c litex-hub --prefix ~/.conda-sky130 open_pdks.sky130a=1.0.399_0_g63dbde9
|
||||
# clone the SRAM22 Sky130 SRAM macros
|
||||
git clone https://github.com/rahulk29/sram22_sky130_macros ~/sram22_sky130_macros
|
||||
|
||||
# install all VLSI tools
|
||||
conda create -c litex-hub --prefix ~/.conda-yosys yosys=0.27_4_gb58664d44
|
||||
conda create -c litex-hub --prefix ~/.conda-openroad openroad=2.0_7070_g0264023b6
|
||||
conda create -c litex-hub --prefix ~/.conda-klayout klayout=0.28.5_98_g87e2def28
|
||||
conda create -c litex-hub --prefix ~/.conda-signoff magic=8.3.376_0_g5e5879c netgen=1.5.250_0_g178b172
|
||||
|
||||
Initial Setup
|
||||
-------------
|
||||
@@ -66,31 +89,13 @@ In the Chipyard root, ensure that you have the Chipyard conda environment activa
|
||||
to pull and install the plugin submodules. Note that for technologies other than ``sky130`` or ``asap7``, the tech submodule is cloned in the ``vlsi`` folder,
|
||||
and for the commercial tool flow (set up by omitting the ``openroad`` argument), the tool plugin submodules are cloned into the ``vlsi`` folder.
|
||||
|
||||
Building the Design
|
||||
--------------------
|
||||
To elaborate the ``TinyRocketConfig`` and set up all prerequisites for the build system to push the design and SRAM macros through the flow:
|
||||
Now navigate to the ``vlsi`` directory. The remainder of the tutorial will assume you are in this directory.
|
||||
We will summarize a few files in this directory that will be important for the rest of the tutorial.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
make buildfile tutorial=sky130-openroad
|
||||
cd ~chipyard/vlsi
|
||||
|
||||
The command ``make buildfile`` generates a set of Make targets in ``build/hammer.d``.
|
||||
It needs to be re-run if environment variables are changed.
|
||||
It is recommended that you edit these variables directly in the Makefile rather than exporting them to your shell environment.
|
||||
|
||||
For the purpose of brevity, in this tutorial we will set the Make variable ``tutorial=sky130-openroad``,
|
||||
which will cause additional variables to be set in ``tutorial.mk``, a few of which are summarized as follows:
|
||||
|
||||
* ``CONFIG=TinyRocketConfig`` selects the target generator config in the same manner as the rest of the Chipyard framework. This elaborates a stripped-down Rocket Chip in the interest of minimizing tool runtime.
|
||||
* ``tech_name=sky130`` sets a few more necessary paths in the ``Makefile``, such as the appropriate Hammer plugin
|
||||
* ``TOOLS_CONF`` and ``TECH_CONF`` select the approproate YAML configuration files, ``example-openroad.yml`` and ``example-sky130.yml``, which are described below
|
||||
* ``DESIGN_CONF`` and ``EXTRA_CONFS`` allow for additonal design-specific overrides of the Hammer IR in ``example-sky130.yml``
|
||||
* ``VLSI_OBJ_DIR=build-sky130-openroad`` gives the build directory a unique name to allow running multiple flows in the same repo. Note that for the rest of the tutorial we will still refer to this directory in file paths as ``build``, again for brevity.
|
||||
* ``VLSI_TOP`` is by default ``ChipTop``, which is the name of the top-level Verilog module generated in the Chipyard SoC configs. By instead setting ``VLSI_TOP=Rocket``, we can use the Rocket core as the top-level module for the VLSI flow, which consists only of a single RISC-V core (and no caches, peripherals, buses, etc). This is useful to run through this tutorial quickly, and does not rely on any SRAMs.
|
||||
* ``ENABLE_CUSTOM_FIRRTL_PASS = 1`` is required for synthesis through Yosys. This reverts to the Scala FIRRTL Compiler so that unsupported multidimensional arrays are not generated in the Verilog.
|
||||
|
||||
Running the VLSI Flow
|
||||
---------------------
|
||||
|
||||
example-vlsi-sky130
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
@@ -101,16 +106,70 @@ example-sky130.yml
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for this example project. Example clock constraints, power straps definitions, placement constraints, and pin constraints are given. Additional configuration for the extra libraries and tools are at the bottom.
|
||||
|
||||
First, set ``technology.sky130.<sky130A, openram_lib>`` to the absolute path of the respective directories containing the Sky130 PDK and SRAM files. See the
|
||||
`Sky130 Hammer plugin README <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__
|
||||
for details about the PDK setup.
|
||||
Add the following YAML keys to the top of this file to specify the location of the Sky130A PDK and SRAM macros.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# all ~ should be replaced with absolute paths to these directories
|
||||
# technology paths
|
||||
technology.sky130.sky130A: ~/.conda-sky130/share/pdk/sky130A
|
||||
technology.sky130.sram22_sky130_macros: ~/sram22_sky130_macros
|
||||
|
||||
example-openroad.yml
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
This contains the Hammer configuration for the OpenROAD tool flow.
|
||||
It selects tools for synthesis (Yosys), place and route (OpenROAD), DRC (Magic), and LVS (NetGen).
|
||||
|
||||
Add the following YAML keys to the top of this file to specify the locations of the tool binaries.
|
||||
Note that this is not required if the tools are already on your PATH.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# all ~ should be replaced with absolute paths to these directories
|
||||
# tool binary paths
|
||||
synthesis.yosys.yosys_bin: ~/.conda-yosys/bin/yosys
|
||||
par.openroad.openroad_bin: ~/.conda-openroad/bin/openroad
|
||||
par.openroad.klayout_bin: ~/.conda-klayout/bin/klayout
|
||||
drc.magic.magic_bin: ~/.conda-signoff/bin/magic
|
||||
lvs.netgen.netgen_bin: ~/.conda-signoff/bin/netgen
|
||||
|
||||
|
||||
Building the Design
|
||||
--------------------
|
||||
|
||||
To elaborate the ``TinyRocketConfig`` and set up all prerequisites for the build system to push the design and SRAM macros through the flow:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
make buildfile tutorial=sky130-openroad
|
||||
|
||||
The command ``make buildfile`` generates a set of Make targets in ``build/hammer.d``.
|
||||
It needs to be re-run if environment variables are changed.
|
||||
It is recommended that you edit these variables directly in the Makefile rather than exporting them to your shell environment.
|
||||
|
||||
The ``buildfile`` make target has dependencies on both (1) the Verilog that is elaborated from all Chisel sources
|
||||
and (2) the mapping of memory instances in the design to SRAM macros;
|
||||
all files related to these two steps reside in the ``generated-src/chipyard.TestHarness.TinyRocketConfig-ChipTop`` directory.
|
||||
Note that the files in ``generated-src`` vary for each tool/technology flow.
|
||||
This especially applies to the Sky130 Commercial vs OpenROAD tutorial flows
|
||||
(due to the ``ENABLE_YOSYS_FLOW`` flag, explained below), so these flows should be run in separate
|
||||
chipyard installations. If the wrong sources are generated, simply run ``make buildfile -B`` to rebuild all targets correctly.
|
||||
|
||||
|
||||
For the sake of brevity, in this tutorial we will set the Make variable ``tutorial=sky130-openroad``,
|
||||
which will cause additional variables to be set in ``tutorial.mk``, a few of which are summarized as follows:
|
||||
|
||||
* ``CONFIG=TinyRocketConfig`` selects the target generator config in the same manner as the rest of the Chipyard framework. This elaborates a stripped-down Rocket Chip in the interest of minimizing tool runtime.
|
||||
* ``tech_name=sky130`` sets a few more necessary paths in the ``Makefile``, such as the appropriate Hammer plugin
|
||||
* ``TOOLS_CONF`` and ``TECH_CONF`` select the approproate YAML configuration files, ``example-openroad.yml`` and ``example-sky130.yml``, which are described above
|
||||
* ``DESIGN_CONF`` and ``EXTRA_CONFS`` allow for additonal design-specific overrides of the Hammer IR in ``example-sky130.yml``
|
||||
* ``VLSI_OBJ_DIR=build-sky130-openroad`` gives the build directory a unique name to allow running multiple flows in the same repo. Note that for the rest of the tutorial we will still refer to this directory in file paths as ``build``, again for brevity.
|
||||
* ``VLSI_TOP`` is by default ``ChipTop``, which is the name of the top-level Verilog module generated in the Chipyard SoC configs. By instead setting ``VLSI_TOP=Rocket``, we can use the Rocket core as the top-level module for the VLSI flow, which consists only of a single RISC-V core (and no caches, peripherals, buses, etc). This is useful to run through this tutorial quickly, and does not rely on any SRAMs.
|
||||
* ``ENABLE_YOSYS_FLOW = 1`` is required for synthesis through Yosys. This reverts to the Scala FIRRTL Compiler so that unsupported multidimensional arrays are not generated in the Verilog.
|
||||
|
||||
Running the VLSI Flow
|
||||
---------------------
|
||||
|
||||
Synthesis
|
||||
^^^^^^^^^
|
||||
|
||||
@@ -128,38 +187,79 @@ Place-and-Route
|
||||
|
||||
make par tutorial=sky130-openroad
|
||||
|
||||
Note that sometimes OpenROAD freezes on commands following the ``detailed_route`` step,
|
||||
so for now we recomment running place-and-route until the ``extraction`` step,
|
||||
then re-starting the flow at this step. See the :ref:`VLSI/Sky130-OpenROAD-Tutorial:VLSI Flow Control` documentation
|
||||
below for how to break up the flow into these steps.
|
||||
|
||||
After completion, the final database can be opened in an interactive OpenROAD session.
|
||||
Hammer generates a convenient script to launch these sessions
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd ./build/par-rundir
|
||||
cd ./build/chipyard.TestHarness.TinyRocketConfig-ChipTop/par-rundir
|
||||
./generated-scripts/open_chip
|
||||
|
||||
Note that the conda OpenROAD package was compiled with the GUI disabled, so in order to view the layout,
|
||||
you will need to install OpenROAD from source.
|
||||
|
||||
Below is the post-PnR layout for the TinyRocketConfig in Sky130 generated by OpenROAD.
|
||||
|
||||
.. image:: ../_static/images/vlsi-openroad-par-tinyrocketconfig.png
|
||||
|
||||
Intermediate databases are written in ``build/par-rundir`` between each step of the ``par`` action. These databases can be restored in an interactive OpenROAD session as desired for debugging purposes.
|
||||
Intermediate databases are written in ``build/par-rundir`` between each step of the ``par`` action,
|
||||
These databases can be restored using the same ``open_chip`` script for debugging purposes.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
openroad # launch OpenROAD tool
|
||||
openroad> read_db pre_global_route
|
||||
cd build/chipyard.TestHarness.TinyRocketConfig-ChipTop/par-rundir
|
||||
./generated_scripts/open_chip -h
|
||||
"
|
||||
Usage: ./generated-scripts/open_chip [-t] [openroad_db_name]
|
||||
|
||||
.. Timing reports are found in ``build/par-rundir/timingReports``. They are gzipped text files.
|
||||
Options
|
||||
openroad_db_name : Name of database to load (default=latest)
|
||||
-t, --timing : Load timing info (default=disabled because of slow load time)
|
||||
-h, --help : Display this message
|
||||
"
|
||||
# load pre-global route database without timing information
|
||||
./generated_scripts/open_chip pre_global_route
|
||||
|
||||
# load post-clock tree database with timing inforamtion
|
||||
./generated_scripts/open_chip -t post_clock_tree
|
||||
|
||||
Various reports, including timing reports, are found in ``build/par-rundir/reports``.
|
||||
|
||||
See the `OpenROAD tool plugin <https://github.com/ucb-bar/hammer/blob/master/hammer/par/openroad>`__ for the full list of OpenROAD tool steps and their implementations.
|
||||
|
||||
DRC & LVS
|
||||
^^^^^^^^^
|
||||
To run DRC & LVS:
|
||||
|
||||
As a note, this tutorial has been run extensively through commercial signoff tools,
|
||||
thus the open-source signoff flow is not stable or guaranteed to produce useful results.
|
||||
We welcome any contributions to improving both our `Magic tool plugin <https://github.com/ucb-bar/hammer/blob/master/hammer/drc/magic>`__
|
||||
and `Netgen tool plugin <https://github.com/ucb-bar/hammer/blob/master/hammer/lvs/netgen>`__.
|
||||
|
||||
To run DRC & LVS in Magic & Netgen, respectively:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
make drc tutorial=sky130-openroad
|
||||
./build/chipyard.TestHarness.TinyRocketConfig-ChipTop/drc-rundir/generated-scripts/view_drc
|
||||
make lvs tutorial=sky130-openroad
|
||||
./build/chipyard.TestHarness.TinyRocketConfig-ChipTop/lvs-rundir/generated-scripts/view_lvs
|
||||
|
||||
Some DRC errors are expected from this PDK, especially with regards to the SRAMs, as explained in the
|
||||
`Sky130 Hammer plugin README <https://github.com/ucb-bar/hammer/blob/master/hammer/technology/sky130>`__.
|
||||
Note that in ``sky130-openroad.yml`` we have set the following YAML keys:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
drc.magic.generate_only: true
|
||||
lvs.netgen.generate_only: true
|
||||
|
||||
These keys cause the Hammer plugin to only generate all necessary scripts, without executing them with the respective tool.
|
||||
This is because Magic and Netgen, as of the writing of this tutorial, do not have a database format that may be loaded interactively,
|
||||
so to view the DRC/LVS results for debugging you must launch the tool interactively, then run DRC/LVS checks,
|
||||
which is done by the ``generated-scripts/view_[drc|lvs]`` scripts.
|
||||
|
||||
|
||||
VLSI Flow Control
|
||||
@@ -168,15 +268,20 @@ Firt, refer to the :ref:`VLSI/Hammer:VLSI Flow Control` documentation. The below
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# the following two statements are equivalent because the
|
||||
# extraction step immediately precedes the write_design step
|
||||
# the following two commands run the entire flow, using the pre_extraction
|
||||
# database to save and reload a checkpoint of the design
|
||||
make par HAMMER_EXTRA_ARGS="--stop_after_step extraction"
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_before_step extraction"
|
||||
|
||||
# the following two commands are equivalent because the extraction
|
||||
# step immediately precedes the write_design step
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_after_step extraction"
|
||||
make redo-par HAMMER_EXTRA_ARGS="--start_before_step write_design"
|
||||
|
||||
# example of re-running only floorplanning to test out a new floorplan configuration
|
||||
make redo-par HAMMER_EXTRA_ARGS="--only_step floorplan_design -p example-sky130.yml"
|
||||
|
||||
See the `OpenROAD tool plugin <https://github.com/ucb-bar/hammer/blob/master/hammer/par/openroad>`__ for the full list of OpenROAD tool steps and their implementations.
|
||||
# the "-p file.yml" causes file.yml to override any previous yaml/json configurations
|
||||
make redo-par \
|
||||
HAMMER_EXTRA_ARGS="--only_step floorplan_design -p example-designs/sky130-openroad.yml"
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.6 MiB |
@@ -70,7 +70,7 @@ extern "C" void cospike_cosim(long long int cycle,
|
||||
if (!sim) {
|
||||
printf("Configuring spike cosim\n");
|
||||
std::vector<mem_cfg_t> mem_cfg;
|
||||
std::vector<int> hartids;
|
||||
std::vector<size_t> hartids;
|
||||
mem_cfg.push_back(mem_cfg_t(info->mem0_base, info->mem0_size));
|
||||
for (int i = 0; i < info->nharts; i++)
|
||||
hartids.push_back(i);
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
void dcache_d(uint64_t sourceid, uint64_t data[8], unsigned char has_data, unsigned char grantack);
|
||||
void drain_stq();
|
||||
bool stq_empty() { return st_q.size() == 0; };
|
||||
|
||||
|
||||
~chipyard_simif_t() { };
|
||||
chipyard_simif_t(size_t icache_ways,
|
||||
size_t icache_sets,
|
||||
@@ -262,7 +262,7 @@ extern "C" void spike_tile(int hartid, char* isa,
|
||||
endianness_little,
|
||||
pmpregions,
|
||||
std::vector<mem_cfg_t>(),
|
||||
std::vector<int>(),
|
||||
std::vector<size_t>(),
|
||||
false,
|
||||
0);
|
||||
processor_t* p = new processor_t(isa_parser,
|
||||
@@ -488,7 +488,7 @@ bool chipyard_simif_t::mmio_load(reg_t addr, size_t len, uint8_t* bytes) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!found) {
|
||||
return false;
|
||||
}
|
||||
@@ -576,7 +576,7 @@ bool chipyard_simif_t::handle_cache_access(reg_t addr, size_t len,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define SETIDX(ADDR) ((ADDR >> 6) & (n_sets - 1))
|
||||
uint64_t setidx = SETIDX(addr);
|
||||
uint64_t offset = addr & (64 - 1);
|
||||
|
||||
@@ -21,6 +21,18 @@ class FPGemminiRocketConfig extends Config(
|
||||
new chipyard.config.WithSystemBusWidth(128) ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
|
||||
class LeanGemminiRocketConfig extends Config(
|
||||
new gemmini.LeanGemminiConfig ++ // use Lean Gemmini systolic array GEMM accelerator
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.WithSystemBusWidth(128) ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
|
||||
class LeanGemminiPrintfRocketConfig extends Config(
|
||||
new gemmini.LeanGemminiPrintfConfig ++ // use Lean Gemmini systolic array GEMM accelerator
|
||||
new freechips.rocketchip.subsystem.WithNBigCores(1) ++
|
||||
new chipyard.config.WithSystemBusWidth(128) ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
|
||||
class HwachaRocketConfig extends Config(
|
||||
new chipyard.config.WithHwachaTest ++
|
||||
new hwacha.DefaultHwachaConfig ++ // use Hwacha vector accelerator
|
||||
|
||||
@@ -235,6 +235,18 @@ class FireSimGemminiRocketConfig extends Config(
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.GemminiRocketConfig)
|
||||
|
||||
class FireSimLeanGemminiRocketConfig extends Config(
|
||||
new WithDefaultFireSimBridges ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.LeanGemminiRocketConfig)
|
||||
|
||||
class FireSimLeanGemminiPrintfRocketConfig extends Config(
|
||||
new WithDefaultFireSimBridges ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.LeanGemminiPrintfRocketConfig)
|
||||
|
||||
//**********************************************************************************
|
||||
// Supernode Configurations, base off chipyard's RocketConfig
|
||||
//**********************************************************************************
|
||||
@@ -288,3 +300,9 @@ class FireSimRocketMMIOOnlyConfig extends Config(
|
||||
new WithDefaultMemModel ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.RocketConfig)
|
||||
|
||||
class FireSimLeanGemminiRocketMMIOOnlyConfig extends Config(
|
||||
new WithDefaultMMIOOnlyFireSimBridges ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.LeanGemminiRocketConfig)
|
||||
|
||||
Submodule generators/gemmini updated: 9e478ecce9...686cb15dad
Submodule generators/ibex updated: 5a512227d8...626127f229
Submodule generators/sha3 updated: 98089ba372...8c5d244303
Submodule generators/testchipip updated: 802d2b4a4d...dead693f8f
@@ -111,4 +111,11 @@ if [ $TOOLCHAIN == "riscv-tools" ]; then
|
||||
make -C $RDIR/generators/gemmini/software/libgemmini install
|
||||
fi
|
||||
|
||||
echo '==> Installing DRAMSim2 Shared Library'
|
||||
cd $RDIR
|
||||
git submodule update --init tools/DRAMSim2
|
||||
cd tools/DRAMSim2
|
||||
make libdramsim.so
|
||||
cp libdramsim.so $RISCV/lib/
|
||||
|
||||
echo "Extra Toolchain Utilities/Tests Build Complete!"
|
||||
|
||||
@@ -106,8 +106,6 @@ cd "$RDIR"
|
||||
software/coremark \
|
||||
software/firemarshal \
|
||||
software/spec2017 \
|
||||
vlsi/hammer-cadence-plugins \
|
||||
vlsi/hammer-synopsys-plugins \
|
||||
vlsi/hammer-mentor-plugins \
|
||||
fpga/fpga-shells
|
||||
do
|
||||
|
||||
@@ -12,10 +12,6 @@ fi
|
||||
|
||||
# Initialize HAMMER CAD-plugins
|
||||
if [[ $1 != *openroad* ]] && [[ $2 != *openroad* ]]; then
|
||||
git submodule update --init --recursive vlsi/hammer-cadence-plugins
|
||||
pip install -e vlsi/hammer-cadence-plugins
|
||||
git submodule update --init --recursive vlsi/hammer-synopsys-plugins
|
||||
pip install -e vlsi/hammer-synopsys-plugins
|
||||
git submodule update --init --recursive vlsi/hammer-mentor-plugins
|
||||
pip install -e vlsi/hammer-mentor-plugins
|
||||
fi
|
||||
|
||||
Submodule sims/firesim updated: 69e428f010...68e5113887
3
sims/xcelium/.gitignore
vendored
Normal file
3
sims/xcelium/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
*Makefile
|
||||
140
sims/xcelium/Makefile
Normal file
140
sims/xcelium/Makefile
Normal file
@@ -0,0 +1,140 @@
|
||||
#########################################################################################
|
||||
# xcelium makefile
|
||||
#########################################################################################
|
||||
|
||||
define CAD_INFO_HEADER
|
||||
# --------------------------------------------------------------------------------
|
||||
# This script was written and developed by Chipyard at UC Berkeley; however, the
|
||||
# underlying commands and reports are copyrighted by Cadence. We thank Cadence for
|
||||
# granting permission to share our research to help promote and foster the next
|
||||
# generation of innovators.
|
||||
# --------------------------------------------------------------------------------
|
||||
endef
|
||||
|
||||
export CAD_INFO_HEADER
|
||||
|
||||
#########################################################################################
|
||||
# general path variables
|
||||
#########################################################################################
|
||||
base_dir=$(abspath ../..)
|
||||
sim_dir=$(abspath .)
|
||||
|
||||
#########################################################################################
|
||||
# include shared variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/variables.mk
|
||||
|
||||
#########################################################################################
|
||||
# name of simulator (used to generate *.f arguments file)
|
||||
#########################################################################################
|
||||
sim_name = xrun
|
||||
|
||||
#########################################################################################
|
||||
# xcelium simulator types and rules
|
||||
#########################################################################################
|
||||
sim_prefix = simx
|
||||
sim = $(sim_dir)/$(sim_prefix)-$(MODEL_PACKAGE)-$(CONFIG)
|
||||
sim_debug = $(sim)-debug
|
||||
sim_workdir = $(build_dir)/xcelium.d
|
||||
sim_run_tcl = $(build_dir)/xcelium_run.tcl
|
||||
sim_debug_run_tcl = $(build_dir)/xcelium_debug_run.tcl
|
||||
|
||||
include $(base_dir)/xcelium.mk
|
||||
|
||||
.PHONY: default debug
|
||||
default: $(sim)
|
||||
debug: $(sim_debug)
|
||||
|
||||
#########################################################################################
|
||||
# simulation requirements
|
||||
#########################################################################################
|
||||
SIM_FILE_REQS += \
|
||||
$(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v
|
||||
|
||||
# copy files but ignore *.h files in *.f since xcelium has -Wcxx include
|
||||
$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR)
|
||||
cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR)
|
||||
$(foreach file,\
|
||||
$(SIM_FILE_REQS),\
|
||||
$(if $(filter %.h,$(file)),\
|
||||
,\
|
||||
echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;))
|
||||
|
||||
#########################################################################################
|
||||
# import other necessary rules and variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/common.mk
|
||||
|
||||
#########################################################################################
|
||||
# xcelium binary and arguments
|
||||
#########################################################################################
|
||||
XCELIUM = xrun
|
||||
XCELIUM_OPTS = $(XCELIUM_CC_OPTS) $(XCELIUM_NONCC_OPTS) $(PREPROC_DEFINES)
|
||||
|
||||
#########################################################################################
|
||||
# xcelium build paths
|
||||
#########################################################################################
|
||||
model_dir = $(build_dir)/$(long_name)
|
||||
model_dir_debug = $(build_dir)/$(long_name).debug
|
||||
|
||||
|
||||
#########################################################################################
|
||||
# xcelium simulator rules
|
||||
#########################################################################################
|
||||
|
||||
$(sim_workdir): $(sim_common_files) $(dramsim_lib) $(EXTRA_SIM_REQS)
|
||||
rm -rf $(model_dir)
|
||||
$(XCELIUM) -elaborate $(XCELIUM_OPTS) $(EXTRA_SIM_SOURCES) $(XCELIUM_COMMON_ARGS)
|
||||
|
||||
$(sim_run_tcl): $(sim_workdir)
|
||||
echo "$$CAD_INFO_HEADER" > $(sim_run_tcl)
|
||||
echo "run" >> $(sim_run_tcl)
|
||||
echo "exit" >> $(sim_run_tcl)
|
||||
|
||||
# The system libstdc++ may not link correctly with some of our dynamic libs, so
|
||||
# force loading the conda one (if present) with LD_PRELOAD
|
||||
$(sim): $(sim_workdir) $(sim_run_tcl)
|
||||
echo "#!/usr/bin/env bash" > $(sim)
|
||||
echo "$$CAD_INFO_HEADER" >> $(sim)
|
||||
cat arg-reshuffle >> $(sim)
|
||||
echo "LD_PRELOAD=$(base_dir)/.conda-env/lib/libstdc++.so.6 $(XCELIUM) +permissive -R -input $(sim_run_tcl) $(XCELIUM_COMMON_ARGS) +permissive-off \$$INPUT_ARGS" >> $(sim)
|
||||
chmod +x $(sim)
|
||||
|
||||
$(sim_debug_run_tcl): $(sim_workdir)
|
||||
echo "$$CAD_INFO_HEADER" > $(sim_debug_run_tcl)
|
||||
echo "database -open default_vcd_dump -vcd -into \$$env(XCELIUM_WAVEFORM_FLAG)" >> $(sim_debug_run_tcl)
|
||||
echo "set probe_packed_limit 64k" >> $(sim_debug_run_tcl)
|
||||
echo "probe -create $(TB) -database default_vcd_dump -depth all -all" >> $(sim_debug_run_tcl)
|
||||
echo "run" >> $(sim_debug_run_tcl)
|
||||
echo "database -close default_vcd_dump" >> $(sim_debug_run_tcl)
|
||||
echo "exit" >> $(sim_debug_run_tcl)
|
||||
|
||||
|
||||
$(sim_debug): $(sim_workdir) $(sim_debug_run_tcl)
|
||||
echo "#!/usr/bin/env bash" > $(sim_debug)
|
||||
echo "$$CAD_INFO_HEADER" >> $(sim_debug)
|
||||
cat arg-reshuffle >> $(sim_debug)
|
||||
echo "export XCELIUM_WAVEFORM_FLAG=\$$XCELIUM_WAVEFORM_FLAG" >> $(sim_debug)
|
||||
echo "LD_PRELOAD=$(base_dir)/.conda-env/lib/libstdc++.so.6 $(XCELIUM) +permissive -R -input $(sim_debug_run_tcl) $(XCELIUM_COMMON_ARGS) +permissive-off \$$INPUT_ARGS" >> $(sim_debug)
|
||||
chmod +x $(sim_debug)
|
||||
|
||||
|
||||
#########################################################################################
|
||||
# create vcd rules
|
||||
#########################################################################################
|
||||
.PRECIOUS: $(output_dir)/%.vcd %.vcd
|
||||
$(output_dir)/%.vcd: $(output_dir)/% $(sim_debug)
|
||||
(set -o pipefail && $(sim_debug) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) +vcdplusfile=$@ $(PERMISSIVE_OFF) $< </dev/null 2> >(spike-dasm > $<.out) | tee $<.log)
|
||||
|
||||
#########################################################################################
|
||||
# general cleanup rules
|
||||
#########################################################################################
|
||||
.PHONY: clean clean-sim clean-sim-debug
|
||||
clean:
|
||||
rm -rf $(gen_dir) $(sim_prefix)-*
|
||||
|
||||
clean-sim:
|
||||
rm -rf $(model_dir) $(sim) $(sim_workdir) $(sim_run_tcl) ucli.key bpad_*.err sigusrdump.out dramsim*.log
|
||||
|
||||
clean-sim-debug:
|
||||
rm -rf $(model_dir_debug) $(sim_debug) $(sim_workdir) $(sim_debug_run_tcl) ucli.key bpad_*.err sigusrdump.out dramsim*.log
|
||||
30
sims/xcelium/arg-reshuffle
Executable file
30
sims/xcelium/arg-reshuffle
Executable file
@@ -0,0 +1,30 @@
|
||||
|
||||
# this is a wrapper that is copied into xcelium sim run scripts that
|
||||
# re-maps arguments from the argument pattern used by other
|
||||
# simulators (vcs, verilator) to the pattern required by xcelium.
|
||||
#
|
||||
# mainly:
|
||||
# * +vcdfile=VAL -> XCELIUM_WAVEFORM_FLAG=VAL, to be passed in as env var
|
||||
# * arguments not prefixed with a + or - are treated as the arguments to
|
||||
# the target and are passed in instead with the +target-argument plusarg
|
||||
|
||||
regular_args=""
|
||||
target_args="+permissive"
|
||||
for var in "$@"
|
||||
do
|
||||
if [[ $var = -* ]] || [[ $var = +* ]]
|
||||
then
|
||||
if [[ $var = +vcdfile=* ]]
|
||||
then
|
||||
XCELIUM_WAVEFORM_FLAG=${var/+vcdfile=/""}
|
||||
else
|
||||
regular_args="$regular_args $var"
|
||||
fi
|
||||
else
|
||||
target_args="$target_args +target-argument=$var"
|
||||
fi
|
||||
done
|
||||
target_args="$target_args +permissive-off"
|
||||
|
||||
INPUT_ARGS="$regular_args $target_args"
|
||||
|
||||
Submodule software/firemarshal updated: 8e02b02d14...12784a42cb
Submodule toolchains/riscv-tools/riscv-isa-sim updated: e7d6aff19a...34bebfe311
@@ -159,6 +159,7 @@ endif
|
||||
FIRRTL_FILE ?= $(build_dir)/$(long_name).fir
|
||||
ANNO_FILE ?= $(build_dir)/$(long_name).anno.json
|
||||
EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extra.anno.json
|
||||
CHISEL_LOG_FILE ?= $(build_dir)/$(long_name).chisel.log
|
||||
|
||||
# chisel anno modification output
|
||||
MFC_EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extrafirtool.anno.json
|
||||
@@ -234,7 +235,7 @@ SBT_CLIENT_FLAG = --client
|
||||
endif
|
||||
|
||||
# passes $(JAVA_TOOL_OPTIONS) from env to java
|
||||
export SBT_OPTS ?= -Dsbt.ivy.home=$(base_dir)/.ivy2 -Dsbt.global.base=$(base_dir)/.sbt -Dsbt.boot.directory=$(base_dir)/.sbt/boot/
|
||||
export SBT_OPTS ?= -Dsbt.ivy.home=$(base_dir)/.ivy2 -Dsbt.global.base=$(base_dir)/.sbt -Dsbt.boot.directory=$(base_dir)/.sbt/boot/ -Dsbt.color=always
|
||||
SBT_BIN ?= java -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS)
|
||||
SBT = $(SBT_BIN) $(SBT_CLIENT_FLAG)
|
||||
SBT_NON_THIN = $(subst $(SBT_CLIENT_FLAG),,$(SBT))
|
||||
|
||||
@@ -46,9 +46,9 @@ VLSI_MODEL_DUT_NAME ?= chiptop
|
||||
# If overriding, this should be relative to $(vlsi_dir)
|
||||
VLSI_OBJ_DIR ?= build
|
||||
ifneq ($(CUSTOM_VLOG),)
|
||||
OBJ_DIR ?= $(vlsi_dir)/$(VLSI_OBJ_DIR)/custom-$(VLSI_TOP)
|
||||
OBJ_DIR ?= $(vlsi_dir)/$(VLSI_OBJ_DIR)/$(VLSI_TOP)
|
||||
else
|
||||
OBJ_DIR ?= $(vlsi_dir)/$(VLSI_OBJ_DIR)/$(long_name)-$(VLSI_TOP)
|
||||
OBJ_DIR ?= $(vlsi_dir)/$(VLSI_OBJ_DIR)/$(long_name)-$(TOP)
|
||||
endif
|
||||
|
||||
#########################################################################################
|
||||
@@ -118,6 +118,12 @@ endif
|
||||
|
||||
$(SYN_CONF): $(VLSI_RTL)
|
||||
mkdir -p $(dir $@)
|
||||
echo "sim.inputs:" > $@
|
||||
echo " input_files:" >> $@
|
||||
for x in $$(cat $(VLSI_RTL)); do \
|
||||
echo ' - "'$$x'"' >> $@; \
|
||||
done
|
||||
echo " input_files_meta: 'append'" >> $@
|
||||
echo "synthesis.inputs:" >> $@
|
||||
echo " top_module: $(VLSI_TOP)" >> $@
|
||||
echo " input_files:" >> $@
|
||||
|
||||
@@ -37,54 +37,47 @@ vlsi.inputs.placement_constraints:
|
||||
right: 0
|
||||
top: 0
|
||||
bottom: 0
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_0"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 550
|
||||
y: 25
|
||||
orientation: "r0"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW4096x8"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_1"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_1"
|
||||
type: hardmacro
|
||||
x: 550
|
||||
y: 270
|
||||
orientation: "r0"
|
||||
top_layer: "M4"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_2"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_2"
|
||||
type: hardmacro
|
||||
x: 675
|
||||
y: 25
|
||||
orientation: "r0"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW4096x8"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_3"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_3"
|
||||
type: hardmacro
|
||||
x: 675
|
||||
y: 270
|
||||
orientation: "r0"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW4096x8"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/frontend/icache/tag_array/tag_array_ext/mem_0_0"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/tag_array_0/tag_array_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 125
|
||||
y: 150
|
||||
orientation: "my"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW64x21"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/frontend/icache/data_arrays_0/data_arrays_0_0_ext/mem_0_0"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/data_arrays_0_0/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 0
|
||||
y: 25
|
||||
orientation: "my"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW1024x32"
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 0
|
||||
y: 260
|
||||
orientation: "my"
|
||||
top_layer: "M4"
|
||||
master: "SRAM1RW1024x37"
|
||||
|
||||
# Pin placement constraints
|
||||
vlsi.inputs.pin_mode: generated
|
||||
|
||||
@@ -2,149 +2,18 @@
|
||||
|
||||
# Specify clock signals
|
||||
vlsi.inputs.clocks: [
|
||||
{name: "clock_clock", period: "5ns", uncertainty: "1ns"}
|
||||
{name: "clock_clock", period: "30ns", uncertainty: "2ns"}
|
||||
]
|
||||
|
||||
# Power Straps
|
||||
par.power_straps_mode: generate
|
||||
par.generate_power_straps_method: by_tracks
|
||||
par.blockage_spacing: 40.0
|
||||
par.blockage_spacing_top_layer: met4
|
||||
par.generate_power_straps_options:
|
||||
by_tracks:
|
||||
strap_layers:
|
||||
- met4
|
||||
- met5
|
||||
pin_layers:
|
||||
- met5
|
||||
blockage_spacing_met2: 4.0
|
||||
blockage_spacing_met4: 2.0
|
||||
track_width: 3
|
||||
track_width_met5: 1
|
||||
track_spacing: 5
|
||||
track_start: 10
|
||||
track_start_met5: 1
|
||||
power_utilization: 0.1
|
||||
power_utilization_met4: 0.1
|
||||
power_utilization_met5: 0.1
|
||||
|
||||
# Placement Constraints
|
||||
vlsi.inputs.placement_constraints:
|
||||
- path: "ChipTop"
|
||||
type: toplevel
|
||||
x: 0
|
||||
y: 0
|
||||
width: 4000
|
||||
height: 2500
|
||||
margins:
|
||||
left: 0
|
||||
right: 0
|
||||
top: 0
|
||||
bottom: 0
|
||||
|
||||
# Place data cache SRAM instances
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_1_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_2_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1300
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_3_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1900
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_4_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 1900
|
||||
orientation: r0
|
||||
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_5_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 1300
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_6_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_7_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
# Place instruction cache SRAM instances
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/frontend/icache/data_arrays_0/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 3250
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/frontend/icache/data_arrays_0/data_arrays_0_0_ext/mem_1_0"
|
||||
type: hardmacro
|
||||
x: 3250
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/frontend/icache/tag_array/tag_array_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 3450
|
||||
y: 1300
|
||||
orientation: r0
|
||||
|
||||
# Place L2 TLB SRAM instances
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 2000
|
||||
y: 1300
|
||||
orientation: "r0"
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_1"
|
||||
type: hardmacro
|
||||
x: 2000
|
||||
y: 1900
|
||||
orientation: "r0"
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_2"
|
||||
type: hardmacro
|
||||
x: 2750
|
||||
y: 1300
|
||||
orientation: "r0"
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_3"
|
||||
type: hardmacro
|
||||
x: 2750
|
||||
y: 1900
|
||||
orientation: "r0"
|
||||
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain/tile/ptw/l2_tlb_ram/l2_tlb_ram_ext/mem_0_4"
|
||||
type: hardmacro
|
||||
x: 3460
|
||||
y: 1900
|
||||
orientation: "r0"
|
||||
|
||||
# Pin placement constraints
|
||||
vlsi.inputs.pin_mode: generated
|
||||
vlsi.inputs.pin.generate_mode: semi_auto
|
||||
vlsi.inputs.pin.assignments: [
|
||||
{pins: "*", layers: ["met2", "met4"], side: "bottom"}
|
||||
]
|
||||
# If overriding the placement constraints in example-sky130.yml,
|
||||
# ensure one of the toplevel margin sides corresponding with the power pin metal layers
|
||||
# is set to 0 so that Innovus actually creates those pins (otherwise LVS will fail).
|
||||
# For example, in example-sky130.yml we set
|
||||
# par.generate_power_straps_options.by_tracks.pin_layers: 'met5' # horizontal layer
|
||||
# therefore we must also set:
|
||||
# vlsi.inputs.placement_constraints:
|
||||
# - path: "ChipTop"
|
||||
# ...
|
||||
# margins:
|
||||
# right: 0 # or left: 0
|
||||
60
vlsi/example-designs/sky130-openroad-rockettile.yml
Normal file
60
vlsi/example-designs/sky130-openroad-rockettile.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
# Override configurations in ../example-sky130.yml and example-designs
|
||||
|
||||
# Specify clock signals
|
||||
# Rocket/RocketTile names clock signal "clock" instead of "clock_clock"
|
||||
vlsi.inputs.clocks: [
|
||||
{name: "clock", period: "30ns", uncertainty: "3ns"}
|
||||
]
|
||||
|
||||
# Placement Constraints
|
||||
# Placement Constraints
|
||||
vlsi.inputs.placement_constraints:
|
||||
- path: "RocketTile"
|
||||
type: toplevel
|
||||
x: 0
|
||||
y: 0
|
||||
width: 4000
|
||||
height: 3000
|
||||
margins:
|
||||
left: 10
|
||||
right: 0
|
||||
top: 10
|
||||
bottom: 10
|
||||
|
||||
# Place SRAM memory instances
|
||||
# SRAM paths and configurations are slightly different due to ENABLE_YOSYS_FLOW flag
|
||||
# data cache
|
||||
- path: "RocketTile/dcache/data/data_arrays_0_0/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 50
|
||||
orientation: r90
|
||||
- path: "RocketTile/dcache/data/data_arrays_0_1/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 450
|
||||
orientation: r90
|
||||
- path: "RocketTile/dcache/data/data_arrays_0_2/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 850
|
||||
orientation: r90
|
||||
- path: "RocketTile/dcache/data/data_arrays_0_3/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1250
|
||||
orientation: r90
|
||||
|
||||
# tag array
|
||||
- path: "RocketTile/frontend/icache/tag_array_0/tag_array_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1600
|
||||
orientation: r90
|
||||
|
||||
# instruction cache
|
||||
- path: "RocketTile/frontend/icache/data_arrays_0_0/data_arrays_0_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 2100
|
||||
orientation: r90
|
||||
@@ -3,9 +3,42 @@
|
||||
# Specify clock signals
|
||||
# Relax the clock period for OpenROAD to meet timing
|
||||
vlsi.inputs.clocks: [
|
||||
{name: "clock_clock", period: "30ns", uncertainty: "1ns"}
|
||||
{name: "clock_clock", period: "50ns", uncertainty: "2ns"}
|
||||
]
|
||||
|
||||
# Flow parameters that yield a routable design with reasonable timing
|
||||
par.openroad:
|
||||
timing_driven: true # set to false to drastically speed up runs
|
||||
create_archive_mode: none
|
||||
|
||||
write_reports: true # set to false to slightly speed up runs
|
||||
|
||||
floorplan_mode: generate
|
||||
|
||||
macro_placement.halo: [50, 50]
|
||||
|
||||
global_placement.timing_driven: true
|
||||
global_placement.routability_driven: true
|
||||
|
||||
global_placement.placement_padding: 6
|
||||
detailed_placement.placement_padding: 4
|
||||
clock_tree.placement_padding: 2
|
||||
clock_tree_resize.placement_padding: 0
|
||||
|
||||
clock_tree_resize.setup_margin: 0.0
|
||||
clock_tree_resize.hold_margin: 0.20
|
||||
global_route_resize.hold_margin: 0.60
|
||||
clock_tree_resize.hold_max_buffer_percent: 80
|
||||
|
||||
global_placement.routing_adjustment: 0.5
|
||||
global_route.routing_adjustment: 0.3
|
||||
global_route_resize.routing_adjustment: 0.2
|
||||
|
||||
# DRC/LVS configuration
|
||||
drc.magic.generate_only: true
|
||||
lvs.netgen.generate_only: true
|
||||
|
||||
|
||||
# Placement Constraints
|
||||
vlsi.inputs.placement_constraints:
|
||||
- path: "ChipTop"
|
||||
@@ -13,78 +46,47 @@ vlsi.inputs.placement_constraints:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 4000
|
||||
height: 2500
|
||||
height: 3000
|
||||
margins:
|
||||
left: 10
|
||||
right: 10
|
||||
right: 0
|
||||
top: 10
|
||||
bottom: 10
|
||||
|
||||
# Place data cache SRAM instances
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_0_0"
|
||||
# Place SRAM memory instances
|
||||
# SRAM paths and configurations are slightly different due to ENABLE_YOSYS_FLOW flag
|
||||
# data cache
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0_0/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_1_0"
|
||||
y: 50
|
||||
orientation: r90
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0_1/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_2_0"
|
||||
y: 450
|
||||
orientation: r90
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0_2/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1300
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_3_0"
|
||||
y: 850
|
||||
orientation: r90
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0_3/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1900
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_4_0"
|
||||
y: 1250
|
||||
orientation: r90
|
||||
|
||||
# tag array
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/tag_array_0/tag_array_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 1900
|
||||
orientation: r0
|
||||
x: 50
|
||||
y: 1600
|
||||
orientation: r90
|
||||
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_5_0"
|
||||
# instruction cache
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/data_arrays_0_0/data_arrays_0_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 1300
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_6_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.dcache.data.data_arrays_0.data_arrays_0_ext.mem_7_0"
|
||||
type: hardmacro
|
||||
x: 1000
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
# Place instruction cache SRAM instances
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.frontend.icache.data_arrays_0.data_arrays_0_0_ext.mem_0_0"
|
||||
type: hardmacro
|
||||
x: 3250
|
||||
y: 100
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.frontend.icache.data_arrays_0.data_arrays_0_0_ext.mem_1_0"
|
||||
type: hardmacro
|
||||
x: 3250
|
||||
y: 700
|
||||
orientation: r0
|
||||
|
||||
- path: "ChipTop/system.tile_prci_domain.tile_reset_domain.tile.frontend.icache.tag_array.tag_array_ext.mem_0_0"
|
||||
type: hardmacro
|
||||
x: 3450
|
||||
y: 1300
|
||||
orientation: r0
|
||||
x: 50
|
||||
y: 2100
|
||||
orientation: r90
|
||||
|
||||
@@ -7,7 +7,7 @@ vlsi.core.max_threads: 12
|
||||
# Technology paths
|
||||
technology.sky130:
|
||||
sky130A: "/path/to/sky130A"
|
||||
openram_lib: "/path/to/sky130_sram_macros"
|
||||
sram22_sky130_macros: "/path/to/sram22_sky130_macros"
|
||||
|
||||
# this key is OPTIONAL, no NDA files will be used if it does not point to a valid path
|
||||
sky130_nda: "/path/to/skywater-src-nda"
|
||||
@@ -20,31 +20,55 @@ vlsi.inputs.power_spec_type: "cpf"
|
||||
|
||||
# Specify clock signals
|
||||
vlsi.inputs.clocks: [
|
||||
{name: "clock_clock", period: "10ns", uncertainty: "1ns"}
|
||||
{name: "clock_clock", period: "20ns", uncertainty: "1ns"}
|
||||
]
|
||||
|
||||
# Generate Make include to aid in flow
|
||||
vlsi.core.build_system: make
|
||||
|
||||
|
||||
# Placement Constraints
|
||||
vlsi.inputs.placement_constraints:
|
||||
- path: "ChipTop"
|
||||
type: toplevel
|
||||
x: 0
|
||||
y: 0
|
||||
width: 3500
|
||||
height: 2500
|
||||
width: 4000
|
||||
height: 3000
|
||||
margins:
|
||||
left: 10
|
||||
right: 10
|
||||
right: 0
|
||||
top: 10
|
||||
bottom: 10
|
||||
|
||||
# Place SRAM memory instances
|
||||
# data cache
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/dcache/data/data_arrays_0/data_arrays_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 50
|
||||
orientation: r90
|
||||
|
||||
# tag array
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/tag_array_0/tag_array_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 1600
|
||||
orientation: r90
|
||||
|
||||
# instruction cache
|
||||
- path: "ChipTop/system/tile_prci_domain/tile_reset_domain_tile/frontend/icache/data_arrays_0_0/data_arrays_0_0_ext/mem_0_0"
|
||||
type: hardmacro
|
||||
x: 50
|
||||
y: 2100
|
||||
orientation: r90
|
||||
|
||||
|
||||
# Power Straps
|
||||
par.power_straps_mode: generate
|
||||
par.generate_power_straps_method: by_tracks
|
||||
par.blockage_spacing: 40.0
|
||||
par.blockage_spacing_top_layer: met4
|
||||
par.blockage_spacing: 2.0
|
||||
par.blockage_spacing_top_layer: met3
|
||||
par.generate_power_straps_options:
|
||||
by_tracks:
|
||||
strap_layers:
|
||||
@@ -63,6 +87,7 @@ par.generate_power_straps_options:
|
||||
power_utilization_met4: 0.1
|
||||
power_utilization_met5: 0.1
|
||||
|
||||
|
||||
# Pin placement constraints
|
||||
vlsi.inputs.pin_mode: generated
|
||||
vlsi.inputs.pin.generate_mode: semi_auto
|
||||
@@ -70,5 +95,6 @@ vlsi.inputs.pin.assignments: [
|
||||
{pins: "*", layers: ["met2", "met4"], side: "bottom"}
|
||||
]
|
||||
|
||||
|
||||
# SRAM Compiler compiler options
|
||||
vlsi.core.sram_generator_tool: "hammer.technology.sky130.sram_compiler"
|
||||
|
||||
Submodule vlsi/hammer-cadence-plugins deleted from f9e323bd64
Submodule vlsi/hammer-synopsys-plugins deleted from e53fa5c51f
@@ -10,7 +10,7 @@ $(SIM_CONF): $(sim_common_files)
|
||||
echo " top_module: $(VLSI_TOP)" >> $@
|
||||
echo " tb_name: ''" >> $@ # don't specify -top
|
||||
echo " input_files:" >> $@
|
||||
for x in $$(cat $(sim_common_files)); do \
|
||||
for x in $$(comm -23 <(cat $(MODEL_MODS_FILELIST) $(MODEL_BB_MODS_FILELIST) | sort -u) <(sort $(VLSI_RTL))) $(MODEL_SMEMS_FILE) $(SIM_FILE_REQS); do \
|
||||
echo ' - "'$$x'"' >> $@; \
|
||||
done
|
||||
echo " input_files_meta: 'append'" >> $@
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#########################################################################################
|
||||
# makefile variables for Hammer tutorials
|
||||
#########################################################################################
|
||||
# tutorial ?= none
|
||||
tutorial ?= sky130-openroad
|
||||
|
||||
extra ?=
|
||||
tutorial ?= none
|
||||
EXTRA_CONFS ?=
|
||||
|
||||
# TODO: eventually have asap7 commercial/openroad tutorial flavors
|
||||
ifeq ($(tutorial),asap7)
|
||||
@@ -12,7 +10,7 @@ ifeq ($(tutorial),asap7)
|
||||
CONFIG ?= TinyRocketConfig
|
||||
TOOLS_CONF ?= example-tools.yml
|
||||
TECH_CONF ?= example-asap7.yml
|
||||
INPUT_CONFS ?= $(EXTRA_CONFS) $(TOOLS_CONF) $(TECH_CONF)
|
||||
DESIGN_CONFS ?=
|
||||
VLSI_OBJ_DIR ?= build-asap7-commercial
|
||||
endif
|
||||
|
||||
@@ -21,9 +19,9 @@ ifeq ($(tutorial),sky130-commercial)
|
||||
CONFIG ?= TinyRocketConfig
|
||||
TOOLS_CONF ?= example-tools.yml
|
||||
TECH_CONF ?= example-sky130.yml
|
||||
DESIGN_CONF ?= example-designs/sky130-commercial.yml
|
||||
EXTRA_CONFS ?= $(if $(filter $(VLSI_TOP),Rocket), example-designs/sky130-rocket.yml, )
|
||||
INPUT_CONFS ?= $(TOOLS_CONF) $(TECH_CONF) $(DESIGN_CONF) $(EXTRA_CONFS)
|
||||
DESIGN_CONFS ?= example-designs/sky130-commercial.yml \
|
||||
$(if $(filter $(VLSI_TOP),Rocket), \
|
||||
example-designs/sky130-rocket.yml, )
|
||||
VLSI_OBJ_DIR ?= build-sky130-commercial
|
||||
endif
|
||||
|
||||
@@ -32,12 +30,14 @@ ifeq ($(tutorial),sky130-openroad)
|
||||
CONFIG ?= TinyRocketConfig
|
||||
TOOLS_CONF ?= example-openroad.yml
|
||||
TECH_CONF ?= example-sky130.yml
|
||||
DESIGN_CONF ?= example-designs/sky130-openroad.yml
|
||||
EXTRA_CONFS ?= $(if $(filter $(VLSI_TOP),Rocket), example-designs/sky130-rocket.yml, )
|
||||
INPUT_CONFS ?= $(TOOLS_CONF) $(TECH_CONF) $(DESIGN_CONF) $(EXTRA_CONFS)
|
||||
DESIGN_CONFS ?= example-designs/sky130-openroad.yml \
|
||||
$(if $(filter $(VLSI_TOP),Rocket), \
|
||||
example-designs/sky130-rocket.yml) \
|
||||
$(if $(filter $(VLSI_TOP),RocketTile), \
|
||||
example-designs/sky130-openroad-rockettile.yml, )
|
||||
VLSI_OBJ_DIR ?= build-sky130-openroad
|
||||
# Yosys compatibility for CIRCT-generated Verilog, at the expense of elaboration time.
|
||||
ENABLE_YOSYS_FLOW = 1
|
||||
endif
|
||||
|
||||
HAMMER_EXTRA_ARGS ?= -p $(TOOLS_CONF) -p $(TECH_CONF) -p $(DESIGN_CONF) $(extra)
|
||||
INPUT_CONFS ?= $(TOOLS_CONF) $(TECH_CONF) $(DESIGN_CONFS) $(EXTRA_CONFS)
|
||||
|
||||
65
xcelium.mk
Normal file
65
xcelium.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
WAVEFORM_FLAG=+vcdfile=$(sim_out_name).vcd
|
||||
|
||||
# If ntb_random_seed unspecified, xcelium uses 1 as constant seed.
|
||||
# Set ntb_random_seed_automatic to actually get a random seed
|
||||
ifdef RANDOM_SEED
|
||||
SEED_FLAG=+ntb_random_seed=$(RANDOM_SEED)
|
||||
else
|
||||
SEED_FLAG=+ntb_random_seed_automatic
|
||||
endif
|
||||
|
||||
CLOCK_PERIOD ?= 1.0
|
||||
RESET_DELAY ?= 777.7
|
||||
|
||||
#----------------------------------------------------------------------------------------
|
||||
# gcc configuration/optimization
|
||||
#----------------------------------------------------------------------------------------
|
||||
include $(base_dir)/sims/common-sim-flags.mk
|
||||
|
||||
|
||||
XC_CXX_PREFIX=-Wcxx,
|
||||
XC_LD_PREFIX=-Wld,
|
||||
|
||||
REMOVE_RPATH=-Wl,-rpath%
|
||||
|
||||
XCELIUM_CXXFLAGS = $(addprefix $(XC_CXX_PREFIX), $(SIM_CXXFLAGS))
|
||||
XCELIUM_LDFLAGS = $(addprefix $(XC_LD_PREFIX), $(filter-out $(REMOVE_RPATH), $(SIM_LDFLAGS)))
|
||||
|
||||
XCELIUM_COMMON_ARGS = \
|
||||
-64bit \
|
||||
-xmlibdirname $(sim_workdir) \
|
||||
-l /dev/null \
|
||||
-log_xmsc_run /dev/null
|
||||
|
||||
XCELIUM_CC_OPTS = \
|
||||
$(XCELIUM_CXXFLAGS) \
|
||||
$(XCELIUM_LDFLAGS) \
|
||||
-enable_rpath
|
||||
|
||||
XCELIUM_NONCC_OPTS = \
|
||||
-fast_recompilation \
|
||||
-top $(TB) \
|
||||
-sv \
|
||||
-ALLOWREDEFINITION \
|
||||
-timescale 1ns/10ps \
|
||||
-define INTCNOPWR \
|
||||
-define INTC_NO_PWR_PINS \
|
||||
-define INTC_EMULATION \
|
||||
-f $(sim_common_files) \
|
||||
-glsperf \
|
||||
-notimingchecks \
|
||||
-delay_mode zero
|
||||
|
||||
PREPROC_DEFINES = \
|
||||
-define XCELIUM \
|
||||
-define CLOCK_PERIOD=$(CLOCK_PERIOD) \
|
||||
-define RESET_DELAY=$(RESET_DELAY) \
|
||||
-define PRINTF_COND=$(TB).printf_cond \
|
||||
-define STOP_COND=!$(TB).reset \
|
||||
-define MODEL=$(MODEL) \
|
||||
-define RANDOMIZE_MEM_INIT \
|
||||
-define RANDOMIZE_REG_INIT \
|
||||
-define RANDOMIZE_GARBAGE_ASSIGN \
|
||||
-define RANDOMIZE_INVALID_ASSIGN
|
||||
|
||||
Reference in New Issue
Block a user