Register file with LUTs in a SPARTAN3

Mar 15, 2005 2 Replies

I want to implement a register file with 2 read ports and one write port in a Spartan3. Is this feasible using LUTs? Another solution is to use flip flops, but I overuse the resources in this way.



Thanks, Isidoros


You should get your HDL code to produce two dual-port primitives if you infer the register file with a single write and two reads. The total cost in the Spartan-3 is 4 LUTs (2 slices) per bit for up to 16 entries.

in

I recommend you google for "register file fpga", for example see

formatting link
and my Circuit Cellar series on implementing a RISC in an FPGA at
formatting link

If you can design your instruction set so the write port is always or usually one of the read ports, you might use a single bank of dual ported LUT RAM. That was one of the ideas behind the simpler gr0000 processors

formatting link

Note in Spartan-3 only every other column of LUTs may be used as LUT RAM. :-(

Also, with Virtex-4's BlockRAM pipelined output registers, BlockRAM is finally becoming competitive with LUT RAM for register files (see also

formatting link

There have also been some discussions on this the fpga-cpu mailing list. For example, start reading at

formatting link

Jan Gray

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required