Remove Duplicate Compiler Flags
This commit is contained in:
19
common.mk
19
common.mk
@@ -126,10 +126,26 @@ define mfc_extra_anno_contents
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
endef
|
endef
|
||||||
|
define sfc_extra_low_transforms_anno_contents
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"class": "firrtl.stage.RunFirrtlTransformAnnotation",
|
||||||
|
"transform": "barstools.tapeout.transforms.ExtraLowTransforms"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
endef
|
||||||
export mfc_extra_anno_contents
|
export mfc_extra_anno_contents
|
||||||
|
export sfc_extra_low_transforms_anno_contents
|
||||||
$(FINAL_ANNO_FILE) $(MFC_EXTRA_ANNO_FILE): $(ANNO_FILE)
|
$(FINAL_ANNO_FILE) $(MFC_EXTRA_ANNO_FILE): $(ANNO_FILE)
|
||||||
echo "$$mfc_extra_anno_contents" > $(MFC_EXTRA_ANNO_FILE)
|
echo "$$mfc_extra_anno_contents" > $(MFC_EXTRA_ANNO_FILE)
|
||||||
|
ifeq (,$(ENABLE_CUSTOM_FIRRTL_PASS))
|
||||||
jq -s '[.[][]]' $(ANNO_FILE) $(MFC_EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE)
|
jq -s '[.[][]]' $(ANNO_FILE) $(MFC_EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE)
|
||||||
|
else
|
||||||
|
echo "$$sfc_extra_low_transforms_anno_contents" > $(SFC_EXTRA_ANNO_FILE)
|
||||||
|
jq -s '[.[][]]' $(SFC_EXTRA_ANNO_FILE) $(MFC_EXTRA_ANNO_FILE) > $(EXTRA_ANNO_FILE)
|
||||||
|
jq -s '[.[][]]' $(ANNO_FILE) $(EXTRA_ANNO_FILE) > $(FINAL_ANNO_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
.PHONY: firrtl
|
.PHONY: firrtl
|
||||||
firrtl: $(FIRRTL_FILE) $(FINAL_ANNO_FILE)
|
firrtl: $(FIRRTL_FILE) $(FINAL_ANNO_FILE)
|
||||||
@@ -179,9 +195,8 @@ endif
|
|||||||
--annotation-file $(FINAL_ANNO_FILE) \
|
--annotation-file $(FINAL_ANNO_FILE) \
|
||||||
--log-level $(FIRRTL_LOGLEVEL) \
|
--log-level $(FIRRTL_LOGLEVEL) \
|
||||||
--allow-unrecognized-annotations \
|
--allow-unrecognized-annotations \
|
||||||
-DX $(SFC_LEVEL) \
|
|
||||||
-X $(SFC_LEVEL) \
|
-X $(SFC_LEVEL) \
|
||||||
$(EXTRA_FIRRTL_OPTIONS)) # -X and -DX are duplicates to allow for extra FIRRTL passes to be run
|
$(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) # 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 $(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-deleted.sfc.anno.json | jq 'del(.[] | select(.class | test("SRAMAnnotation"))?)' > /tmp/unnec-anno-deleted2.sfc.anno.json; fi
|
||||||
|
|||||||
Submodule tools/barstools updated: 9760528f1d...a9f9068baf
@@ -146,6 +146,7 @@ endif
|
|||||||
# chisel generated outputs
|
# chisel generated outputs
|
||||||
FIRRTL_FILE ?= $(build_dir)/$(long_name).fir
|
FIRRTL_FILE ?= $(build_dir)/$(long_name).fir
|
||||||
ANNO_FILE ?= $(build_dir)/$(long_name).anno.json
|
ANNO_FILE ?= $(build_dir)/$(long_name).anno.json
|
||||||
|
EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extra.anno.json
|
||||||
|
|
||||||
# chisel anno modification output
|
# chisel anno modification output
|
||||||
MFC_EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extrafirtool.anno.json
|
MFC_EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extrafirtool.anno.json
|
||||||
@@ -154,6 +155,7 @@ FINAL_ANNO_FILE ?= $(build_dir)/$(long_name).appended.anno.json
|
|||||||
# scala firrtl compiler (sfc) outputs
|
# scala firrtl compiler (sfc) outputs
|
||||||
SFC_FIRRTL_BASENAME ?= $(build_dir)/$(long_name).sfc
|
SFC_FIRRTL_BASENAME ?= $(build_dir)/$(long_name).sfc
|
||||||
SFC_FIRRTL_FILE ?= $(SFC_FIRRTL_BASENAME).fir
|
SFC_FIRRTL_FILE ?= $(SFC_FIRRTL_BASENAME).fir
|
||||||
|
SFC_EXTRA_ANNO_FILE ?= $(build_dir)/$(long_name).extrasfc.anno.json
|
||||||
SFC_ANNO_FILE ?= $(build_dir)/$(long_name).sfc.anno.json
|
SFC_ANNO_FILE ?= $(build_dir)/$(long_name).sfc.anno.json
|
||||||
|
|
||||||
# firtool compiler outputs
|
# firtool compiler outputs
|
||||||
|
|||||||
Reference in New Issue
Block a user