Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

When to use Block RAM

Status
Not open for further replies.

hithesh123

Full Member level 6
Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
Activity points
3,548
Is using block RAM efficient when you don't use lots of Memory but have quite a bit of registers - like 50 or 100 16-bit registers.
 

Probably not, but if you have a lot of the "register" banks behaving like a memory it might be better to re-pack them into a block ram.
 

The question is at least incomplete.

What are your requirements for the registers? You know that a RAM is controlled by an adress input (ot two independent adress inputs in case of a dual-port RAM). So you can only access one (or maximum two) regsisters at a time/a clock cycle. Is your register usage compatible with this restriction?
 

The question is at least incomplete.

What are your requirements for the registers? You know that a RAM is controlled by an adress input (ot two independent adress inputs in case of a dual-port RAM). So you can only access one (or maximum two) regsisters at a time/a clock cycle. Is your register usage compatible with this restriction?

Yes, my register usage is compatible with the restriction.
Is there an advantage of using block ram in this case.
 

With a block ram, it is all self contained. With registers, you may have the logic spread out causing timing problems.
 

RAM usage for registers is particularly effective if the data is accessed sequentially or one-out-of-N registers has to be selected alternatively, e.g. for slow and medium speed filters, calibration tables etc.
 

For xilinx, you have three choices:
1.) registers only
2.) block ram
3.) distributed ram

distributed ram works well in the 16-128 item range (1 slice). for 100 16b registers, I'd use distributed ram. You can infer either using similar constructs, so you can decide to use BRAM or distributed ram later.
 

For xilinx, you have three choices:
1.) registers only
2.) block ram
3.) distributed ram

distributed ram works well in the 16-128 item range (1 slice). for 100 16b registers, I'd use distributed ram. You can infer either using similar constructs, so you can decide to use BRAM or distributed ram later.

What do you mean by 16-128 item range?
 

Look at the SLICEM configuration. a depth of 16 is nice because it is a 4b address, so the addressing can be done in one slice. A depth of 16 or 32 allows a 6b/slice configuration. 128b lines up well with a 1b/slice option. Thus all of these options allow rams to be made without needing additional muxing logic. For narrow busses, deeper distributed rams may be ok as the extra muxing logic is still not that bad. As the bus width grows, BRAM becomes more attractive. As depth/width expands further, several BRAM are required an external RAM (DDR3) becomes attractive. On the lower end, 1-15 elements are also possible if needed, but use around the same amount of logic as a depth of 16.

For CPU applications, DMEM's ability to have a 3 read, 1 write structure can also be an advantage.
 

BRAM is useful and it functions like a stack..you can rewrite and use bram so therefore ur using a fixed number of resources of memory.you can point to a address location just like pointers and it helps you also in indexing the data values.
 

BRAM is useful and it functions like a stack..you can rewrite and use bram so therefore ur using a fixed number of resources of memory.you can point to a address location just like pointers and it helps you also in indexing the data values.

A BRAM is just a memory. A stack is a programming concept. You could create a stack and put it in BRAM if you wanted, but they are 2 completly different things.
 

i do agree its is not a COMPLETE stack...however u need just the address to get the data from the bram just like an pointer....and you can use it multiple times...
 

A pointer is another programming concept. At hardware level there are no pointers. Just raw addresses.
I dont understand what you mean by "you can use it miltiple times". With any memory you provide and address, you get data from that address or write data to that address. Thats all there is to it.
 

my relevance to the topic as in the case of BRAM is about memory management by reusing the brams effectively..
 

BRAM is useful and it functions like a stack..you can rewrite and use bram so therefore ur using a fixed number of resources of memory.you can point to a address location just like pointers and it helps you also in indexing the data values.

Uhm, no. A block ram is boring random access memory. You can use a bram to implement a stack, but bram is less limited (regarding access patterns) than a stack. Also, all mammals are cows! moooo!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top