4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GHDLでベンダのVHDLライブラリをコンパイルする

Posted at

はじめに

GHDLでシミュレーションを行うためにXilinx ISEのライブラリをコンパイルしたときの記録です。
他にも以下のベンダライブラリ等がコンパイルできるようです。

  • Supported Vendors Libraries
    • Altera Quartus (≥13.0)
    • Lattice (≥3.6)
    • Xilinx ISE (≥14.0)
    • Xilinx Vivado (≥2014.1)
  • Supported Simulation and Verification Libraries
    • OSVVM (for VHDL-2008)
    • UVVM (for VHDL-2008)

詳しくはCompile Scripts for Vendor VHDL Librariesを参照してください。

開発環境

  • Windows10 Pro 64bit
  • GHDL 0.35

Xilinx ISE ライブラリのコンパイル

Pathは適宜読みかえてください

コンパイル設定

<GHDL>\lib\vendors/config.psm1にあるInstallationDirectoryを設定します

config.psm1
"XilinxISE" = @{
    "InstallationDirectory" = "C:\Xilinx\14.7\ISE_DS"; # "C:\Xilinx\14.7\ISE_DS";
    "SourceDirectory" = "ISE\vhdl\src";
    "DestinationDirectory" = "xilinx-ise"
};

<GHDL>\lib\vendors/compile-xilinx-ise.ps1にパラメータを設定します

compile-xilinx-ise.ps1
# Compile all libraries and packages.
[switch]$All = $true,
# Set VHDL Standard to '08
[switch]$VHDL2008 =	$true, # ここではVunitで使用するためにtrueにした、ただし一部コンパイルエラーになる
# Set GHDL binary directory.
[string]$GHDL = "<GHDL>\bin"

コンパイル実行

シミュレーション用フォルダに移動し、powershellでコンパイルを実行します。

powershell
cd <MySimulationFolder>
<GHDL>\libraries\vendors\compile-xilinx-ise.ps1 -All

<MySimulationFolder>\xilinx-ise内にcfファイルが生成されます。

問題点

  • VHDL-2008でコンパイルするとstd_logic_misc等が使えないためなのかコンパイルエラーになるものがいくつかあります

参考

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?