GHDL を使用して Xilinx GTXE2 トランシーバーをシミュレートしようとしています。GTXE2_CHANNEL.vhd で、「std_logic_arith」がライブラリ「ieee」に見つからないというエラーが発生しました。
まず、私のマシンのセットアップは次のとおりです。
- Windows 7 (プロ、x64、ドイツ語)
- パワーシェル 4.0
- パイソン3.4
- ザイリンクス ISE 14.7 (x64、英語)
- ザイリンクス Vivado 2014.2 (x64、英語)
- Windows 用 GHDL 0.31 ( http://sourceforge.net/projects/ghdl-updates/ )
質問 1:このパッケージは GHDL に含まれていますか?
VHDL 標準を VHDL-2008 に変更しようとしました--std=08
が、このオプションは ghdl で認識されないため、現在 VHDL-2002 でコンパイルしています。しかし、何も変わりませんでした。
また、ザイリンクスの vhdl ソース フォルダーから手動で IEEE ソースを含めようとしましたC:\Xilinx\14.7\ISE_DS \ISE\vhdl\src\ieee
。しかし、std_logic_arithをコンパイルすると、通常は見つかるstd_logic_1164が見つからないというエラーが表示されます。これに加えて、std_logic_1164の FOREIGN 属性に問題があります。
したがって、これは私のファイル リスト/コンパイル順序です (ザイリンクスの *.prj ファイルの修正バージョン)。
# board and device configuration
#vhdl poc "tb/common/my_config_KC705.vhdl"
# IEEE packages
#xilinx ieee "ieee/std_logic_1164.vhd"
#xilinx ieee "ieee/std_logic_arith.vhd"
# Xilinx Packages and Primitives
xilinx unisim "unisims/unisim_VCOMP.vhd"
xilinx unisim "unisims/unisim_VPKG.vhd"
xilinx work "unisims/primitive/FD.vhd"
xilinx work "unisims/primitive/BUFG.vhd"
xilinx work "unisims/primitive/BUFR.vhd"
xilinx work "unisims/secureip/GTXE2_CHANNEL.vhd"
このリストは、一時ディレクトリで実行された GHDL コマンドに変換されます。
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=poc "D:\VHDL\git\SATAController\lib\PoC\tb\common\my_config_KC705.vhdl"
GHDL Messages:
D:\VHDL\git\SATAController\lib\PoC\tb\common\my_config_KC705.vhdl:52:14:warning: package "my_config" does not require a body
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=unisim "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\unisim_VCOMP.vhd"
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=unisim "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\unisim_VPKG.vhd"
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=work "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive\FD.vhd"
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=work "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive\BUFG.vhd"
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=work "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\primitive\BUFR.vhd"
C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe -a --std=02 -P. --work=work "C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\secureip\GTXE2_CHANNEL.vhd"
GHDL Messages:
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\unisims\secureip\GTXE2_CHANNEL.vhd:34:10: primary unit "std_logic_arith" not found in library "ieee"
最後に、 ieee.std_logic_1164の FOREIGN 属性エラー:
PS D:\VHDL\git\SATAController\lib\PoC\temp\ghdl> & 'C:\Program Files (x86)\GHDL\0.31\bin\ghdl.exe' -a --std=02 '-P.' --work=ieee 'C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd'
GHDL Messages:
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:211:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:212:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:213:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:214:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:215:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:216:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:218:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:219:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:220:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:221:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:223:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:224:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:225:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:227:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:228:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:229:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:231:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:232:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:233:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:235:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:236:15: value of 'FOREIGN attribute does not begin with VHPIDIRECT
C:\Xilinx\14.7\ISE_DS\ISE\vhdl\src\ieee\std_logic_arith.vhd:238:15: 'FOREIGN allowed only for architectures and subprograms
質問 2: ieee.std_logic_1164 をコンパイルするにはどうすればよいですか?
GHDL 環境がインストールされている人なら誰でもこの例をテストできます。ザイリンクス ライブラリでは my_config_KC705.vhdl は必要ありません。
これの目的は何ですか?
- iSim シミュレーションは非常に遅い -> 約 15 ns シミュレーション時間は 1 秒の CPU 時間で計算されます。100 us -> 40 分の待ち時間
- iSim は約 2.6 GiB のメイン メモリを使用します - GHDL の方が倹約的かもしれません
- xSim は VHDL ライブラリに不満を持っているため、iSim は現在の選択肢 #1 です。
- 以前、ザイリンクス プリミティブを使用して GHDL をテストしたところ、うまくいきました。次の課題は、secureip コンポーネントをシミュレートすることです :)
- 十分な時間があれば、QuestaSim も試してみます