Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Synthesis support for multi-dimentional arrays

 
Thread Tools Search this Thread
Old 11-26-2003, 01:39 AM   #1
Default Synthesis support for multi-dimentional arrays


I'm using XST version 6.1 and it doesn't support VHDL
multi-dimensional arrays greater than 2. ie. this is not supported:
type std_ulogic_3D is array (NATURAL RANGE <>,NATURAL RANGE
<>,NATURAL RANGE <> ) of std_ulogic;

XST gives error "Matrix not supported yet." if you instance an
std_ulogic_3D

What synthesis front ends are available for Xilinx FPGAs which support
this? I've attached some VHDL code to test this...

BTW I know I can create arrays of arrays in VHDL but this has problems
since you need to constrain one of the dimensions. I don't want to do
this as it will limit my design. Also, XST gets exceptions when 4 or
more dimensions are created this way. ie. the following code breaks
XST when you instance a std_ulogic_4D:
type std_ulogic_2D is array ( NATURAL RANGE <> ) of
std_ulogic_vector(1 DOWNTO 0);
type std_ulogic_3D is array ( NATURAL RANGE <> ) of std_ulogic_2D(1
DOWNTO 0);
type std_ulogic_4D is array ( NATURAL RANGE <> ) of std_ulogic_3D(1
DOWNTO 0);

Regards,
Michael

-------
library ieee;
use ieee.std_logic_1164.all;
package testPkg is
type std_ulogic_3D is array ( NATURAL RANGE <>,
NATURAL RANGE <>,
NATURAL RANGE <> ) of std_ulogic;

end testPkg;

use work.testPkg.all;
entity test is
port (
TestIn : in std_ulogic_3D(1 DOWNTO 0,
1 DOWNTO 0,
1 DOWNTO 0);

TestOut : out std_ulogic_3D(1 DOWNTO 0,
1 DOWNTO 0,
1 DOWNTO 0)

);
end test;
architecture rtl of test is
begin
TestOut <= TestIn;
end rtl;


Michael Neuling
  Reply With Quote
Old 11-26-2003, 08:00 AM   #2
Egbert Molenkamp
 
Posts: n/a
Default Re: Synthesis support for multi-dimentional arrays
Leonardo Spectrum synthesized your design => 8 wires.
(I used an old version of LeonardoSpectrum\v2001_1b.12).

We use Leonardo as front-end and the output is input for ISE (Xilinx) .

Egbert Molenkamp

"Michael Neuling" <> wrote in message
news: om...
> I'm using XST version 6.1 and it doesn't support VHDL
> multi-dimensional arrays greater than 2. ie. this is not supported:
> type std_ulogic_3D is array (NATURAL RANGE <>,NATURAL RANGE
> <>,NATURAL RANGE <> ) of std_ulogic;
>
> XST gives error "Matrix not supported yet." if you instance an
> std_ulogic_3D
>
> What synthesis front ends are available for Xilinx FPGAs which support
> this? I've attached some VHDL code to test this...
>
> BTW I know I can create arrays of arrays in VHDL but this has problems
> since you need to constrain one of the dimensions. I don't want to do
> this as it will limit my design. Also, XST gets exceptions when 4 or
> more dimensions are created this way. ie. the following code breaks
> XST when you instance a std_ulogic_4D:
> type std_ulogic_2D is array ( NATURAL RANGE <> ) of
> std_ulogic_vector(1 DOWNTO 0);
> type std_ulogic_3D is array ( NATURAL RANGE <> ) of std_ulogic_2D(1
> DOWNTO 0);
> type std_ulogic_4D is array ( NATURAL RANGE <> ) of std_ulogic_3D(1
> DOWNTO 0);
>
> Regards,
> Michael
>
> -------
> library ieee;
> use ieee.std_logic_1164.all;
> package testPkg is
> type std_ulogic_3D is array ( NATURAL RANGE <>,
> NATURAL RANGE <>,
> NATURAL RANGE <> ) of std_ulogic;
>
> end testPkg;
>
> use work.testPkg.all;
> entity test is
> port (
> TestIn : in std_ulogic_3D(1 DOWNTO 0,
> 1 DOWNTO 0,
> 1 DOWNTO 0);
>
> TestOut : out std_ulogic_3D(1 DOWNTO 0,
> 1 DOWNTO 0,
> 1 DOWNTO 0)
>
> );
> end test;
> architecture rtl of test is
> begin
> TestOut <= TestIn;
> end rtl;





Egbert Molenkamp
  Reply With Quote
Old 11-26-2003, 08:15 AM   #3
Matt North
 
Posts: n/a
Default Re: Synthesis support for multi-dimentional arrays
Michael,

How would you create a 3D array using logic gates?
A 2D array is simple, i.e. a memory device has 2 dimensions: the length of
data it can store, and the addresses of each mem location.

> BTW I know I can create arrays of arrays in VHDL but this has problems
> since you need to constrain one of the dimensions. I don't want to do
> this as it will limit my design.


Again the FPGA has to physically assign hardware to your vhdl code, you have
to constrain it so that it knows how many flip-flops/registers to give to
that array.
Natural Range is integer range 0 to integer'HIGH where integer'HIGH is
2^31-1, have you tried replacing
(natural range <>) with (0 to integer'HIGH) or the value that integer'HIGH
takes.

I haven't tried the above, but your synthesis tool might now see that the
array is constrained to a finite value.
Hope this helps.

Matt.




Matt North
  Reply With Quote
Old 11-26-2003, 11:17 PM   #4
Michael Neuling
 
Posts: n/a
Default Re: Synthesis support for multi-dimentional arrays
Matt,

> How would you create a 3D array using logic gates?
> A 2D array is simple, i.e. a memory device has 2 dimensions: the length of
> data it can store, and the addresses of each mem location.


If you want a 2x2x2 array (say) all it needs to create is 2 2x2
arrays. ie. a 4x4 array.

> Again the FPGA has to physically assign hardware to your vhdl code, you have
> to constrain it so that it knows how many flip-flops/registers to give to
> that array.
> Natural Range is integer range 0 to integer'HIGH where integer'HIGH is
> 2^31-1, have you tried replacing
> (natural range <>) with (0 to integer'HIGH) or the value that integer'HIGH
> takes.
>
> I haven't tried the above, but your synthesis tool might now see that the
> array is constrained to a finite value.
> Hope this helps.


I'll try this but I don't think it'll help. The synthesis tool will
only allocate resources after it sees an instance of the type and not
when it sees the type definition. Otherwise just seeing the
std_ulogic_vector type definition would send it crazy trying to
allocate 4 billion resources.

Actually, it doesn't even know at instance time what kind resource
(logic, wire, FF etc.) it's allocating or even how many of those
resources are truly required in the final optimised logic.

Regards,
Michael


Michael Neuling
  Reply With Quote
Old 11-27-2003, 12:52 AM   #5
Michael Neuling
 
Posts: n/a
Default Re: Synthesis support for multi-dimentional arrays
Looking a little deeper at the VHDL RTL synthesis subset (1076.6-1999)
in 8.3.2.1 on Array types:
"The index constraint shall contain exactly one discrete range".

So the synthesis tools don't even have to support 2D arrays.

Regards,
Michael


Michael Neuling
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
New DVD standard gains support. Allan DVD Video 0 01-18-2004 08:20 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46