cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
4,300 Views

Synthesis Rom don't work

Jump to solution

Hi there

Why this simple code don't synthesized correctly?

 

 

module cmd_rom
#(parameter WIDTH_B=8,MEM_ADDR_B=5)
(
    input clkin,
  input wire [MEM_ADDR_B-1:0] addr,
    output reg [WIDTH_B-1:0] dout,
    input ren  //read enable
    );

//   (* ROM_STYLE="{AUTO | DISTRIBUTED | BLOCK}" *)
   (* ROM_STYLE = "AUTO" *)
   reg [WIDTH_B-1:0] cmd_rom [(2**MEM_ADDR_B)-1:0];

  
   initial
      $readmemb("cmd_ram.mif", cmd_rom, (2**MEM_ADDR_B)-1,0);

   always @(posedge clkin)
      if (ren)
         dout <= cmd_rom[addr];
    endmodule

 Why I get:

 

WARNING:Xst:1781 - Signal <cmd_rom> is used but never assigned. Tied to default value.

Thank you

Ehud

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Professor
Professor
5,040 Views
Registered: ‎08-14-2007

Re: Synthesis Rom don't work

Jump to solution

I have seen this warning, too.  I believe you can ignore it.  The fact that

it says "tied to default value" rather than "tied to zero" shows that the

ROM is indeed initialized, but XST somehow doesn't see this sort

of initialization the same as  assignment within an always block.

 

You can look at the resulting logic in the FPGA editor to see if

it worked correctly, or just do a post translate simulation.

 

Regards,

Gabor

-- Gabor

View solution in original post

2 Replies
Highlighted
Professor
Professor
5,041 Views
Registered: ‎08-14-2007

Re: Synthesis Rom don't work

Jump to solution

I have seen this warning, too.  I believe you can ignore it.  The fact that

it says "tied to default value" rather than "tied to zero" shows that the

ROM is indeed initialized, but XST somehow doesn't see this sort

of initialization the same as  assignment within an always block.

 

You can look at the resulting logic in the FPGA editor to see if

it worked correctly, or just do a post translate simulation.

 

Regards,

Gabor

-- Gabor

View solution in original post

Highlighted
Historian
Historian
4,276 Views
Registered: ‎02-25-2008

Re: Synthesis Rom don't work

Jump to solution
Oh, that's another stupid Xilinx warning that you can ignore.
----------------------------Yes, I do this for a living.