OpenCores
URL https://opencores.org/ocsvn/mblite/mblite/trunk

Subversion Repositories mblite

[/] [mblite/] [trunk/] [designs/] [core_syn/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 takar
TOP_LEVEL_DIR=../..
2
 
3
DESIGN_NAME=core_syn
4
DESIGN_DIR=$(TOP_LEVEL_DIR)/designs/$(DESIGN_NAME)
5
 
6
MBLITE_HW_DIR=$(TOP_LEVEL_DIR)/hw
7
MBLITE_STD_DIR=$(MBLITE_HW_DIR)/std
8
MBLITE_CORE_DIR=$(MBLITE_HW_DIR)/core
9
 
10
MBLITE_LIBRARY_NAME=mblite
11
 
12
SIM_DIR=$(DESIGN_DIR)/work
13
MODELSIM_SIM_DIR=$(SIM_DIR)/modelsim
14
MODELSIM_WORK_DIR=$(MODELSIM_SIM_DIR)/$(DESIGN_NAME)
15
 
16
WORK_LIBRARY_NAME=work
17
 
18
default:
19
        @echo "Makefile for the MB-lite microprocessor"
20
        @echo "---------------------------------------"
21
        @echo "Make options:"
22
        @echo "   default: Echo these instructions"
23
        @echo "       all: Compile MODEL to library work"
24
        @echo "            Compile TESTBENCH to library work"
25
        @echo "       syn: Compile SYNTHESIZED MODEL to library work"
26
        @echo "            Compile TESTBENCH to library work"
27
        @echo "       par: Compile PAR MODEL to library work"
28
        @echo "            Compile TESTBENCH to library work"
29
        @echo "     clean: Remove all compiled and generated files"
30
 
31
all: modelsim-design
32
syn: modelsim-syn
33
par: modelsim-par
34
 
35
################
36
# WORK library #
37
################
38
 
39
# Create library WORK
40
modelsim-worklib:
41
        @vlib $(MODELSIM_WORK_DIR)/$(WORK_LIBRARY_NAME)
42
        @vmap $(WORK_LIBRARY_NAME) $(MODELSIM_WORK_DIR)/$(WORK_LIBRARY_NAME)
43
 
44
# Compile MB-LITE configuration to library MB-LITE
45
modelsim-mblite-config: modelsim-mblitelib
46
        @vcom -work $(MBLITE_LIBRARY_NAME) $(DESIGN_DIR)/config_Pkg.vhd
47
 
48
# Compile a design using MB-LITE to library WORK
49
modelsim-design: modelsim-std modelsim-mblite-config modelsim-core modelsim-worklib
50
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/sram_4en_init.vhd
51
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/sram_init.vhd
52
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/mblite_soc.vhd
53
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/testbench.vhd
54
 
55
modelsim-syn: modelsim-std modelsim-mblite-config modelsim-worklib
56
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/core_Pkg.vhd
57
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/mblite_soc_synthesis.vhd
58
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/testbench.vhd
59
 
60
modelsim-par: modelsim-std modelsim-mblite-config modelsim-worklib
61
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/core_Pkg.vhd
62
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/mblite_soc_timesim.vhd
63
        @vcom -work $(WORK_LIBRARY_NAME) $(DESIGN_DIR)/testbench.vhd
64
 
65
###################
66
# MB-LITE library #
67
###################
68
 
69
# Create library MB-LITE
70
modelsim-mblitelib:
71
        @mkdir -p $(MODELSIM_WORK_DIR)
72
        @vlib $(MODELSIM_WORK_DIR)/$(MBLITE_LIBRARY_NAME)
73
        @vmap $(MBLITE_LIBRARY_NAME) $(MODELSIM_WORK_DIR)/$(MBLITE_LIBRARY_NAME)
74
 
75
# Compile MB-LITE standard components
76
modelsim-std: modelsim-mblitelib
77
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_STD_DIR)/std_Pkg.vhd
78
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_STD_DIR)/dsram.vhd
79
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_STD_DIR)/sram_4en.vhd
80
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_STD_DIR)/sram.vhd
81
 
82
# Compile MB-LITE processor
83
modelsim-core: modelsim-std modelsim-mblite-config
84
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/core_Pkg.vhd
85
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/core.vhd
86
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/fetch.vhd
87
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/gprf.vhd
88
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/decode.vhd
89
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/execute.vhd
90
        @vcom -work $(MBLITE_LIBRARY_NAME) $(MBLITE_CORE_DIR)/mem.vhd
91
 
92
###########################
93
# Remove work directories #
94
###########################
95
 
96
modelsim-clean:
97
        @rm -r -f $(MODELSIM_WORK_DIR)
98
 
99
clean:
100
        @rm -r -f $(SIM_DIR)
101
        @rm -f transcript
102
        @rm -f modelsim.ini
103
        @rm -f vsim.wlf

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.