Ways to make a sim.do use previuosly compiled sources?

Hi,
I am working on a UVM test for some VHDL codes, from time to time i have to run the sim.do file, which will compile all the DUT and UVM related files. The thing is that it can take a while for getting all files compiled. So here is my question: Is there a way to make the sim.do file (or another option) use previuosly compiled and unmodified files instead of recompiling them again?
Meaning if i have only modified an agent, why should the program compile every file again?
Thanks

In reply to chim20air:

2 options spring to mind:

a) Use qrun command to compile/optimize and launch simulation

Incremental compilation and optimization works really well with qrun
There is a seperare qrun user guide that comes with the install

b) Create a PDU (Pre-optimized Design Unit) for the DUT

This optimizes the DUT so that if you are only making changes to the testbench, then it doesn't have to re-compile or optimize your RTL code.
e.g.
vlog -work dut_lib -f dut_files.f
vopt -pdu +acc dut_top -o dut_top_pdu +cover=sbfec+dut_top.

vlog -work tb_lib -f tb_files.f
vopt testbench +acc -o testbench_opt -L dut_lib
vsim -t -ps -coverage testbench_opt

Once your DUT PDU has been created, you only rerun the last 3 commands
Only recompile and re-generate the DUT PDU if you modify the RTL code

In reply to graeme_jessiman:

Thanks for your reply. QRUN seems to be for new versions, so for now is not an option.
As for your b option, those 5 lines go straight to the sim.do file, right? My confusion comes from where you mention that after first compiling time, the last 3 commands are rerunned

In reply to chim20air:

I would seperate the commands into 2 DO files

The first 2 lines go into compile_dut.do
The other 3 lines go into sim.do

so you would execute compile_dut.do after any changes have beem made to the RTL code.

As long as the DUT is remaining unchanged, you only need to execute the sim.do command with the 3 commands.

The sim.do file will then

  • compile the testbench
  • optimize the testbench (+ finding the PDU for the DUT created by the compile_dut.do script)
  • then load the simulation