Hi Roger,

"Roger Bourne" <

[email protected]> wrote in message

news:

[email protected] oups.com...

>

> what I was pondering was how a set of constants that are suppose to be

> routed to the same operand of a multiplier (not at the same time, of

> course ), will be stored.

>

> > A constant input to an embedded resource such as a RAM or multiplier
will

> > be stored in slice registers (flip flops) within the device.

>

> I guess, from the above, it means that the constants will stored in

> the same number of FFs as the number of bits of the constants.
Actually, a constant will rarely if ever be stored in a flip-flop, because

the tools will optimize away a flip-flop that never toggles and replace it

with a LUT driving the same value. Since there are only two possible values

for each bit, you need a minimum of two LUTs to give you "global" 1/0

signals, which can then be routed to the appropriate input(s). Your original

question seemed to be: does this cause routing congestion, and if so, how

can I avoid it? The answer is that the implementation tools will (read:

/should/) take care of this for you, by duplicating these constant drivers

appropriately

However, in your case, it sounds like you actually want a ROM to store your

multiplier coefficients. What you describe seems to be a number of constant

values, fed to a multiplexor that selects the appropriate constant given the

state of some other signals in your design. Now say that you have four

signals that determine which constant to use on the current clock cycle. For

each bit of the constant operand you need a function that determines what

that bit should be. This function is four-bit input, one bit output: i.e. it

is a LUT. So in fact all of your constants (up to 16 of them) will fit in N

LUTs, where N is the number of bits of the constant.

When the said four bits are a binary-encoded address, the LUT is effectively

being used as a conventional ROM.

In general, constants are rarely "stored" in any recognizable way in an

FPGA, except in ROM tables; rather, constant propagation at synthesis time

causes them to be absorbed into the surrounding logical expressions (often

simplifying them and reducing the area consumed by your circuit).

Cheers,

-Ben-