How to do simple Aldec Active-HDL simulation with waveform using Tcl scripting?

无人久伴 提交于 2019-12-24 13:19:11

问题


Having a simple test bench like:

entity tb is
end entity;

architecture syn of tb is
  signal show : boolean;
begin
  show <= TRUE after 10 ns;
end architecture;

ModelSim GUI allows simulation and waveform viewing with a Tcl script in "all.do" with:

vlib pit
vcom -work pit tb.vhd
vsim pit.tb
add wave sim:/tb/show
run 20 ns 

Where to do all.do in the ModelSim GUI console will make library, compile, load tb model, and show the waveform:

How to make a similar simple Tcl script for a similar simulation with Aldec Active-HDL simulator ?


回答1:


Aldec Active-HDL documentation for Tcl use is pretty vague for how to use Tcl from the GUI, but enough time with trial and error gave a positive result.

It appears that it is required to create workspace with design, whereby a library for work is also created, and then design files can be compiled into the library.

The resulting Tcl script for Active-HDL is:

workspace create pit    # Create workspace namded "pit" and open this
design create -a pit .  # Create design named "pit" with "pit" library as work and add to workspace
acom $DSN/../tb.vhd     # Compile "tb.vhd" file with location relative to workspace
asim work.tb            # Load simulator from work library
add wave /tb/show       # Add wave "show" to waveform
run 20 ns               # Simulate 20 ns

Which will give the waveform:



来源:https://stackoverflow.com/questions/30920303/how-to-do-simple-aldec-active-hdl-simulation-with-waveform-using-tcl-scripting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!