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

Subversion Repositories uart16750

[/] [uart16750/] [trunk/] [sim/] [rtl_sim/] [run/] [Makefile] - Blame information for rev 23

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 hasw
#
2
# Makefile for ghdl simulation
3
#
4
 
5
# Programs
6
GHDL = ghdl
7
PERL = perl
8
 
9
# Directories
10 23 hasw
SRCDIR = ../../../rtl/vhdl
11
TBDIR  = ../../../bench/vhdl
12
SIMDIR = ../bin
13
LOGDIR = ../log
14 12 hasw
 
15
# UART16750 sources
16
SRC =  slib_clock_div.vhd
17
SRC += slib_counter.vhd
18
SRC += slib_edge_detect.vhd
19
SRC += slib_fifo.vhd
20
SRC += slib_input_filter.vhd
21
SRC += slib_input_sync.vhd
22
SRC += slib_mv_filter.vhd
23
SRC += uart_baudgen.vhd
24
SRC += uart_interrupt.vhd
25
SRC += uart_receiver.vhd
26
SRC += uart_transmitter.vhd
27
SRC += uart_16750.vhd
28
 
29
# Testbench source
30
TBSRC =  txt_util.vhd
31
TBSRC += uart_package.vhd
32
TBSRC += uart_transactor.vhd
33
 
34
# Testbench stimuli and log
35
TBSTIMGEN = $(SIMDIR)/uart_test_stim.pl
36 23 hasw
TBSTIMDAT = uart_stim.dat
37
TBLOG     = $(LOGDIR)/uart_log.txt
38
TBVCD     = $(LOGDIR)/uart_log.vcd
39 12 hasw
 
40
# Simulation entity and options
41
SIMPROG = uart_transactor
42 23 hasw
SIMOPTS = --stop-time=160ms
43 12 hasw
 
44
all: $(SIMPROG)
45
 
46
$(TBSTIMDAT): $(TBSTIMGEN)
47
                          $(PERL) $^ > $@
48
 
49
$(SIMPROG): $(addprefix $(SRCDIR)/,$(SRC)) $(addprefix $(TBDIR)/,$(TBSRC))
50
                        $(GHDL) -a $^
51
                        $(GHDL) -e $@
52
 
53
sim:            $(SIMPROG) $(TBSTIMDAT)
54
                        $(GHDL) -r $(SIMPROG) $(SIMOPTS)
55 23 hasw
                        cp uart_log.txt $(TBLOG)
56 12 hasw
 
57
vcd:            $(SIMPROG) $(TBSTIMDAT)
58
                        $(GHDL) -r $(SIMPROG) $(SIMOPTS) --vcd=$(TBVCD)
59
 
60
clean:
61
                        $(GHDL) --clean
62
                        rm -f $(TBSTIMDAT) $(TBVCD)
63
 
64
.PHONY:         clean sim vcd

powered by: WebSVN 2.1.0

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