FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-21-2006, 10:00 AM
Guest
 
Posts: n/a
Default Initializing array of BlockRAM instances in verilog

Hi,

I'm trying to create an array of Virtex-II BlockRam instances in
verilog using

RAMB16_S36_S36 BRAM[ram_modules-1:0] (.ADDRA(ADDRA), .ADDRB(ADDRB),
...., .DOPA(), .DOPB());

This works perfectly fine, even when I add parameters like:

RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST")) BRAM[ram_modules-1:0]
(.ADDRA(ADDRA), ...

However, when I add the initialization parameters, it doesn't work:


RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST"), .INIT_A(36'h012345678))
BRAM[ram_modules-1:0] (.ADDRA(ADDRA), ...


Compiling is ok, but trying to simulate gives one of these for each
module in the array:

# ELAB2: Warning: ELAB2_0048 increment.v (22): Actual value is
incompatible with formal "INIT_A" (mixed simulation) - actual value
will be skipped.

in Aldec Active-HDL.

I've tried a bunch of different ways to get this to work.
Initialization using the defparam statements with just one BRAM
instance works fine (but not on an array, at least that I can figure
out). I guess I could just unroll the whole thing by hand, but by now,
I'm interested in just figuring out what's going on and how to make it
work.

Anyone else run into this or have any ideas?

Much thanks
-Allan

Reply With Quote
  #2 (permalink)  
Old 04-21-2006, 03:08 PM
Gabor
Guest
 
Posts: n/a
Default Re: Initializing array of BlockRAM instances in verilog

[email protected] wrote:
> Hi,
>
> I'm trying to create an array of Virtex-II BlockRam instances in
> verilog using
>
> RAMB16_S36_S36 BRAM[ram_modules-1:0] (.ADDRA(ADDRA), .ADDRB(ADDRB),
> ..., .DOPA(), .DOPB());
>
> This works perfectly fine, even when I add parameters like:
>
> RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST")) BRAM[ram_modules-1:0]
> (.ADDRA(ADDRA), ...
>
> However, when I add the initialization parameters, it doesn't work:
>
>
> RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST"), .INIT_A(36'h012345678))
> BRAM[ram_modules-1:0] (.ADDRA(ADDRA), ...
>
>
> Compiling is ok, but trying to simulate gives one of these for each
> module in the array:
>
> # ELAB2: Warning: ELAB2_0048 increment.v (22): Actual value is
> incompatible with formal "INIT_A" (mixed simulation) - actual value
> will be skipped.
>
> in Aldec Active-HDL.
>
> I've tried a bunch of different ways to get this to work.
> Initialization using the defparam statements with just one BRAM
> instance works fine (but not on an array, at least that I can figure
> out). I guess I could just unroll the whole thing by hand, but by now,
> I'm interested in just figuring out what's going on and how to make it
> work.
>
> Anyone else run into this or have any ideas?
>
> Much thanks
> -Allan


Is it possible that the initialization values are not replicated like
the module ports? i.e. for an array of 2 BRAMs maybe you
need to give 72 bits of INIT_A instead of 36?

RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST"),
..INIT_A(72'h012345678012345678)) BRAM[ram_modules-1:0] (.ADDRA(ADDRA),
....

Good luck,
Gabor

Reply With Quote
  #3 (permalink)  
Old 04-21-2006, 07:00 PM
Allan
Guest
 
Posts: n/a
Default Re: Initializing array of BlockRAM instances in verilog

Thanks. Good idea, but it doesn't change anything. I forgot to mention
above that it seems that this is more attached to the #() parameter
initialization part because using these INITs with a non-array
instantiation causes the same problem:

RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST"), .INIT_A(36'h012345678))
BRAM (.ADDRA(ADDRA), ...


-Allan

Reply With Quote
  #4 (permalink)  
Old 04-21-2006, 08:47 PM
Gabor
Guest
 
Posts: n/a
Default Re: Initializing array of BlockRAM instances in verilog


Allan wrote:
> Thanks. Good idea, but it doesn't change anything. I forgot to mention
> above that it seems that this is more attached to the #() parameter
> initialization part because using these INITs with a non-array
> instantiation causes the same problem:
>
> RAMB16_S36_S36 #(.WRITE_MODE_A("READ_FIRST"), .INIT_A(36'h012345678))
> BRAM (.ADDRA(ADDRA), ...
>
>
> -Allan


I know this sounds dumb, but could the order of parameters be the
problem?
In the simprims and unisim libraries I noticed that INIT_A is the first
parameter
in the list. Maybe...

RAMB16_S36_S36 #(.INIT_A(36'h012345678), .WRITE_MODE_A("READ_FIRST"))
BRAM (.ADDRA(ADDRA), ...

Reply With Quote
  #5 (permalink)  
Old 04-22-2006, 05:51 AM
Allan
Guest
 
Posts: n/a
Default Re: Initializing array of BlockRAM instances in verilog

Nope, that didn't do it either. I've tried some iterations of this
theme with no success. Where would I find the libraries you mentioned
to take a look at?

Reply With Quote
  #6 (permalink)  
Old 04-25-2006, 09:30 PM
Gabor
Guest
 
Posts: n/a
Default Re: Initializing array of BlockRAM instances in verilog


Allan wrote:
> Nope, that didn't do it either. I've tried some iterations of this
> theme with no success. Where would I find the libraries you mentioned
> to take a look at?


%Xilinx%\verilog\src\unisims\RAMB16_S36_S36.v

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Initializing Array from String Uwe Bonnes Verilog 5 03-03-2007 04:54 PM
array of instances paz Verilog 3 11-30-2006 01:12 AM
array of instances paz Verilog 0 11-29-2006 07:46 PM
Initializing array of BlockRAM instances in verilog [email protected] Verilog 1 04-22-2006 09:09 AM
Easier initializing of blockram (spartan3) Morten Leikvoll FPGA 3 01-09-2006 07:08 PM


All times are GMT +1. The time now is 05:54 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved