URL
https://opencores.org/ocsvn/cpu_lecture/cpu_lecture/trunk
Subversion Repositories cpu_lecture
[/] [cpu_lecture/] [trunk/] [html/] [31_Listing_of_Makefile.html] - Rev 2
Compare with Previous | Blame | View Log
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <TITLE>html/Listing_of_Makefile</TITLE> <META NAME="generator" CONTENT="HTML::TextToHTML v2.46"> <LINK REL="stylesheet" TYPE="text/css" HREF="lecture.css"> </HEAD> <BODY> <P><table class="ttop"><th class="tpre"><a href="30_Listing_of_avr_fpga.ucf.html">Previous Lesson</a></th><th class="ttop"><a href="toc.html">Table of Content</a></th><th class="tnxt"><a href="32_Listing_of_hello.c.html">Next Lesson</a></th></table> <hr> <H1><A NAME="section_1">31 LISTING OF Makefile</A></H1> <pre class="vhdl"> 1 PROJECT=avr_core 2 3 # the vhdl source files (except testbench) 4 # 5 FILES += src/*.vhd 6 7 # the testbench sources and binary. 8 # 9 SIMFILES = test/test_tb.vhd test/RAMB4_S4_S4.vhd 10 SIMTOP = testbench 11 12 # When to stop the simulation 13 # 14 # GHDL_SIM_OPT = --assert-level=error 15 GHDL_SIM_OPT = --stop-time=40us 16 17 SIMDIR = simu 18 19 FLAGS = --ieee=synopsys --warn-no-vital-generic -fexplicit --std=93c 20 21 all: 22 make compile 23 make run 2>& 1 | grep -v std_logic_arith 24 make view 25 26 compile: 27 @mkdir -p simu 28 @echo ----------------------------------------------------------------- 29 ghdl -i $(FLAGS) --workdir=simu --work=work $(SIMFILES) $(FILES) 30 @echo 31 @echo ----------------------------------------------------------------- 32 ghdl -m $(FLAGS) --workdir=simu --work=work $(SIMTOP) 33 @echo 34 @mv $(SIMTOP) simu/$(SIMTOP) 35 36 run: 37 @$(SIMDIR)/$(SIMTOP) $(GHDL_SIM_OPT) --vcdgz=$(SIMDIR)/$(SIMTOP).vcdgz 38 39 view: 40 gunzip --stdout $(SIMDIR)/$(SIMTOP).vcdgz | gtkwave --vcd gtkwave.save 41 42 clean: 43 ghdl --clean --workdir=simu 44 <pre class="filename"> Makefile </pre></pre> <P> <P><hr><BR> <table class="ttop"><th class="tpre"><a href="30_Listing_of_avr_fpga.ucf.html">Previous Lesson</a></th><th class="ttop"><a href="toc.html">Table of Content</a></th><th class="tnxt"><a href="32_Listing_of_hello.c.html">Next Lesson</a></th></table> </BODY> </HTML>