ASIC/FPGA Design and Verification Out Source Services
how to compile xilinx unisim libraries using ghdl
-
This page describes how to compile xilinx unisim
libraries. I use GHDL, free VHDL simulator, version
GHDL 0.26.
-
A few things to note:
- Compilation order does matter.
- I had to put the results in a separate
directory, which is fine, but I could not make it work
unless the directory was in PWD:
this is to say that your elaboration command will
include -Punisim.
ghdl -m --warn-no-vital-generic --work=work -Punisim --workdir=work --ieee=synopsys -fexplicit TB >& tmp.txt
ghdl -a --work=unisim --workdir=unisim --ieee=synopsys -fexplicit /mnt/Home/pini/Home_2/VHDL_IP_Stack/CODE/PostNGDsim/unisim_VCOMP.vhd
ghdl -a --work=unisim --workdir=unisim --ieee=synopsys -fexplicit /mnt/Home/pini/Home_2/VHDL_IP_Stack/CODE/PostNGDsim/unisim_VPKG.vhd
ghdl -a --work=unisim --workdir=unisim --ieee=synopsys -fexplicit /mnt/Home/pini/Home_2/VHDL_IP_Stack/CODE/PostNGDsim/unisim_VITAL.vhd
ghdl -a --work=unisim --workdir=unisim --ieee=synopsys -fexplicit /mnt/Home/pini/Home_2/VHDL_IP_Stack/CODE/PostNGDsim/unisim_SMODEL.vhd
-
I capture all the print messages of ghdl into a
file. It is nice to see the results using gvim.
I created a vim file to color important messages. For
instance ghdl makes a lot of warnings and I teach
vim to give it orange color (green for okay and
red for erred ones).
syntax match GFP_TENGE /.*warning.*/
hi GFP_TENGE guibg=white guifg=orange
syntax match ANALYZE /^analyze.*/
hi ANALYZE guibg=white guifg=green
in the file ~/gvimrc put the following lines:
"to support ghdl remarks
au BufRead,BufNewFile tmp.txt so ~/ghdl_warning.vim
-
With Symphony EDA (R) VHDL Compiler/Simulator, the order matters as well.
This simulator comes with a script to compile xilinx library simprim. I used,
during RTL development unisim, so I used:
vhdlp -work unisim -nostderr -s -continueonerror -nowarnmsg all unisim_VCOMP.vhd
vhdlp -work unisim -nostderr -s -continueonerror -nowarnmsg all unisim_VPKG.vhd
vhdlp -work unisim -nostderr -s -continueonerror -nowarnmsg all unisim_VITAL.vhd
vhdlp -work unisim -nostderr -s -continueonerror -nowarnmsg all unisim_SMODEL.vhd
Contact me now at: |