Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisione Revisione precedente
Prossima revisione
Revisione precedente
vlsi:workbook2:makefiles [28/05/2014 23:01]
pacher
vlsi:workbook2:makefiles [05/06/2014 23:27] (versione attuale)
pacher
Linea 1: Linea 1:
  
  
-====== Using makefiles to perform simulations with Cadence Incisive (irun) ​======+====== Using makefiles to automate digital design tasks ======
  
 [ __[[vlsi:​workbook2|Back]]__ ] [ __[[vlsi:​workbook2|Back]]__ ]
  
  
 +[[http://​sunsite.ualberta.ca/​Documentation/​Gnu/​make-3.79/​html_chapter/​make_7.html]]
  
 [[http://​www.cs.indiana.edu/​hmg/​le/​project-home/​xilinx/​ise_13.2/​ISE_DS/​ISE/​coregen/​ip/​xilinx/​primary/​com/​xilinx/​ip/​cdn_axi_bfm/​examples/​Makefile]] [[http://​www.cs.indiana.edu/​hmg/​le/​project-home/​xilinx/​ise_13.2/​ISE_DS/​ISE/​coregen/​ip/​xilinx/​primary/​com/​xilinx/​ip/​cdn_axi_bfm/​examples/​Makefile]]
Linea 19: Linea 20:
 [[http://​www.csee.umbc.edu/​portal/​help/​VHDL/​Makefile.cadence]] [[http://​www.csee.umbc.edu/​portal/​help/​VHDL/​Makefile.cadence]]
  
 +[[http://​www.ece.ucdavis.edu/​~astill/​Makefile]]
  
 ====== Makefile for Cadence Incisive tools ====== ====== Makefile for Cadence Incisive tools ======
 +
 +[[http://​vak-opensource.googlecode.com/​svn/​trunk/​hardware/​systemverilog/​uart-example/​Makefile]] \\
 +[[https://​groups.google.com/​forum/#​!topic/​comp.lang.verilog/​iMd4NMmko8s]]
  
 ''​configure''​ file: ''​configure''​ file:
Linea 117: Linea 122:
 RM = rm -rf RM = rm -rf
  
 +# SimVision options can be passed to ncsim/​irun ​
 +# executables with the -simvisargs switch:
 +# -simvisargs " $(SIMVISARGS)"​
 +# Use simvision -help for more information
 +SIMVISARGS = -cdslib $(CDSLIB) ​                   \
 +             ​-logfile $(LOGDIR)/​simvision.log ​    \
 +             ​-keyfile $(LOGDIR)/​simvision.key ​    \
 +             ​-diagfile $(LOGDIR)/​simvision.diag ​  \
 +             ​-nosplash ​                           \
 +             ​-waves ​
 +
 +# Note! 
 +# You must pass SimVision options to ncsim/irun in quotes!
 +# Furthermore,​ you must also leave a blank space before the 
 +# first option (Tcl syntax error otherwise)
  
-# ncls options 
-# Use ncls -help for additional information 
-NCLSOPTS = -cdslib $(CDSLIB) ​  \ 
-           ​-hdlvar $(HDLVAR) ​  \ 
-           ​-library $(WORK) ​   \ 
-           ​-logfile $(LOGDIR)/​ncls.log 
  
 # nclaunch options # nclaunch options
Linea 177: Linea 191:
             -update ​            \             -update ​            \
             -status ​            \             -status ​            \
-            -logfile $(LOGDIR)/​ncsim.log ​  ​+            ​-simvisargs " $(SIMVISARGS)" ​   \ 
-            -keyfile $(LOGDIR)/​ncsim.key ​  ​+            ​-logfile $(LOGDIR)/​ncsim.log ​   
-            -input ./​scripts/​shm.tcl ​      \ +            -keyfile $(LOGDIR)/​ncsim.key ​   
- +            -input ./​scripts/​shm.tcl ​       \
-# simvision options (missing...) +
-# Use simvision -help for more information +
-#​SIMVISIONOPTS = -waves ​\+
  
 # Linting tool options (missing...) # Linting tool options (missing...)
Linea 190: Linea 201:
 # irun options (missing...) # irun options (missing...)
 # User irun -helpall for more information # User irun -helpall for more information
-#IRUNOPTS = -$(RUNMODE) ​            \ +IRUNOPTS = -$(RUNMODE) ​            \ 
-            -l $(LOGDIR)/​irun.log ​  \ +           -v $(CDSLIB) ​           
-            -k $(LOGDIR)/​irun.key ​  \ +           -l $(LOGDIR)/​irun.log ​  \ 
-            +access+rw              ​+           ​-k $(LOGDIR)/​irun.key ​  \ 
-            -top $(TOP) ​            \+           -access +rwc            ​
 +           -exit                   \ 
 +           -top $(TOP) ​            \ 
 +           ​-simvisargs " $(SIMVISARGS)"​
  
  
Linea 216: Linea 230:
  @echo "​DEFINE $(WORK) $(LIBDIR)/​$(WORK)"​ >> $(CDSLIB)  @echo "​DEFINE $(WORK) $(LIBDIR)/​$(WORK)"​ >> $(CDSLIB)
  @echo "​INCLUDE $(CDS_INST_DIR)/​tools/​inca/​files/​cds.lib"​ >> $(CDSLIB)  @echo "​INCLUDE $(CDS_INST_DIR)/​tools/​inca/​files/​cds.lib"​ >> $(CDSLIB)
- @echo "Added $(WORK) and default libraries to cds.lib ​file"+ @echo "Added $(WORK) and default libraries to $(CDSLIB) ​file"
  
 # Target: list # Target: list
 # Lists the work library contents # Lists the work library contents
 list: list:
- $(LS) $(NCLSOPTS+ $(LS) ​-cdslib ​$(CDSLIB-hdlvar $(HDLVAR) -logfile $(LOGDIR)/​ncls.log -library $(WORK) 
  
  
Linea 227: Linea 242:
 # Lists the contents of all libraries defined in the $(CDSLIB) file # Lists the contents of all libraries defined in the $(CDSLIB) file
 list_all: list_all:
- $(LS) -cdslib $(CDSLIB) -logfile $(LOGDIR)/​ncls.log -all+ $(LS) -cdslib $(CDSLIB) -hdlvar $(HDLVAR) -logfile $(LOGDIR)/​ncls.log -all
  
  
Linea 251: Linea 266:
 # Compile, elaborate and simulate the design # Compile, elaborate and simulate the design
 update: prepare update: prepare
 +
 +
 +
 +# Target: results
 +results: ​
 +        simvision $(SIMVISARGS) $(SNAPSHOT) &
  
  
Linea 333: Linea 354:
  
 ====== Makefile for Cadence RTL Compiler (RC) ====== ====== Makefile for Cadence RTL Compiler (RC) ======
 +
 +[[http://​people.virginia.edu/​~ll2bf/​docs/​various/​flow_example.html]] ​ \\
 +[[http://​soc.eurecom.fr/​EDC/​cadence_rc_quick_start/​src/​Makefile]]
  
 <​code>​ <​code>​
Linea 340: Linea 364:
 # RTL Compiler executable # RTL Compiler executable
 RC = rc RC = rc
 +
 +RM = rm -f
  
 # RTL Compiler command line options # RTL Compiler command line options
Linea 351: Linea 377:
 # Target: syn # Target: syn
 # call Cadence RTL Compiler with input main Tcl script # call Cadence RTL Compiler with input main Tcl script
-syn:+syn: clean
         $(RC) $(RCOPTS)         $(RC) $(RCOPTS)
  
Linea 358: Linea 384:
 # delete all log and backup files # delete all log and backup files
 clean: clean:
-      find ./ -name '​*.log*' ​    ​-exec ​rm -{} \; +      @find ./ -name '​*.log*' ​    ​-exec ​$(RM) {} \; 
-        find ./ -name '​*~' ​        ​-exec ​rm -f {} \;        ​+        @find ./ -name '​*.cmd*' ​    -exec $(RM) {} \; 
 +        ​@find ./ -name '​*~' ​        ​-exec ​$(RM) {} \;        ​
 </​code>​ </​code>​