Skip to content

Commit 7626710

Browse files
committed
treewide: remove unnecessary make fragments
1 parent f1e995a commit 7626710

File tree

3 files changed

+1
-213
lines changed

3 files changed

+1
-213
lines changed

Makefile

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77

88
# Tools
99
BENDER ?= bender
10-
PYTHON3 ?= python3
11-
VERILATOR ?= /foss/tools/bin/verilator
12-
YOSYS ?= yosys
13-
OPENROAD ?= openroad
14-
KLAYOUT ?= klayout
15-
VSIM ?= vsim
16-
REGGEN ?= $(PYTHON3) $(shell $(BENDER) path register_interface)/vendor/lowrisc_opentitan/util/regtool.py
1710

1811
# Directories
1912
# directory of the path to the last called Makefile (this one)
@@ -60,81 +53,6 @@ sw: $(SW_HEX)
6053

6154
.PHONY: software sw
6255

63-
##################
64-
# RTL Simulation #
65-
##################
66-
# Questasim/Modelsim/vsim
67-
VLOG_ARGS = -svinputport=compat
68-
VSIM_ARGS = -t 1ns -voptargs=+acc
69-
VSIM_ARGS += -suppress vsim-3009 -suppress vsim-8683 -suppress vsim-8386
70-
71-
vsim/compile_rtl.tcl: Bender.lock Bender.yml
72-
$(BENDER) script vsim -t rtl -t vsim -t simulation -t verilator -DSYNTHESIS -DSIMULATION --vlog-arg="$(VLOG_ARGS)" > $@
73-
74-
vsim/compile_netlist.tcl: Bender.lock Bender.yml
75-
$(BENDER) script vsim -t ihp13 -t vsim -t simulation -t verilator -t netlist_yosys -DSYNTHESIS -DSIMULATION > $@
76-
77-
## Simulate RTL using Questasim/Modelsim/vsim
78-
vsim: vsim/compile_rtl.tcl $(SW_HEX)
79-
rm -rf vsim/work
80-
cd vsim; $(VSIM) -c -do "source compile_rtl.tcl; exit"
81-
cd vsim; $(VSIM) +binary="$(realpath $(SW_HEX))" -gui tb_croc_soc $(VSIM_ARGS)
82-
83-
## Simulate netlist using Questasim/Modelsim/vsim
84-
vsim-yosys: vsim/compile_netlist.tcl $(SW_HEX) yosys/out/croc_chip_yosys_debug.v
85-
rm -rf vsim/work
86-
cd vsim; $(VSIM) -c -do "source compile_netlist.tcl; source compile_tech.tcl; exit"
87-
cd vsim; $(VSIM) -gui tb_croc_soc $(VSIM_ARGS)
88-
89-
90-
# Verilator
91-
# Turn off style warnings and well-defined SystemVerilog warnings that should be part of -Wno-style
92-
VERILATOR_ARGS = -Wno-fatal -Wno-style \
93-
-Wno-BLKANDNBLK -Wno-WIDTHEXPAND -Wno-WIDTHTRUNC -Wno-WIDTHCONCAT -Wno-ASCRANGE
94-
95-
VERILATOR_ARGS += --binary -j 0
96-
VERILATOR_ARGS += --timing --autoflush --trace-fst --trace-threads 2 --trace-structs
97-
VERILATOR_ARGS += --unroll-count 1 --unroll-stmts 1
98-
VERILATOR_ARGS += --x-assign fast --x-initial fast
99-
VERILATOR_CFLAGS += -O3 -march=native -mtune=native
100-
101-
verilator/croc.f: Bender.lock Bender.yml
102-
$(BENDER) script verilator -t rtl -t verilator -DSYNTHESIS -DVERILATOR > $@
103-
104-
verilator/obj_dir/Vtb_croc_soc: verilator/croc.f $(SW_HEX)
105-
cd verilator; $(VERILATOR) $(VERILATOR_ARGS) -O3 --top tb_croc_soc -f croc.f
106-
107-
## Simulate RTL using Verilator
108-
verilator: verilator/obj_dir/Vtb_croc_soc
109-
cd verilator; obj_dir/Vtb_croc_soc +binary="$(realpath $(SW_HEX))"
110-
111-
.PHONY: verilator vsim vsim-yosys
112-
113-
114-
####################
115-
# Open Source Flow #
116-
####################
117-
# Bender manages the different IPs and can be used to generate file-lists for synthesis
118-
TOP_DESIGN ?= croc_chip
119-
DUT_DESIGN ?= croc_soc
120-
BENDER_TARGETS ?= asic ihp13 rtl synthesis
121-
SV_DEFINES ?= VERILATOR SYNTHESIS COMMON_CELLS_ASSERTS_OFF
122-
123-
## Generate croc.flist used to read design in yosys
124-
yosys-flist: Bender.lock Bender.yml rtl/*/Bender.yml
125-
$(BENDER) script flist-plus $(foreach t,$(BENDER_TARGETS),-t $(t)) $(foreach d,$(SV_DEFINES),-D $(d)=1) > $(PROJ_DIR)/croc.flist
126-
127-
include yosys/yosys.mk
128-
include openroad/openroad.mk
129-
130-
klayout/croc_chip.gds: $(OR_OUT)/croc.def klayout/*.sh klayout/*.py
131-
./klayout/def2gds.sh
132-
133-
## Generate merged .gds from openroads .def output
134-
klayout: klayout/croc_chip.gds
135-
136-
.PHONY: klayout yosys-flist
137-
13856

13957
#################
14058
# Documentation #
@@ -163,12 +81,6 @@ help: Makefile
16381

16482
## Delete generated files and directories
16583
clean:
166-
rm -f $(SV_FLIST)
167-
rm -f klayout/croc_chip.gds
168-
rm -rf verilator/obj_dir/
169-
rm -f verilator/croc.f
170-
rm -f verilator/croc.vcd
171-
$(MAKE) ys_clean
172-
$(MAKE) or_clean
84+
$(MAKE) -C sw clean
17385

17486
.PHONY: clean

openroad/openroad.mk

Lines changed: 0 additions & 70 deletions
This file was deleted.

yosys/yosys.mk

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)