P35: Tool Set-Up Info
These tools are provided for you to use but also please feel free to use any other computers or tools that you have to hand (such as a free copy of Modelsim on your own laptop or a version of SystemC that you have compiled for yourself). This material works on 64-bit linux machines and may work on windows and 32-bit systems.
General Unix Notes
- The material in
/usr/groups/hanis automounted. You cannot see it via certain GUI file explorers unless it is mounted. It will automout itself if you execute
cd /usr/groups/haninside a shell (terminal window).
- When using values of environment variables, please note that a different syntax is needed in the shell from inside a makefile. Use
$(VARNAME)inside a makefile and
$VARNAMEin a shell or shellscript.
- If you set up environment variables in a shellscript and run that shell script the effects are lost straight afterwards because they will apply only to the fresh, nested shell created by a shell for each command run. Instead you need to use the source shell command, which is just '.' to have the shellscript run in the current shell so its effects persist. For example, if 'mysetup' contains 'export FOO=myfoo' then please use
Verilog or VHDL Modelsim
Setup (using bash shell syntax):
export PATH=$PATH:/usr/groups/ecad/mentor/modelsim/current/modeltech/bin export MGLS_LICENSE_FILEemail@example.com
Documentation : See /usr/groups/ecad/mentor/modelsim/modelsimSE6.5c/modeltech/docs
The following should run something:
rm -rf simple_lib; vlib simple_lib echo "module TEST(); initial \$display(\"Hello World\"); endmodule" > test.v echo "run -all;exit" > run.do vmap simple_lib simple_lib vlog -work simple_lib test.v vsim -c simple_lib.TEST -do "run.do"
The above works by first deleting any old library, then creating a new one, called simple_lib and then creating a component called TEST and putting in the library and then reading it out and running it.
For those interested in using modelsim extensively, you should learn how to open the GUI and view the waveforms, otherwise just use Verilog's $display statement for simple output.
For VHDL: Use vcom instead of vlog if you prefer to use VHDL.
vcom -work simple_lib ...vhdl
THIS INFO IS JUST BEING UPDATED DURING NOVEMBER 2012 FOR THIS YEAR.... Setup (using bash):
export LD_LIBRARY_PATH=/usr/groups/han/clteach/systemc/systemc-2.3.0/lib-x86_64 export ARCH=x86_64 (or export ARCH=`arch`)
You can use one of the pre-built SystemC distributions I have provided or download and compile your own from systemc.org. The ARCH variable must match the machine you are running on. If this variable is not already set for you then use the linux 'arch' command to find out how to set it. I have made two or more binary versions of SystemC but we can add others.
The first, get-you-started example is here:
- or in this zip file systemc-helloworld.zip.
If you unzip this and type 'make' it should run something.
Note: this filesystem is automounted and it cannot initially be seen until you 'cd' to it or open the 'file:/usr/groups/han/clteach' url in firefox, or similar.
Note: please understand the operation of the following gcc flags:
-c (generate a .o file but do not link) -I/some/where (look for #included files in /some/where) -lxxx (look for libxxx.a and include for linking) -L/some/where (look in /some/where for -l includes)
Verilog change dump files (.vcd) can be generated using SystemC or Modelsim. They may be viewed with the gtkwave program.
OpenRISC 1K Reference Blocking TLM SystemCurrent : details being added: basically you want the folder btlm-baseline/openrisc/testbench.
Please check you have write access to /usr/groups/acs-projectwork/year1112/p35/
© David Greaves 2011.