forked from lowRISC/lowrisc-chip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefrag-build
29 lines (19 loc) · 1003 Bytes
/
Makefrag-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# See LICENSE.Cambridge for license details.
#--------------------------------------------------------------------
# Build Verilog
#--------------------------------------------------------------------
.SECONDARY: $(firrtl) $(verilog)
$(generated_dir)/%.fir $(generated_dir)/%.d: $(FIRRTL_JAR) $(chisel_srcs) $(bootrom_image)
mkdir -p $(dir $@)
cd $(base_dir) && $(SBT) "runMain $(PROJECT).Generator $(generated_dir) $(PROJECT) $(MODEL) $(PROJECT) $(CONFIG)"
$(generated_dir)/%.sv $(generated_dir)/%.conf: $(generated_dir)/%.fir $(FIRRTL_JAR)
mkdir -p $(dir $@)
$(FIRRTL) -i $< -o $(generated_dir)/$*.sv -X sverilog --infer-rw $(MODEL) --repl-seq-mem -c:$(MODEL):-o:$(generated_dir)/$*.conf
$(generated_dir)/consts.vh: $(generated_dir)/$(PROJECT).$(CONFIG).fir
cp $(generated_dir)/$(CONFIG).vh $(generated_dir)/consts.vh
$(generated_dir)/%.behav_srams.sv: $(generated_dir)/%.conf
$(mem_gen) $< > [email protected] && mv -f [email protected] $@
# emacs local variable
# Local Variables:
# mode: makefile
# End: