Merge remote-tracking branch 'upstream/main' into graphics
This commit is contained in:
2
.github/actions/cleanup-conda/action.yml
vendored
2
.github/actions/cleanup-conda/action.yml
vendored
@@ -22,7 +22,7 @@ runs:
|
||||
echo "Skipping removal of $envname since it cannot be parsed into a date"
|
||||
else
|
||||
NUM_DIFF=$(( ( $(date +%s) - $(date --date="$ENV_DATE" +%s) )/(60*60*24) ))
|
||||
if (( $NUM_DIFF > 7 )); then
|
||||
if (( $NUM_DIFF > 2 )); then
|
||||
echo "Removing $envname since it is $NUM_DIFF days old."
|
||||
conda env remove -n $envname
|
||||
else
|
||||
|
||||
19
common.mk
19
common.mk
@@ -18,6 +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) \
|
||||
" EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \
|
||||
" EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler"
|
||||
|
||||
@@ -26,6 +27,7 @@ EXTRA_SIM_CXXFLAGS ?=
|
||||
EXTRA_SIM_LDFLAGS ?=
|
||||
EXTRA_SIM_SOURCES ?=
|
||||
EXTRA_SIM_REQS ?=
|
||||
ENABLE_CUSTOM_FIRRTL_PASS += $(ENABLE_YOSYS_FLOW)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
HELP_SIMULATION_VARIABLES += \
|
||||
@@ -159,6 +161,7 @@ SFC_MFC_TARGETS = \
|
||||
$(GEN_COLLATERAL_DIR)
|
||||
|
||||
SFC_REPL_SEQ_MEM = --infer-rw --repl-seq-mem -c:$(MODEL):-o:$(SFC_SMEMS_CONF)
|
||||
MFC_BASE_LOWERING_OPTIONS = emittedLineLength=2048,noAlwaysComb,disallowLocalVariables,verifLabels,locationInfoStyle=wrapInAtSquareBracket
|
||||
|
||||
# DOC include start: FirrtlCompiler
|
||||
# There are two possible cases for this step. In the first case, SFC
|
||||
@@ -171,17 +174,23 @@ SFC_REPL_SEQ_MEM = --infer-rw --repl-seq-mem -c:$(MODEL):-o:$(SFC_SMEMS_CONF)
|
||||
# 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) &: $(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)
|
||||
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),))
|
||||
else
|
||||
$(eval SFC_LEVEL := low)
|
||||
$(eval EXTRA_FIRRTL_OPTIONS += $(SFC_REPL_SEQ_MEM))
|
||||
endif
|
||||
ifeq (,$(ENABLE_YOSYS_FLOW))
|
||||
$(eval MFC_LOWERING_OPTIONS = $(MFC_BASE_LOWERING_OPTIONS))
|
||||
else
|
||||
$(eval MFC_LOWERING_OPTIONS = $(MFC_BASE_LOWERING_OPTIONS),disallowPackedArrays)
|
||||
endif
|
||||
if [ $(SFC_LEVEL) = low ]; then jq -s '[.[][]]' $(EXTRA_ANNO_FILE) $(SFC_EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE); fi
|
||||
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)
|
||||
rm -rf $(GEN_COLLATERAL_DIR)
|
||||
$(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateModelStageMain,\
|
||||
@@ -196,9 +205,9 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE
|
||||
-X $(SFC_LEVEL) \
|
||||
$(EXTRA_FIRRTL_OPTIONS))
|
||||
-mv $(SFC_FIRRTL_BASENAME).lo.fir $(SFC_FIRRTL_FILE) # 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/unnec-anno-deleted.sfc.anno.json; fi
|
||||
@if [ $(SFC_LEVEL) = low ]; then cat /tmp/unnec-anno-deleted.sfc.anno.json | jq 'del(.[] | select(.class | test("SRAMAnnotation"))?)' > /tmp/unnec-anno-deleted2.sfc.anno.json; fi
|
||||
@if [ $(SFC_LEVEL) = low ]; then cat /tmp/unnec-anno-deleted2.sfc.anno.json > $(SFC_ANNO_FILE) && rm /tmp/unnec-anno-deleted.sfc.anno.json && rm /tmp/unnec-anno-deleted2.sfc.anno.json; fi
|
||||
@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
|
||||
firtool \
|
||||
--format=fir \
|
||||
--dedup \
|
||||
@@ -209,7 +218,7 @@ $(SFC_MFC_TARGETS) &: $(FIRRTL_FILE) $(FINAL_ANNO_FILE) $(VLOG_SOURCES) $(SFC_LE
|
||||
--disable-annotation-classless \
|
||||
--disable-annotation-unknown \
|
||||
--mlir-timing \
|
||||
--lowering-options=emittedLineLength=2048,noAlwaysComb,disallowLocalVariables,verifLabels,locationInfoStyle=wrapInAtSquareBracket \
|
||||
--lowering-options=$(MFC_LOWERING_OPTIONS) \
|
||||
--repl-seq-mem \
|
||||
--repl-seq-mem-file=$(MFC_SMEMS_CONF) \
|
||||
--repl-seq-mem-circuit=$(MODEL) \
|
||||
|
||||
@@ -31,22 +31,19 @@ dependencies:
|
||||
- dromajo # from ucb-bar channel - https://github.com/riscv-boom/dromajo
|
||||
- firtool==1.30.0 # from ucb-bar channel - https://github.com/ucb-bar/firtool-feedstock
|
||||
|
||||
# misc
|
||||
- autoconf
|
||||
- pre-commit
|
||||
- readline
|
||||
- coreutils
|
||||
- jq
|
||||
- pip
|
||||
|
||||
# firemarshal deps
|
||||
- python>=3.9
|
||||
- bc
|
||||
- patch
|
||||
- which
|
||||
- diffutils
|
||||
- bash
|
||||
- gzip
|
||||
- bzip2
|
||||
- perl
|
||||
- tar
|
||||
- file
|
||||
- findutils
|
||||
- qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock
|
||||
- rsync
|
||||
- psutil
|
||||
- doit=0.35.0
|
||||
- doit>=0.34.0
|
||||
- gitpython
|
||||
- humanfriendly
|
||||
- e2fsprogs
|
||||
@@ -54,15 +51,24 @@ dependencies:
|
||||
- bison
|
||||
- flex
|
||||
- expat
|
||||
- make
|
||||
- pyyaml
|
||||
- python>=3.9
|
||||
- bc
|
||||
- unzip
|
||||
- readline
|
||||
- coreutils
|
||||
- patch
|
||||
- which
|
||||
- sed
|
||||
- diffutils
|
||||
- bash
|
||||
- gzip
|
||||
- bzip2
|
||||
- perl
|
||||
- tar
|
||||
- file
|
||||
- wget
|
||||
- findutils
|
||||
- lzop
|
||||
- qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock
|
||||
|
||||
- jq
|
||||
- make
|
||||
- bash-completion
|
||||
- sbt
|
||||
- ca-certificates
|
||||
@@ -88,47 +94,14 @@ dependencies:
|
||||
- elfutils
|
||||
- libdwarf-dev==0.0.0.20190110_28_ga81397fc4 # from ucb-bar channel - using mainline libdwarf-feedstock
|
||||
- conda-lock>=1
|
||||
- wget
|
||||
- sed
|
||||
- autoconf
|
||||
- pre-commit
|
||||
|
||||
# clang-format for driver coding style enforcement.
|
||||
- clang-format
|
||||
- clang-tools
|
||||
|
||||
# python packages
|
||||
# While it is possible to install using pip after creating the
|
||||
# conda environment, pip's dependency resolution can conflict with
|
||||
# conda and create broken environments. It's best to use the conda
|
||||
# packages so that the environment is consistent
|
||||
- boto3==1.20.21
|
||||
- colorama==0.4.3
|
||||
- argcomplete==1.12.3
|
||||
- python-graphviz==0.19
|
||||
- pyparsing==3.0.6
|
||||
- numpy==1.19.5
|
||||
- kiwisolver==1.3.1
|
||||
- matplotlib-base==3.3.4
|
||||
- pandas==1.1.5
|
||||
- awscli==1.22.21
|
||||
- pytest==6.2.5
|
||||
- pytest-dependency==0.5.1
|
||||
- pytest-mock==3.7.0
|
||||
- moto==3.1.0
|
||||
- pyyaml==5.4.1
|
||||
- mypy==0.931
|
||||
- types-pyyaml==6.0.4
|
||||
- boto3-stubs==1.21.6
|
||||
- botocore-stubs==1.24.7
|
||||
- mypy-boto3-s3==1.21.0
|
||||
- sty==1.0.0
|
||||
- pip
|
||||
# hammer packages
|
||||
- sty
|
||||
- pip:
|
||||
- fab-classic==1.19.1
|
||||
- mypy-boto3-ec2==1.21.9
|
||||
- sure==2.0.0
|
||||
- pylddwrap==1.2.1
|
||||
- hammer-vlsi[asap7]==1.0.1
|
||||
|
||||
# doc requirements
|
||||
@@ -137,3 +110,45 @@ dependencies:
|
||||
- sphinx-autobuild
|
||||
- sphinx_rtd_theme
|
||||
- docutils
|
||||
|
||||
# firesim python packages
|
||||
# While it is possible to install using pip after creating the
|
||||
# conda environment, pip's dependency resolution can conflict with
|
||||
# conda and create broken environments. It's best to use the conda
|
||||
# packages so that the environment is consistent
|
||||
- colorama
|
||||
- argcomplete
|
||||
- python-graphviz
|
||||
- pyparsing
|
||||
- numpy
|
||||
- kiwisolver
|
||||
- matplotlib-base
|
||||
- pandas
|
||||
- awscli
|
||||
- pytest
|
||||
- pytest-dependency
|
||||
- pytest-mock
|
||||
- moto
|
||||
- mypy
|
||||
- s3fs
|
||||
- aiohttp
|
||||
- pip:
|
||||
- sure
|
||||
- pylddwrap
|
||||
|
||||
# firesim ci shared packages
|
||||
- boto3
|
||||
- boto3-stubs
|
||||
- mypy-boto3-s3
|
||||
- mypy_boto3_ec2
|
||||
- botocore-stubs
|
||||
- pytz
|
||||
- types-pytz
|
||||
- pyyaml
|
||||
- types-pyyaml
|
||||
- requests
|
||||
- types-requests
|
||||
- azure-identity
|
||||
- fsspec
|
||||
- pip:
|
||||
- fab-classic>=1.19.2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -242,3 +242,14 @@ class WithDefaultFireSimBridges extends Config(
|
||||
new WithTracerVBridge ++
|
||||
new WithFireSimIOCellModels
|
||||
)
|
||||
|
||||
// Shorthand to register all of the provided mmio-only bridges above
|
||||
class WithDefaultMMIOOnlyFireSimBridges extends Config(
|
||||
new WithSerialBridge ++
|
||||
new WithUARTBridge ++
|
||||
new WithBlockDeviceBridge ++
|
||||
new WithFASEDBridge ++
|
||||
new WithFireSimMultiCycleRegfile ++
|
||||
new WithFireSimFAME5 ++
|
||||
new WithFireSimIOCellModels
|
||||
)
|
||||
|
||||
@@ -282,3 +282,9 @@ class FireSimNoMemPortConfig extends Config(
|
||||
new testchipip.WithBackingScratchpad ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.RocketConfig)
|
||||
|
||||
class FireSimRocketMMIOOnlyConfig extends Config(
|
||||
new WithDefaultMMIOOnlyFireSimBridges ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithFireSimConfigTweaks ++
|
||||
new chipyard.RocketConfig)
|
||||
|
||||
@@ -6,25 +6,26 @@ SCRIPT_DIR=$(dirname $0)
|
||||
AXE_DIR=$(realpath ${SCRIPT_DIR}/../tools/axe)
|
||||
ROCKET_DIR=$(realpath ${SCRIPT_DIR}/../generators/rocket-chip)
|
||||
|
||||
TMP_DIR=$(mktemp -d -t tracegen-XXXXXXXX)
|
||||
TO_AXE=${ROCKET_DIR}/scripts/toaxe.py
|
||||
TO_AXE_PY3=/tmp/toaxe.py
|
||||
TO_AXE_PY3=${TMP_DIR}/toaxe.py
|
||||
AXE=${AXE_DIR}/src/axe
|
||||
AXE_SHRINK=${AXE_DIR}/src/axe-shrink.py
|
||||
AXE_SHRINK_PY3=/tmp/axe-shrink.py
|
||||
AXE_SHRINK_PY3=${TMP_DIR}/axe-shrink.py
|
||||
|
||||
# TODO: convert scripts to py3 in src
|
||||
2to3 $TO_AXE -o /tmp -n -w
|
||||
2to3 $TO_AXE -o ${TMP_DIR} -n -w
|
||||
sed -i '30d' $TO_AXE_PY3 # remove import sets
|
||||
2to3 $AXE_SHRINK -o /tmp -n -w
|
||||
2to3 $AXE_SHRINK -o ${TMP_DIR} -n -w
|
||||
|
||||
PATH=$PATH:${AXE_DIR}/src
|
||||
|
||||
grep '.*:.*#.*@' $1 > /tmp/clean-trace.txt
|
||||
python "$TO_AXE_PY3" /tmp/clean-trace.txt > /tmp/trace.axe
|
||||
result=$("$AXE" check wmo /tmp/trace.axe)
|
||||
grep '.*:.*#.*@' $1 > ${TMP_DIR}/clean-trace.txt
|
||||
python "$TO_AXE_PY3" ${TMP_DIR}/clean-trace.txt > ${TMP_DIR}/trace.axe
|
||||
result=$("$AXE" check wmo ${TMP_DIR}/trace.axe)
|
||||
|
||||
if [ "$result" != OK ]; then
|
||||
"$AXE_SHRINK_PY3" wmo /tmp/trace.axe
|
||||
"$AXE_SHRINK_PY3" wmo ${TMP_DIR}/trace.axe
|
||||
else
|
||||
echo OK
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#########################################################################################
|
||||
# makefile variables for Hammer tutorials
|
||||
#########################################################################################
|
||||
tutorial ?= none
|
||||
# tutorial ?= none
|
||||
tutorial ?= sky130-openroad
|
||||
|
||||
extra ?=
|
||||
|
||||
# TODO: eventually have asap7 commercial/openroad tutorial flavors
|
||||
ifeq ($(tutorial),asap7)
|
||||
@@ -34,5 +37,7 @@ ifeq ($(tutorial),sky130-openroad)
|
||||
INPUT_CONFS ?= $(TOOLS_CONF) $(TECH_CONF) $(DESIGN_CONF) $(EXTRA_CONFS)
|
||||
VLSI_OBJ_DIR ?= build-sky130-openroad
|
||||
# Yosys compatibility for CIRCT-generated Verilog, at the expense of elaboration time.
|
||||
ENABLE_CUSTOM_FIRRTL_PASS = 1
|
||||
ENABLE_YOSYS_FLOW = 1
|
||||
endif
|
||||
|
||||
HAMMER_EXTRA_ARGS ?= -p $(TOOLS_CONF) -p $(TECH_CONF) -p $(DESIGN_CONF) $(extra)
|
||||
|
||||
Reference in New Issue
Block a user