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

Subversion Repositories wb_fifo

[/] [wb_fifo/] [trunk/] [workspaces/] [Makefile] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 daniel.kho
#
2
#       Example Makefile for Synopsys VCS-MX simulation.
3
#
4
#       Author(s):
5
#       - Daniel C.K. Kho, daniel.kho@opencores.org | daniel.kho@tauhop.com
6
#
7
#       Copyright (C) 2012-2013 Authors and OPENCORES.ORG
8
#
9
# This program is free software: you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation, either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with this program.  If not, see .
21
#
22
# This notice and disclaimer must be retained as part of this text at all times.
23
#
24
#       @dependencies:
25
#       @designer: Daniel C.K. Kho [daniel.kho@gmail.com] | [daniel.kho@tauhop.com]
26
#       @history: @see Mercurial log for full list of changes.
27
#
28
#       @Description:
29
#
30
 
31
SHELL = /bin/bash
32
 
33
# project name
34
PROJECT = pterodactyl
35
 
36
ROOT_PATH = $(PWD)
37
MODEL_SRC_PATH = $(ROOT_PATH)/../model
38
VHDL_SRC_PATH = $(ROOT_PATH)/../hw
39
COMMONFILES_PATH = $(SRC_PATH)/common
40
 
41
# model files
42
MODEL_FILES = $(SRC_PATH)/*.sagews $(SRC_PATH)/*.m $(SRC_PATH)/*.c
43
 
44
# vhdl files
45
#VHDL_FILES = $(SRC_PATH)/*.vhdl
46
#COMMON_VHDL_FILES = $(COMMONFILES_PATH)/*.vhdl
47
 
48
# build options
49
GHDL_BUILD_OPTS = #--std=02
50
DC_BUILD_OPTS =
51
VCS_BUILD_OPTS = -vhdl08
52
 
53
# Simulation break condition
54
GHDL_SIM_OPTS    = --assert-level=error
55
#GHDL_SIM_OPTS    = --stop-time=5us             #500ns
56
 
57
# Workspaces
58
#SIM_PATH = $(ROOT_PATH)/simulation/ghdl
59
#SYNTH_PATH = $(ROOT_PATH)/synthesis/vivado
60
QUESTA_SIM_PATH = $(ROOT_PATH)/simulation/questa
61
VCS_SIM_PATH = $(ROOT_PATH)/simulation/vcs-mx
62
GHDL_SIM_PATH = $(ROOT_PATH)/simulation/ghdl
63
DC_SYNTH_PATH = $(ROOT_PATH)/synthesis/dc
64
 
65
# testbench
66
TARGET = tb_blowfish
67
#SIMFILES = testbench/led_top_tb.vhd
68
 
69
#LIBS = -Pcommon
70
LIBS = -P$(SRC_PATH)/common
71
#GHDL_FLAGS      = --ieee=synopsys --warn-no-vital-generic
72
 
73
model-build:
74
        sage ...
75
        gcc ...
76
 
77
ghdl-build:
78
        #mkdir -p $(SIM_PATH)
79
        ghdl $(GHDL_BUILD_OPTS) -i $(LIBS) --workdir=$(COMMONFILES_PATH) --work=common $(COMMON_FILES)
80
        ghdl $(GHDL_BUILD_OPTS) -i $(LIBS) --workdir=$(SIM_PATH) --work=work $(FILES)
81
        ghdl -m $(LIBS) --workdir=$(SIM_PATH) --work=work $(TARGET)
82
 
83
ghdl-run:
84
        #ghdl -r $(TARGET)
85
        @$(GHDL_SIM_PATH)/$(TARGET) $(GHDL_SIM_OPTS) --vcdgz=$(GHDL_SIM_PATH)/$(TARGET).vcdgz &
86
        #@$(SRC_PATH)/$(TARGET) $(GHDL_SIM_OPTS) --wave=$(SIM_PATH)/$(TARGET).ghw &
87
 
88
ghdl-view:
89
        gzip --decompress --stdout $(GHDL_SIM_PATH)/$(TARGET).vcdgz | gtkwave --vcd $(GHDL_SIM_PATH)/$(TARGET).gtkwave.sav &
90
        #gtkwave $(SIM_PATH)/$(TARGET).ghw $(SRC_PATH)/$(TARGET).gtkwave.gtkw &
91
 
92
 
93
simulate:
94
        make clean-sim;
95
 
96
        cd $(SIM_PATH); \
97
                mkdir -p ./work ./tauhop ./osvvm;
98
 
99
        #cd $(SIM_PATH); \
100
        #       vhdlan $(VCS_BUILD_OPTS) -work tauhop \
101
        #               $(VHDL_SRC_PATH)/packages/tauhop/pkg-tlm.vhdl \
102
        #               $(VHDL_SRC_PATH)/packages/tauhop/pkg-dsp.vhdl \
103
        #               | tee -ai $(SIM_PATH)/simulate.log;
104
        #
105
        #cd $(SIM_PATH); \
106
        #       vhdlan $(VCS_BUILD_OPTS) -work work \
107
        #               $(VHDL_SRC_PATH)/flight-controller.vhdl \
108
        #               | tee -ai $(SIM_PATH)/simulate.log;
109
        #
110
        ##      ../../../rtl/vhdl-tb/cfg_multiArch.vhdl;
111
 
112
        # Pass the simulation path into script.
113
        cd $(SIM_PATH); \
114
                $(SIM_PATH)/simulate.sh `echo $(SIM_PATH)` 2>&1 \
115
                        | tee -ai $(SIM_PATH)/simulate.log &
116
 
117
synthesise:
118
        make clean-synth;
119
 
120
        echo $(date);
121
 
122
        dc_shell -f $(SYNTH_PATH)/synthesise.f 2>&1 \
123
                | tee -i $(SYNTH_PATH)/synthesise.log;
124
 
125
ghdl-clean:
126
        ghdl --clean --workdir=$(SIM_PATH)
127
 
128
clean-sim:
129
        rm -rf \
130
                $(VCS_SIM_PATH)/simv* \
131
                $(VCS_SIM_PATH)/64 \
132
                $(VCS_SIM_PATH)/simulate.log \
133
                $(VCS_SIM_PATH)/work \
134
                $(VCS_SIM_PATH)/tauhop \
135
                $(VCS_SIM_PATH)/osvvm;
136
 
137
        rm -rf \
138
                $(QUESTA_SIM_PATH)/transcript \
139
                $(QUESTA_SIM_PATH)/*.ini \
140
                $(QUESTA_SIM_PATH)/*.wlf \
141
                $(QUESTA_SIM_PATH)/simulate.log \
142
                $(QUESTA_SIM_PATH)/work \
143
                $(QUESTA_SIM_PATH)/tauhop \
144
                $(QUESTA_SIM_PATH)/osvvm;
145
 
146
clean-synth:
147
        rm -rf \
148
                ./command.log \
149
                ./default.svf;
150
 
151
        echo $(date "+[%Y-%m-%d %H:%M:%S]: Remove successful.");

powered by: WebSVN 2.1.0

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