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!

AR# 62935

Vivado Synthesis - The system task $readmemh does not take effect when memory is not inferred.

Description

When memory is not inferred (for example, where it is used as constant), Vivado Synthesis reports the following warning:
 

WARNING: [Synth 8-2898] ignoring malformed $readmem task: invalid memory name [.../ybd.v:38]


Sample code:

reg [COEFF_WIDTH-1:0] coeff_array [0:TAP_NUM_ALL-1];
    initial begin
                $readmemh("lte_int_hb2.coe", coeff_array , 0, TAP_NUM_ALL-1);
    end
    always@(posedge clk)begin
        out<=in&coeff_array[0];
    end

How can I resolve this issue?

Solution

Vivado Synthesis supports $readmemb/$readmemh to initialize RAMs only in scenarios when block RAMs are inferred.

In situations where memory is not inferred, Vivado synthesis does not support these tasks, and instead generates the warning message.

To work around it, declare one memory address redundant and use it as the memory index.

For example:
 
;
reg  [COEFF_WIDTH-1:0]  coeff_array [0:TAP_NUM_ALL
-1];
   
initial begin
                $readmemh("lte_int_hb2.coe", coeff_array , 0, TAP_NUM_
ALL-1);
    end
    always@(posedge clk)begin
        out<=in&coeff_array[addr];
d
AR# 62935
Date Created 11/24/2014
Last Updated 02/16/2015
Status Active
Type Known Issues
Tools
  • Vivado Design Suite - 2014.3
  • Vivado Design Suite - 2014.4
  • Vivado Design Suite - 2014.2
  • Vivado Design Suite