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.

Loading default values to block RAM using Quartus

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

Using Quartus, is it possible to load default values into a Block RAM ?
 

Yes, it is possible with the MegaWizard tool. Otherwise, there are plenty of example that can be used directly in your VHDL/Verilog file.
 

I know Quartus II gives you the option to use HEX/MIF file for memory initialization - and I understand how such a thing is be possible for a LUT based RAM.
But how is it done for a BRAM ?
Writing information to a BRAM is done through its ports - one cell at a time.
 

When using default value for BRAM, the values are included in the bitstream. During the configuration phase, the FPGA sets the value of the BRAM from the bitstream. After the configuration phase, the BRAM is accessible through its port.
 

Well,
If it's being programmed - it makes sense that it's part of the bitstream...no surprise here.

But I thought that a BRAM is a highly optimized silicone area in the chip which has special access circuitry (somewhat similar to the access circuitry found on IC memory chip) - without individual cell access as with a LUT.
 

The reason why the silicon provides a path to preload BRAM during configuration is quite obvious, I think. BRAM is used as ROM in many designs.
 

The reason why the silicon provides a path to preload BRAM during configuration is quite obvious, I think. BRAM is used as ROM in many designs.

Sure.
And you can find many more good answers to the 'Why' question. But I'm asking - How?
 

Without asking altera themselves, I doubt you will find anyone who knows how. And I doubt altera will tell you (this is probably all part of patents or secret in house magic they need to protect)
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Functionally it's a huge shift register through all BRAM cells, along with the other configuration information streamed into the BRAM block. For me it's sufficient to know that we can rely on the feature. Knowing "how" it's done on a transistor level would be interesting for a FPGA chip designer, but I'm none and I guess you neither.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
For verilog on Altera you can use $readmem (maybe the others too). Five years ago this was a bit dangerous as it would fail to work in rare cases, but also not post a warning. I used this to store the FPGA software memory-map on the FPGA, along with information about device utilization and timing. The feature was non-critical, and only used by myself for debugging, so the tool issues were not a large concern.

Xilinx FPGAs have a second, non-fabric accessible port to access BRAM and other non-fabric accessible RAMs (eg, the LUTs). They can be accessed through the ICAP port if needed. I don't recall what limits there are for this.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top