#! /bin/sh # Script to automatically simulate the incrementor design. #------------------------------------------------------------------------------- # 1. Compilation library creation (only once!) #------------------------------------------------------------------------------- if [ ! -d inc.lib ]; then vlib inc.lib; fi #------------------------------------------------------------------------------- # 2. Mapping between the physical library just created and the VHDL library #------------------------------------------------------------------------------- vmap work inc.lib; #------------------------------------------------------------------------------- # 3. Compilation of the sources #------------------------------------------------------------------------------- vcom inc.vhd inc_tb.vhd; #------------------------------------------------------------------------------- # 4. Simulation #------------------------------------------------------------------------------- # 4.1. Batch simulation echo "run -all; quit;" > inc.tcl; vsim -c inc_tb -do inc.tcl; # 4.2. Simulation with the GUI (Graphical User Interface) -- please uncomment ###vsim inc_tb& #------------------------------------------------------------------------------- # 5. Cleaning #------------------------------------------------------------------------------- rm -f modelsim.ini transcript inc.tcl; rm -rf inc.lib;