GHDL and Xilinx

L

lelesa

Hello everyone,

I'm trying to simulate some Xilinx VHDL design with GHDL... with poor
results... I made a simple project as a schematic, with the RAM16x1d
block (it's a Xilinx IP core). With Xilinx ise i generate the vhf file
for the vhdl simulation. So i have two files:

Toplevel.vhf
Topleveltest.vhd (a simple testbench)

Here is what I do:

1) I import the unisim library with "GHDL -i --work=unisim C:/
Xilinx91i/vhdl/src/unisims/*.vhd

2) I import project files:
ghdl -i --work=work toplevel.vhf topleveltest.vhf

3) I run the testbench:
ghdl -r toplevel_tb --stop-time=200ns

Doing these three steps i get an error: GHDL isn't able to bind the
components with the unisim entities. So I add a configuration for each
component in toplevel.vhf:

for all : RAMB16xD1 use entity unisim.RAM16xD1;
for all : IBUF use entity unisim.IBUF;
for all : OBUF use entity unisim.OBUF;

I repeat steps 2 and 3 with these lines added, but now i get a new
error:

toplevel.vhf:103:40: entity "ram16x1d_1" is obsoleted by package
"vpkg"
toplevel.vhf:103:26: entity "ram16x1d_1" is obsolete

Package VPKG is part of the unisim library. What does the error mean?
Any clue about possible solutions?
My objective is to find out whether it's possible to perform timing
simulations with GHDL+ISE... Anyone is using it for this purpose?
 
G

Georg Acher

1) I import the unisim library with "GHDL -i --work=unisim C:/
Xilinx91i/vhdl/src/unisims/*.vhd

AFAIR the order is important. Don't use *.vhd, but vcomp, vpkg, vital and smodel
in that order.
 
L

lelesa

Ok, thanks, that seems to work...

but now, when i try to run the testbench, i get this error:

ghdl: cannot load package "vcomponents"

When i try with "ghdl -d --work=unisim" i can see the package in the
list... Any clue?

Georg Acher ha scritto:
 
G

Georg Acher

|> Ok, thanks, that seems to work...
|>
|> but now, when i try to run the testbench, i get this error:
|>
|> ghdl: cannot load package "vcomponents"
|>
|> When i try with "ghdl -d --work=unisim" i can see the package in the
|> list... Any clue?

Hm, this is the way it works for me:

Create a directory "unisim" and put all the Xilinx-unisim*-files in it. The test
files are above this folder.

Analyze the unisim-stuff with "ghdl -a --work=unisim --ieee=synopsys
-fexplicit" in the mentioned order, so the unisim-*.o-files are in unisim/

Analyze the test files with "ghdl -a -Punisim".

Elaborate with "ghdl -e -Punisim --ieee=synopsys -fexplicit"

After that, a tiny little executable (about 21MB) comes out and runs fine.

I'm using ghdl-0.25 and slightly patched unisims from ISE 8.2.
 
G

gabriele.saveri

|> Ok, thanks, that seems to work...
|>
|> but now, when i try to run the testbench, i get this error:
|>
|> ghdl: cannot load package "vcomponents"
|>
|> When i try with "ghdl -d --work=unisim" i can see the package in the
|> list... Any clue?

Hm, this is the way it works for me:

Create a directory "unisim" and put all the Xilinx-unisim*-files in it. The test
files are above this folder.

Analyze the unisim-stuff with "ghdl -a --work=unisim --ieee=synopsys
-fexplicit" in the mentioned order, so the unisim-*.o-files are in unisim/

Analyze the test files with "ghdl -a -Punisim".

Elaborate with "ghdl -e -Punisim --ieee=synopsys -fexplicit"

After that, a tiny little executable (about 21MB) comes out and runs fine.

I'm using ghdl-0.25 and slightly patched unisims from ISE 8.2.

Ok, I guess the problem is i'm using win32 build of GHDL...
 
K

Kees Bakker

Georg said:
|> Ok, thanks, that seems to work...
|>
|> but now, when i try to run the testbench, i get this error:
|>
|> ghdl: cannot load package "vcomponents"
|>
|> When i try with "ghdl -d --work=unisim" i can see the package in the
|> list... Any clue?

Hm, this is the way it works for me:

Create a directory "unisim" and put all the Xilinx-unisim*-files in it. The test
files are above this folder.

Analyze the unisim-stuff with "ghdl -a --work=unisim --ieee=synopsys
-fexplicit" in the mentioned order, so the unisim-*.o-files are in unisim/

Analyze the test files with "ghdl -a -Punisim".

Elaborate with "ghdl -e -Punisim --ieee=synopsys -fexplicit"

After that, a tiny little executable (about 21MB) comes out and runs fine.

I'm using ghdl-0.25 and slightly patched unisims from ISE 8.2.

I'm also interested in this subject. And today I tried this out,
unfortunately with no luck. When I compile (analyze) unisim_VITAL.vhd I get
the following errors:

unisim/unisim_VITAL.vhd:175819:57: variable "write_a_write_b" is not visible here
unisim/unisim_VITAL.vhd:175820:57: variable "read_a_write_b" is not visible here
unisim/unisim_VITAL.vhd:175821:57: variable "write_a_read_b" is not visible here
unisim/unisim_VITAL.vhd:175822:57: variable "write_b_write_a" is not visible here
unisim/unisim_VITAL.vhd:175823:57: variable "read_b_write_a" is not visible here
unisim/unisim_VITAL.vhd:175824:57: variable "write_b_read_a" is not visible here

BTW. This is with the files from the 9.1i release, but the 7.1i release give the same
errors.

I'm wondering if you modified these files to solve this problem, and if so, what
changes did you make?

Kind regards, Kees Bakker
 
G

Georg Acher

|> I'm also interested in this subject. And today I tried this out,
|> unfortunately with no luck. When I compile (analyze) unisim_VITAL.vhd I get
|> the following errors:
|>
|> unisim/unisim_VITAL.vhd:175819:57: variable "write_a_write_b" is not visible here
|> unisim/unisim_VITAL.vhd:175820:57: variable "read_a_write_b" is not visible here
|> unisim/unisim_VITAL.vhd:175821:57: variable "write_a_read_b" is not visible here
|> unisim/unisim_VITAL.vhd:175822:57: variable "write_b_write_a" is not visible here
|> unisim/unisim_VITAL.vhd:175823:57: variable "read_b_write_a" is not visible here
|> unisim/unisim_VITAL.vhd:175824:57: variable "write_b_read_a" is not visible here
|>
|> BTW. This is with the files from the 9.1i release, but the 7.1i release give
|> the same errors.
|>
|> I'm wondering if you modified these files to solve this problem, and if so,
|> what changes did you make?

Simply comment out the variable lines with the errors. They occur in two places.

I don't understand their need anyway. Assigning the enum value to a variable of
the *same name* and *same type* sounds quite fishy to me. Maybe it's accidently
legal VHDL, but it looks more like a quick hack workaround for some faulty
simulator.
 
K

Kees Bakker

Georg said:
|> I'm also interested in this subject. And today I tried this out,
|> unfortunately with no luck. When I compile (analyze) unisim_VITAL.vhd I get
|> the following errors:
|>
|> unisim/unisim_VITAL.vhd:175819:57: variable "write_a_write_b" is not visible here
|> unisim/unisim_VITAL.vhd:175820:57: variable "read_a_write_b" is not visible here
|> unisim/unisim_VITAL.vhd:175821:57: variable "write_a_read_b" is not visible here
|> unisim/unisim_VITAL.vhd:175822:57: variable "write_b_write_a" is not visible here
|> unisim/unisim_VITAL.vhd:175823:57: variable "read_b_write_a" is not visible here
|> unisim/unisim_VITAL.vhd:175824:57: variable "write_b_read_a" is not visible here
|>
|> BTW. This is with the files from the 9.1i release, but the 7.1i release give
|> the same errors.
|>
|> I'm wondering if you modified these files to solve this problem, and if so,
|> what changes did you make?

Simply comment out the variable lines with the errors. They occur in two places.

I don't understand their need anyway. Assigning the enum value to a variable of
the *same name* and *same type* sounds quite fishy to me. Maybe it's accidently
legal VHDL, but it looks more like a quick hack workaround for some faulty
simulator.

Hah! That's it. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top