Remove FixedPoint fallback to SFC (Fixed types aren't generated anymore)
This commit is contained in:
@@ -198,19 +198,18 @@ MFC_BASE_LOWERING_OPTIONS ?= emittedLineLength=2048,noAlwaysComb,disallowLocalVa
|
||||
# DOC include start: FirrtlCompiler
|
||||
# There are two possible cases for this step. In the first case, SFC
|
||||
# compiles Chisel to CHIRRTL, and MFC compiles CHIRRTL to Verilog. Otherwise,
|
||||
# when custom FIRRTL transforms are included or if a Fixed type is used within
|
||||
# the dut, SFC compiles Chisel to LowFIRRTL and MFC compiles it to Verilog.
|
||||
# when custom FIRRTL transforms are included
|
||||
# SFC compiles Chisel to LowFIRRTL and MFC compiles it to Verilog.
|
||||
# Users can indicate to the Makefile of custom FIRRTL transforms by setting the
|
||||
# "ENABLE_CUSTOM_FIRRTL_PASS" variable.
|
||||
#
|
||||
# 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) &: $(FIRRTL_FILE)
|
||||
ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS))
|
||||
echo $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), low, none) > $(SFC_LEVEL)
|
||||
echo "$(EXTRA_BASE_FIRRTL_OPTIONS)" $(if $(shell grep "Fixed<" $(FIRRTL_FILE)), "$(SFC_REPL_SEQ_MEM)",) > $(EXTRA_FIRRTL_OPTIONS)
|
||||
echo none > $(SFC_LEVEL)
|
||||
echo "$(EXTRA_BASE_FIRRTL_OPTIONS)" > $(EXTRA_FIRRTL_OPTIONS)
|
||||
else
|
||||
echo low > $(SFC_LEVEL)
|
||||
echo "$(EXTRA_BASE_FIRRTL_OPTIONS)" "$(SFC_REPL_SEQ_MEM)" > $(EXTRA_FIRRTL_OPTIONS)
|
||||
|
||||
@@ -12,7 +12,7 @@ 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 (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,
|
||||
compile CHIRRTL into Verilog. 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/.
|
||||
|
||||
Reference in New Issue
Block a user