edalize
edalize copied to clipboard
Add Timing Simulation Support for ModelSim and XSim
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.
FYI - @kgugala
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.
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)