0

我想为 QuestaSim (ModelSim) 编译 Xilinx Vivado 仿真原语。该文档列出了一个 TCL 命令,但我想使用一个常见的 shell 命令,如 ISE 的旧命令:

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

据我所知,应该在 Vivado GUI 中输入 TCL 命令。

如何从用户定义的 PowerShell 或 Bash 脚本运行编译?

4

1 回答 1

0

只是为了完整地回答我自己的问题......

除了在 GUI 或命令行中从 Vivado Tcl shell 运行编译命令之外,别无他法。

从 Bash 编译 Vivado 库:

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
于 2016-04-14T09:25:53.640 回答