1 |
11 |
dinesha |
#------------------------------------------------------------------------------
|
2 |
|
|
# Makefile for Synthesis
|
3 |
|
|
#------------------------------------------------------------------------------
|
4 |
|
|
|
5 |
|
|
# Paths
|
6 |
|
|
export ROOT_DIR := $(shell pwd)
|
7 |
|
|
export DESIGN_FILE := $(ROOT_DIR)/syntacore.sv
|
8 |
|
|
export SYNTH_LOG := $(ROOT_DIR)/synth.log
|
9 |
|
|
export REPORT_DIR := $(ROOT_DIR)/reports
|
10 |
|
|
export NETLIST_DIR := $(ROOT_DIR)/netlist
|
11 |
|
|
export TMP_DIR := $(ROOT_DIR)/tmp
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
# Targets
|
15 |
|
|
.PHONY: clean create merge synth
|
16 |
|
|
|
17 |
|
|
default: clean create merge synth
|
18 |
|
|
|
19 |
|
|
synth: clean create merge
|
20 |
|
|
yosys -g -c synth.tcl -l synth.log
|
21 |
|
|
|
22 |
|
|
create:
|
23 |
|
|
mkdir -p ./tmp/synthesis;
|
24 |
|
|
mkdir -p ./reports;
|
25 |
|
|
mkdir -p ./netlist;
|
26 |
|
|
$(OPENLANE_ROOT)/scripts/libtrim.pl $(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lib/sky130_fd_sc_hd__tt_025C_1v80.lib $(PDK_ROOT)/sky130A/libs.tech/openlane/sky130_fd_sc_hd/no_synth.cells > ./tmp/trimmed.lib
|
27 |
|
|
|
28 |
|
|
merge:
|
29 |
|
|
################################################
|
30 |
|
|
# yosys has issue in propgating the golbal parameter from one file to other file
|
31 |
|
|
# to fix this issue, we have concatinated all the rtl file into single file before starting synthesis
|
32 |
|
|
# only memory are exclded from this list
|
33 |
|
|
# ################################################
|
34 |
|
|
cat ../src/core/pipeline/scr1_pipe_top.sv > syntacore.sv;
|
35 |
|
|
cat ../src/core/scr1_core_top.sv >> syntacore.sv;
|
36 |
|
|
cat ../src/core/scr1_dm.sv >> syntacore.sv;
|
37 |
|
|
cat ../src/core/scr1_tapc_synchronizer.sv >> syntacore.sv;
|
38 |
|
|
cat ../src/core/scr1_clk_ctrl.sv >> syntacore.sv;
|
39 |
|
|
cat ../src/core/scr1_scu.sv >> syntacore.sv;
|
40 |
|
|
cat ../src/core/scr1_tapc.sv >> syntacore.sv;
|
41 |
|
|
cat ../src/core/scr1_tapc_shift_reg.sv >> syntacore.sv;
|
42 |
|
|
cat ../src/core/scr1_dmi.sv >> syntacore.sv;
|
43 |
|
|
cat ../src/core/primitives/scr1_reset_cells.sv >> syntacore.sv;
|
44 |
|
|
cat ../src/core/pipeline/scr1_pipe_ifu.sv >> syntacore.sv;
|
45 |
|
|
cat ../src/core/pipeline/scr1_pipe_idu.sv >> syntacore.sv;
|
46 |
|
|
cat ../src/core/pipeline/scr1_pipe_exu.sv >> syntacore.sv;
|
47 |
|
|
cat ../src/core/pipeline/scr1_pipe_mprf.sv >> syntacore.sv;
|
48 |
|
|
cat ../src/core/pipeline/scr1_pipe_csr.sv >> syntacore.sv;
|
49 |
|
|
cat ../src/core/pipeline/scr1_pipe_ialu.sv >> syntacore.sv;
|
50 |
|
|
cat ../src/core/pipeline/scr1_pipe_lsu.sv >> syntacore.sv;
|
51 |
|
|
cat ../src/core/pipeline/scr1_pipe_hdu.sv >> syntacore.sv;
|
52 |
|
|
cat ../src/core/pipeline/scr1_pipe_tdu.sv >> syntacore.sv;
|
53 |
|
|
cat ../src/core/pipeline/scr1_ipic.sv >> syntacore.sv;
|
54 |
|
|
cat ../src/top/scr1_dmem_router.sv >> syntacore.sv;
|
55 |
|
|
cat ../src/top/scr1_imem_router.sv >> syntacore.sv;
|
56 |
|
|
#cat ../src/top/scr1_dp_memory.sv >> syntacore.sv;
|
57 |
|
|
cat ../src/top/scr1_tcm.sv >> syntacore.sv;
|
58 |
|
|
cat ../src/top/scr1_timer.sv >> syntacore.sv;
|
59 |
|
|
#cat ../src/top/scr1_dmem_ahb.sv >> syntacore.sv;
|
60 |
|
|
#cat ../src/top/scr1_imem_ahb.sv >> syntacore.sv;
|
61 |
|
|
cat ../src/top/scr1_top_axi.sv >> syntacore.sv;
|
62 |
|
|
cat ../src/top/scr1_mem_axi.sv>> syntacore.sv;
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
clean:
|
67 |
|
|
$(RM) $(DESIGN_FILE)
|
68 |
|
|
$(RM) $(SYNTH_LOG)
|
69 |
|
|
$(RM) -R $(REPORT_DIR)
|
70 |
|
|
$(RM) -R $(NETLIST_DIR)
|
71 |
|
|
$(RM) -R $(TMP_DIR)
|