edalize icon indicating copy to clipboard operation
edalize copied to clipboard

Add Timing Simulation Support for ModelSim and XSim

Open GCHQDeveloper560 opened this issue 4 years ago • 3 comments

As the first step in #115 these commits add an SDF file type, with information about the instance the file should be applied to and the corner the delays represent.

In addition to running the simulations with the SDF files, the commits add a logged_hdl_objs option that allows objects to be logged to VCD/SAIF files rather than solely using $dumpvars. An alternative would be to use a simpler run script and allow user Tcl files to be executed during the run phase for things like logging. However, the ModelSim backend currently uses Tcl files in the build phase and it's not clear how to support user Tcl in both situations.

GCHQDeveloper560 avatar Apr 06 '20 08:04 GCHQDeveloper560

FYI - @kgugala

mithro avatar Apr 06 '20 15:04 mithro

I'm having a hard time judging the correctness of these patches since SDF and such really isn't my domain. But they are more invasive than what I would prefer, so I think we might need to discuss this a bit.

Unfortunately my time is limited right now and I have a ton of patches to go through, so realistically I don't expect to get to this very soon.

olofk avatar Apr 07 '20 21:04 olofk

I don't know how much ModelSim is different but for xsim would it be possible to

  • Reduce the base tcl file to something like
if { [expr $argc > 0] } {
    foreach user_script $argv {
        source $user_script
    }
}

run -all

Then the user can modify the execution in any way they like by providing tcl files.

In that case I'm not sure how to handle

flush_vcd
close_vcd
close_saif
  • Change the run command
run: xsim.dir/$(TARGET)/xsimk
	xsim --tclbatch edalize_run.tcl $(XSIM_OPTIONS) $(TARGET) $(LIST_OF_USER_SCRIPTS)

paller avatar Jul 01 '21 18:07 paller