2

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:

enter image description here

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

EquipDev
  • 5,573
  • 10
  • 37
  • 63
  • Active-HDL documentation and most support isn't available to non-registered customers on ALDEC's site. All the rest of us can see are things like [Running Active-HDL in the Tool Shell Mode](https://www.aldec.com/en/support/resources/documentation/articles/1144) (googled *Do script Active-HDL*, the first hit). Perhaps you could describe how you've researched your problem so far? –  Jun 18 '15 at 22:57
  • Thanks, I came across Running Active-HDL in the Tool Shell Mode](https://www.aldec.com/en/support/resources/documentation/articles/1144), but this only describes the pure batch approach with `bin\vsimsa.exe`, thus without the convenience of waveform viewing. So far I have not found out how to create a library from the GUI with Tcl, see http://stackoverflow.com/q/30894538/3989931. I have succeeded in doing a compile using the guild in GUI wizards, but these copies source to local directory, and looks no good for an automated and batch approach for simulation. – EquipDev Jun 19 '15 at 06:22

1 Answers1

5

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:

enter image description here

EquipDev
  • 5,573
  • 10
  • 37
  • 63