using (verilog) reg as memory

Hi

Someone must have ask this question before. Is it a good idea to use verilog's reg to declare a large block of memory and expect it will be synthesizable?

Thanks

Reply to
paulw
Loading thread data ...

Most synthesizers will infer such a block as FPGA block memory if the HDL is written in a certain way. Look at the user's guide of your synthesizer for more details.

-Kevin

Reply to
Kevin Neilson

There are two ways to synthesize a memory in an FPGA. One is to use verilog's reg as you suggested, the other one is to use Vendor Specific Primitive. Using verilog's reg is the most portable one. It works with all FPGAs with little or no modification. But it takes valuable space in your FPGA logic that otherwise can be used for other purposes. An alternative way is to instantiate Vendor Specific Primitive. This method is not portable. You must instantiate different primitive for different chips family and vendors. However, you will safe a lot of space in your chips since instantiating a Vendor Specific Primitive means you will use a dedicated memory in the chip, leaving the logic free to be used for other purposes.

Hendra

Reply to
Hendra

Most of the synthesis tools are able to infer dedicated RAM blocks.

Jim snipped-for-privacy@yahoo.com (remove capital letters)

formatting link

An

Reply to
Jim Wu

Specific

with

space

With XST, how do I know that my code is synthesized to a RAM made from the logic, or RAM made from the dedicated RAM blocks?

Hendra

Reply to
Hendra

The synthesis report will tell you if the tool inferred RAM.

Jim snipped-for-privacy@yahoo.com (remove capital letters)

formatting link

Reply to
Jim Wu

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.