EDK, user IP, how to use user-functions

Aug 03, 2006 1 Replies

hi



In EDK, I am having problem with managing user functions in user IP component. The error message is that



------------------------------------------------------------------------------------------- XST synthesis ERROR:Xst:813 - C:/.../pcores/plb2_UserDesign/hdl/vhdl/Design/PE.vhd line 81: Body of function CON_INT not found. ERROR:MDT - HDL synthesis failed!



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



One simple user function, "CON_INT" is used ONLY in one component(PE.vhd) which is a sub-module of user peripheral pcore.



It seems that I need to compile the user package and put the compiled user library in IP-wrapper. I need some comment from experienced people.



User component "PE.vhd" looks like



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



---- "PE.vhd" library IEEE; use IEEE.STD_LOGIC_1164.ALL;



use work.packet.all; -- function declare and function body



entity PE is ....



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



And "packet.vhd" looks like



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



------ "packet.vhd" library IEEE; use IEEE.std_logic_1164.all;



package packet is .... subtype reg4 is std_logic_vector(3 downto 0); function CON_INT( vec: reg4 ) return integer; end packet;



package body packet is



function CON_INT( vec: reg4 ) return integer; is variable bin: integer range 0 to 255; begin ... return bin; end CON_INT; end packet;



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



You must include the file that contains that function in the hdl sources list when using the import peripheral wizard.

Zara

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required