-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcc_toolchain.mk
More file actions
32 lines (25 loc) · 891 Bytes
/
cc_toolchain.mk
File metadata and controls
32 lines (25 loc) · 891 Bytes
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
30
31
32
OFL = openFPGALoader
RM = rm -rf
CC_TOOL_DIR = $(CC_TOOL)
YOSYS = $(CC_TOOL)/bin/yosys/yosys
P_R = $(CC_TOOL)/bin/p_r/p_r
YS_PARAMS += -nomx8
PRFLAGS += --verbose
PRFLAGS += -cCP
all: impl
synth: $(TOP)_synth.v
$(TOP)_synth.v: $(OBJS)
$(YOSYS) -ql synth.log $(YS_OPTS) -p 'read_verilog $(YS_SYNTH_PARAMS) -sv $^; synth_gatemate $(YS_PARAMS) -top $(TOP) -vlog $(TOP)_synth.v'
impl: $(TOP)_00.cfg
$(TOP)_00.cfg: $(TOP)_synth.v $(CCF)
$(P_R) -i $(TOP)_synth.v -ccf $(CCF) -o $(TOP) $(PRFLAGS) > $@.log
load: jtag
jtag: $(TOP)_00.cfg
$(OFL) $(OFLFLAGS) -b $(BOARD) $^
jtag-flash: $(TOP)_00.cfg
$(OFL) $(OFLFLAGS) -b $(BOARD) -f --verify $^
clean:
$(RM) *.log *_synth.v *.history *.txt *.refwire *.refparam
$(RM) *.refcomp *.pos *.pathes *.path_struc *.net *.id *.prn
$(RM) *_00.v *.used *.sdf *.place *.pin *.cfg* *.cdf *.idh
$(RM) *.bit *.json