UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer yotam
Observer
166 Views
Registered: ‎11-07-2012

using a vhdl package in an RTL modul in block design

Hi

I'm using a vhdl package in an RTL module in a block design;

in the vhdl package there are some constant to use in the RTL module ports.

if the constant in the  vhdl package is equal a number it is OK :

constant c_pixel_width : integer = 8  - this is OK

if the constant is equal a combination of other constants it doesnt recognize it in the RTL module:

constant c_pixel_width : integer := 8; 

constant c_number_of_pix_per_clk : integer := 4;

constant c_vid_width : integer := c_pixel_width *  c_number_of_pix_per_clk; 

the RTL module, when I'm trying to instantiat it in the block diagram, is not recognize the c_vid_width  constant

can anybody HELP me?

TX

Yoti 

 

 

0 Kudos
4 Replies
Moderator
Moderator
160 Views
Registered: ‎01-16-2013

Re: using a vhdl package in an RTL modul in block design

@yotam

 

Can you share a test case for the issue?

 

--Syed

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

Did you check our new quick reference timing closure guide (UG1292)?
---------------------------------------------------------------------------------------------
0 Kudos
Observer yotam
Observer
142 Views
Registered: ‎11-07-2012

Re: using a vhdl package in an RTL modul in block design

Im using the attached package

and thos are the messages:

  • [IP_Flow 19-627] Port 'axi_mem_user_rdata_in': XPath expression failed: Undefined parameter "c_pkg_axi_data_width" used in expression "(c_pkg_axi_data_width - 1)".
  • [IP_Flow 19-627] Port 'bpra_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'bprb_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'det_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'noise_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'tdf_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'vout_wr_data_in': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-627] Port 'axi_mem_user_wdata_out': XPath expression failed: Undefined parameter "c_pkg_axi_data_width" used in expression "(c_pkg_axi_data_width - 1)".
  • [IP_Flow 19-627] Port 'axi_mem_user_wstrb_out': XPath expression failed: Undefined parameter "c_pkg_axi_data_width" used in expression "((c_pkg_axi_data_width / 8) - 1)".
  • [IP_Flow 19-627] Port 'mem_to_user_data_o': XPath expression failed: Undefined parameter "c_pkg_app_data_width" used in expression "(c_pkg_app_data_width - 1)".
  • [IP_Flow 19-4668] Failed to infer definition from module 'memory_controller_top'.
  • [BD 41-1699] Unable to add reference type cell for reference-module 'memory_controller_top'
  • [BD 5-7] Error: running create_bd_cell -type module -reference memory_controller_top -name memory_controller_top_0 .

 

0 Kudos
Observer yotam
Observer
141 Views
Registered: ‎11-07-2012

Re: using a vhdl package in an RTL modul in block design

it happens when I do "add module" to the block design

0 Kudos
Scholar brimdavis
Scholar
98 Views
Registered: ‎04-26-2012

Re: using a vhdl package in an RTL modul in block design

@yotam   "I'm using a vhdl package in an RTL module in a block design; in the vhdl package there are some constant to use in the RTL module ports."

Xilinx's IP packager (and I believe also the module reference flow) appear to use an ad-hoc parser that doesn't actually understand VHDL, it just 'scrapes' the source code for the generics and ports, requiring simplistic self-contained expressions in order to work.

I posted a summary of similar problems I'd seen, and pointers to what little Xilinx documentation exists, on this old thread from 2017:

https://forums.xilinx.com/t5/Design-Entry/IP-Packager-can-t-infer-port-widths/m-p/812892/highlight/true#M15046

" As a result, any generic and port expressions must be explicit and entirely self contained, nor does the fun stop there:
"   - constants and functions defined in a package are not allowed in generic and port expressions
"   - simple stuff, like an ( others => '0' ) initial value for a std_logic_vector generic, doesn't work
"   - real generics, supported in ISE XPS, are not supported by Vivado IPI
"   - port types are limited to plain-old-Verilog equivalents- no user defined types, records, etc.
"   - OOC is bottom-up only, meaning all IP parameters must be hard-coded at the lower levels of the hierarchy
"   - packaging System Verilog or VHDL-2008 is verboten

If you're seeing simple constants-in-packages now work in the module reference flow, it appears they have improved things slightly since I last checked; but judging by your error messages, Xilinx's questionably designed port/generic parsing code still does not appear to allow legal VHDL expressions within such constant declarations.

EDIT: I have confirmed the behavior you describe in 2018.3; module references can use a package constant in a port expression, but ONLY if the constant is defined by assignment to an explicit value - any expressions, or even a simple reference to another package constant, don't work.

As an ugly workaround, you might be able rewrite the problematic port range expressions to locally repeat the package calculations using just 'simple' constants defined within the package, but IIRC these port range expressions are also quite limited by the Vivado IP port parser.

 -Brian

0 Kudos