0

I want to compile the Xilinx Vivado simulation primitives for QuestaSim (ModelSim). The documentation lists a TCL command, but I would like to use a common shell command like the old one for ISE:

<ISEDirectory>\bin\nt64\compxlib.exe -family all - language all -library all -simulator questa ....

As far as I can see, the TCL command should be entered in the Vivado GUI.

How can I run the compilation from an user defined PowerShell or Bash script?

Paebbels
  • 15,573
  • 13
  • 70
  • 139
  • PlanAhead has a TCL shell that presumably you could call compxlib from, maybe Vivado has a similar option. For reference, to enter PlanAhead interactive TCL shell use `planAhead -mode tcl` or to run a TCL script use `planAhead -mode batch -source ` – suoto Mar 23 '16 at 20:18
  • Yes, Vivado has a command line TCL shell, too. It's build into `Vivado.exe`. Is there no other way? – Paebbels Mar 23 '16 at 21:11

1 Answers1

0

Just to answer my own question for completeness ...

There is no other way then running the compile command from the Vivado Tcl shell, either in the GUI or on command line.

Compiling Vivado libraries from Bash:

VSimBinDir=/opt/questasim/10.4d/bin
DestDir=xilinx-vivado

Simulator=questa
Language=vhdl
Library=all
Family=all

CommandFile=vivado.tcl

echo "compile_simlib -force -library $Library -family $Family -language $Language -simulator $Simulator -simulator_exec_path $VSimBinDir -directory $DestDir" > $CommandFile
if [ $? -ne 0 ]; then
  echo 1>&2 -e "${COLORED_ERROR} Cannot create temporary tcl script.${ANSI_NOCOLOR}"
  exit -1;
fi
echo "exit" >> $CommandFile

# compile common libraries
$Vivado_tcl -mode tcl -source $CommandFile
if [ $? -ne 0 ]; then
  echo 1>&2 -e "${COLORED_ERROR} Error while compiling Xilinx Vivado libraries.${ANSI_NOCOLOR}"
  exit -1;
fi
Paebbels
  • 15,573
  • 13
  • 70
  • 139