synthsizing multi-dimensional array XST

May 04, 2004 0 Replies

Hi,



For one of my applications,I was coding in Behavioral Level(vhdl) for a non-pipelined matrix multiplication(only combinational logic).The functional simulation went fine.Though synthesis went on without any erros, XST did not extract any multipliers/adders(I did enable the options in synthesis properties).XST documentation says it can synthesize upto 3 dimensional arrays.



I don't want to write a structural vhdl in terms of multipliers and adders. Should I unroll the loops!! Suggestions concerning my coding style,modification etc will be very helpful.



regards



--raj


----------------------------------------------------------------------------



library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity matrix_multiply is port ( init : in std_logic; select_in: in std_logic_vector(3 downto 0); done : out std_logic_vector(15 downto 0) );



end matrix_multiply;



architecture Behavioral of matrix_multiply is



--------------------------------------------- subtype WORD8 is integer range 0 to 255; type TAB4 is array (3 downto 0) of WORD8; --one dimension of matrix type TAB4x4 is array (3 downto 0) of TAB4; signal MATRIXA,MATRIXB :TAB4X4;


---------------------------------------------------- subtype WORDBIT is std_logic_vector(15 downto 0); type OUT4 is array (3 downto 0) of WORDBIT;-- one dimension of matrix type OUT4x4 is array (3 downto 0) of OUT4; signal MATRIXC:OUT4X4;


--------------------------------------------


--------------------------------------------



constant CST_A : TAB4x4 := ( (5,6,7,8), (1,2,3,4), (2,4,5,8), (1,1,1,1) );


constant CST_B : TAB4x4 := ( (2,3,4,5), (1,2,3,4), (6,7,6,8), (1,1,1,1) ); constant CST_C : OUT4x4 := ( ((others=>'0'),(others=>'0'),(others=>'0'),(others=>'0')), ((others=>'0'),(others=>'0'),(others=>'0'),(others=>'0')), ((others=>'0'),(others=>'0'),(others=>'0'),(others=>'0')), ((others=>'0'),(others=>'0'),(others=>'0'),(others=>'0')) );


begin



MATRIXA


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required