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.

Implementing a large register file

Status
Not open for further replies.

asicman

Newbie level 5
Joined
Aug 13, 2008
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,336
Hello,

I am trying to find the best way to implement a very large register file (1030+ 16-bit registers). On the write side I am using s straight forward approach:

Code:
process(CLK)
if rising_edge(CLK) then
  if (RST = '1') then
     ...<RESET CODE>
  else
    if (ADDR = C_ADDR_REG0) then
      reg_file.REG0 <= WR_DATA;
    end if
    if (ADDR = C_ADDR_REG1) then
      reg_file.REG1 <= WR_DATA;
    end if
    <.....>

my concern is with the read side, I was planning on using a MUX approach

Code:
with ADDR select
  RD_DATA <= reg_file.REG0 when C_ADDR_REG0 ,
  <...>

but I am afraid that with the amount of registers we are dealing with, the MUX resources would be huge and the design would not be able to meet timing or route constraints...does anybody else have a better approach I could use?
 

Today's FPGA have internal RAM for similar purposes. The vendor tools are typically able to extract the RAM component instantiation from your VHDL code, if the implemented behaviour fits the hardware requirements. The tools documentation tells in detail how to, e.g. the A.ltera Q.uartus software handbook. They also have simple code templates to demonstrate the method.

The other method is explicite instantiation of RAM components from vendor specific libraries. This assures, that the register file operation meets all requirements of the real hardware, e.g. regarding timing of addresses, data and control signals.
 

In Xilinx FPGAs, you may also use IPCoreGenerator to implement a memory elements such as BlockRAMs. By using language templates, they explain you how to create a RAM, ROM etc. This ways are easiest to write or read a value from RAM&ROM.
 

This can't be done with a RAM block since, the values written into the register need to be used by other blocks (i.e. multiple registers need to be read by multiple blocks at the same time), a RAM with a single or even a dual output for data would not cut it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top