Electronic – Using FPGA specific hardware components when writing RTL

designfpgahdl

I have heard at times that someone writing a digital circuit design may want to use actual primitives present on the FPGA directly in the design. This means including the library which contains those primitive definitions into our design and then instantiating them in it. Examples could be a memory block, DSP block, logic array block e.t.c. directly instantiated and connected into our design.

I have not done this yet and don't see when doing so is important. Why would someone want to do so? Does it effect the way we do simulation of the design?

We always like to write our circuit from higher level of abstraction, therefore, instantiating such blocks does not make much sense to me.

Best Answer

Once you start incorporating specific primitives into your design, that design is no longer portable — it is locked into the technology in which those primitives appear.

In order to simulate such a design, you need to have the manufacturer's simulation library for those primitives. Such libraries are often delivered as encrypted binary files, in order to prevent the release of proprietary information about the implementation of those primitives.

One thing that I often do when faced with the need to use such a primitive is to "wrap" the primitive in an outer module that has a more abstract interface that's specific to my application. This allows me to write a purely behavioral version for initial functional debugging, and also to find a different way to map that functionality onto a different vendor's proprietary technology.