dynamic size of ports

D

Dan Nilsen

Guest
Hi all!

I have a problem that someone here might have the answer to. I have a
divider that takes inputs of 13 and 12 bits, and produces an output of
12 bits. I have a component to strip away the redundant bits from the
divider, if the result of the division is, say an int value of 6, I
don't want to use all 12 bits. This circuit is a part of an MPEG-4
device, a quantizer, so I want to compress as much as possible. My
question is then, how do I declare the ports on the component that
strips away the bits to output an std_logic_vector that is not fixed
in size, but dynamic? This must be synthesizable. Guess there are many
ways of doing this, and I hope someone has got an answer to me.

Thanks,

Dan Nilsen
 
If the biggest answer available is 12-bits that's the resource you
need to reserve in the FPGA.

I don't think you can dynamically change the output port size without
reconfiguring the FPGA. It wouldn't make sense if you could, you need
to hardwire the max ouptut size.

You could make the output port variable by using a reconfigurable
computing algorithm and an external processor, but your process time is
going to increase considerably.

Are you size constrained? Is that why you are trying to optimize the
VHDL code?

Eric
 
Could you declare another "mask" slv that validates the divider result
slv?


Dan Nilsen wrote:
Hi all!

I have a problem that someone here might have the answer to. I have a
divider that takes inputs of 13 and 12 bits, and produces an output
of
12 bits. I have a component to strip away the redundant bits from the
divider, if the result of the division is, say an int value of 6, I
don't want to use all 12 bits. This circuit is a part of an MPEG-4
device, a quantizer, so I want to compress as much as possible. My
question is then, how do I declare the ports on the component that
strips away the bits to output an std_logic_vector that is not fixed
in size, but dynamic? This must be synthesizable. Guess there are
many
ways of doing this, and I hope someone has got an answer to me.

Thanks,

Dan Nilsen
 

Welcome to EDABoard.com

Sponsor

Back
Top