source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis @ 112

Last change on this file since 112 was 112, checked in by rosiere, 15 years ago

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1#
2# $Id: Makefile.Synthesis 112 2009-03-18 22:36:26Z rosiere $
3#
4# [ Description ]
5#
6# Makefile
7#
8
9#-----[ Variables ]----------------------------------------
10
11DIR_VHDL                        = .
12DIR_WORK                        = work
13
14FPGA_CFG_FILE_LOCAL             = mkf.info
15FPGA_CFG_FILE_GLOBAL_DIR        = $(DIR_MORPHEO)/Behavioural
16FPGA_CFG_FILE_GLOBAL            = configure.mkf
17
18FPGA_FILES                      = $(patsubst $(DIR_CFG_GEN)/%.cfg,%,$(wildcard $(DIR_CFG_GEN)/*.cfg))   \
19                                  $(patsubst $(DIR_CFG_USER)/%.cfg,%,$(wildcard $(DIR_CFG_USER)/*.cfg))
20
21FPGA_LOG_FILES                  = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))       \
22                                  $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_USER)/*.cfg))
23#-----[ Rules ]--------------------------------------------
24.PRECIOUS                       : $(DIR_LOG)/%.vhdl.log $(DIR_LOG)/%.sim.log
25
26vhdl                            : execute $(DIR_WORK)
27                                @\
28                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Pack.vhdl));                                              \
29                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
30                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;          \
31                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*.vhdl|$(GREP_NOT) "(_Pack\.|_Testbench\.)"));              \
32                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
33                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;          \
34                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));                                         \
35                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});                                              \
36                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
37
38
39sim                             : vhdl
40                                @\
41                                declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));                                         \
42                                declare -a log_files=($${vhdl_files[*]/%.vhdl/.sim.log});                                               \
43                                if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
44
45fpga                            : sim
46                                @\
47                                $(ECHO) -e "" > $(FPGA_CFG_FILE_LOCAL); \
48                                $(ECHO) "files :::::::: $(FPGA_FILES)"; \
49                                for file in $(FPGA_FILES); do                                                                           \
50                                        declare -a files=($$($(LS) $$file*.vhdl|$(GREP_NOT) "(_Testbench\.)"));                         \
51                                        $(ECHO) -e "# $$file"                             >> $(FPGA_CFG_FILE_LOCAL);                    \
52                                        $(ECHO) -e "target_dep\tall\t$$file.ngc"          >> $(FPGA_CFG_FILE_LOCAL);                    \
53                                        $(ECHO) -e "target_dep\t$$file.ngc\t$$file.prj"   >> $(FPGA_CFG_FILE_LOCAL);                    \
54                                        $(ECHO) -e "target_dep\t$$file.prj\t$${files[*]}" >> $(FPGA_CFG_FILE_LOCAL);                    \
55                                        $(ECHO) -e ""                                     >> $(FPGA_CFG_FILE_LOCAL);                    \
56                                done;                                   \
57                                ($(XILINX_ENV); cd $(FPGA_CFG_FILE_GLOBAL_DIR); ./$(FPGA_CFG_FILE_GLOBAL));                             \
58                                $(MAKE) $(FPGA_LOG_FILES);
59
60$(DIR_LOG)/%.fpga.log           :
61                                @\
62                                $(ECHO) "Synthetis on FPGA  : $*"; \
63                                $(XILINX_ENV); $(MAKE) -f Makefile.mkf $*.ngc &> $@;
64
65$(DIR_WORK)                     :
66                                @\
67                                $(ECHO) "Create work-space  : $@"; \
68                                $(MODELTECH_VLIB) $@; \
69                                $(MODELTECH_VMAP) $(XILINX_CORELIB);
70
71$(DIR_LOG)/%.sim.log            : $(DIR_VHDL)/%.vhdl $(DIR_LOG)/%.vhdl.log
72                                @\
73                                $(ECHO) "VHDL's Simulation  : $*"; \
74                                $(MODELTECH_VSIM) "$(DIR_WORK).`$(BASENAME) $* |$(UPPERtoLOWER)`" &> $@; \
75                                declare -i count=`$(GREP) -ch "Test OK" $@`;            \
76                                if $(TEST) $$count -ne 0;                               \
77                                then echo "                     $* ... OK";             \
78                                else echo "                     $* ... KO"; exit 1;     \
79                                fi;
80
81$(DIR_LOG)/%.vhdl.log           : $(DIR_VHDL)/%.vhdl
82                                @\
83                                $(ECHO) "VHDL's Compilation : $*"; \
84                                $(MODELTECH_VCOM) $< &> $@;
85
86synthesis_clean                 :
87                                @\
88                                if $(TEST) -f Makefile.mkf; then $(MAKE) -f Makefile.mkf clean; fi; \
89                                $(RM) $(DIR_WORK) transcript Makefile.mkf *.wlf;
90
91synthesis_clean_all             : synthesis_clean
92
93synthesis_help                  :
94                                @\
95                                $(ECHO) " -----[ Synthesis ]----------------------------------";\
96                                $(ECHO) "";\
97                                $(ECHO) " * vhdl                 : compile all vhdl's file";\
98                                $(ECHO) " * sim                  : simulate all testbench's file";\
99                                $(ECHO) " * fpga                 : synthetis with fpga's tools";\
100                                $(ECHO) "";
Note: See TracBrowser for help on using the repository browser.