Before you can compile and simulate your code you need to add the used tools to your environment path:
$ source /opt/questa/questa.sh
Note that this sets the path variable for the current session only, so this has to be done every time you start the terminal
Git repositories
We have two git repositories on the course: the group repository and a personal one. These files are found in the personal repository.
You can still do this as a group: just decide whose repository you will use.
Clone your git repository
Navigate to folder ex_systemverilog in your repository
Create a library for the project with:
$ vlib sv_ex_lib # Create your own design library ... $ vmap work $PWD/sv_ex_lib # ... and map it as 'work'
Then you can compile and run the simulation with:
$ vlog hello.sv
$ vsim -do "run -all" -c hello
the -c flag starts the simulation in console without the GUI
(Helpful?) Tips / good practices / conventions
Between sessions you lose the "sourced" paths so if you get an error that the run script cannot find the compiler/simulator run the sourcing script as before
Always comment what you're doing in the code! Commenting in SystemVerilog works as in C/C++ i.e. // or /* ... */
Remember to indent the code and use descriptive variable/class names (as in the given code package or some other sensible way..), readibility is nice.