09-13-2013 11:31 AM - edited 09-13-2013 11:31 AM
Dear member
I want to Store large numbers of constant values in FPGA chip using labviewFPGA
after I store the values I want to process them with other variable input
the problem is
which is best method to store these values without using memory and effect on FPGA resource
1-numeric constant??
2-register??
3-constant register ??
I read about numeric constant here http://zone.ni.com/reference/en-XX/help/371599H-01/lvfpga/fpga_sgl_numeric_constant/
he say that it consumes no logic resources on the FPGA. However, if you wire a numeric constant to a Logical operation, FPGA lookup table resources store the constant value.
Is the comparator operation is considered a logical operation?????
best regeards
09-13-2013 01:18 PM
Depends how you define a large number. Are you going to key them all in manually, what data type? How many 100, 1000, 1000000?
Look at using a memory, right click on the FPGA target -> new memory. You can use a VI to programmatically set the intial values, then compile them in.
The real question is what the use/purpose of a 'large' number of constant values?
09-13-2013 02:17 PM - edited 09-13-2013 02:19 PM
@WillD wrote:
Depends how you define a large number. Are you going to key them all in manually, what data type? How many 100, 1000, 1000000?
Look at using a memory, right click on the FPGA target -> new memory. You can use a VI to programmatically set the intial values, then compile them in.
The real question is what the use/purpose of a 'large' number of constant values?
the data type is 14 bits fixed point
the number of constant about 100 numbers
i will process them in same time with other variable in parallel, i has system like SIMD(single instruction multiple data)
so if i use memory to store them i must read them then i store them in registers them process them.
-------
100 registres i very FPGA consume
best rgeards
09-13-2013 02:42 PM
Depends on the chasis/FPGA but 100x14bits isn't really all that much space.
09-13-2013 02:51 PM
@WillD wrote:
Depends on the chasis/FPGA but 100x14bits isn't really all that much space.
My FPGA chip is 500K gate and this 100 *14 bit will be very effect
I use numeric constant its take less space but I note that space will depend on stored value in the numeric constant
is their a magic method to solve the problem!!!
09-13-2013 02:57 PM
@saliim wrote:
My FPGA chip is 500K gate and this 100 *14 bit will be very effect
I use numeric constant its take less space but I note that space will depend on stored value in the numeric constant
is their a magic method to solve the problem!!!
1400 bits will be less than 0.3% of the space if stored in flip flops. The compiler will optimize as much as possible using the LUT for adders/subtractors. Your only choice is to use a constant or memory read.
Depending on what your overall goals are, say multiply by a consant, you may be able to handle that on the host side.
09-13-2013 02:59 PM
@WillD wrote:
@saliim wrote:
My FPGA chip is 500K gate and this 100 *14 bit will be very effect
I use numeric constant its take less space but I note that space will depend on stored value in the numeric constant
is their a magic method to solve the problem!!!
1400 bits will be less than 0.3% of the space if stored in flip flops. The compiler will optimize as much as possible using the LUT for adders/subtractors. Your only choice is to use a constant or memory read.
Depending on what your overall goals are, say multiply by a consant, you may be able to handle that on the host side.
0.3% if i use numric constant or registers??
09-13-2013 03:08 PM
@saliim wrote:
@WillD wrote:
@saliim wrote:
My FPGA chip is 500K gate and this 100 *14 bit will be very effect
I use numeric constant its take less space but I note that space will depend on stored value in the numeric constant
is their a magic method to solve the problem!!!
1400 bits will be less than 0.3% of the space if stored in flip flops. The compiler will optimize as much as possible using the LUT for adders/subtractors. Your only choice is to use a constant or memory read.
Depending on what your overall goals are, say multiply by a consant, you may be able to handle that on the host side.
0.3% if i use numric constant or registers??
register? Like a shift register?
If it truely is a constant, use a numeric constant then. The constant will optimize better, a shift register assumes you need read/write capability.
You should post a block diagram of what you have and explain what you are trying to accomplish.
09-13-2013 03:20 PM
@WillD wrote:
@saliim wrote:
@WillD wrote:
@saliim wrote:
My FPGA chip is 500K gate and this 100 *14 bit will be very effect
I use numeric constant its take less space but I note that space will depend on stored value in the numeric constant
is their a magic method to solve the problem!!!
1400 bits will be less than 0.3% of the space if stored in flip flops. The compiler will optimize as much as possible using the LUT for adders/subtractors. Your only choice is to use a constant or memory read.
Depending on what your overall goals are, say multiply by a consant, you may be able to handle that on the host side.
0.3% if i use numric constant or registers??
register? Like a shift register?
If it truely is a constant, use a numeric constant then. The constant will optimize better, a shift register assumes you need read/write capability.
You should post a block diagram of what you have and explain what you are trying to accomplish.
Thank you for the information share
Its truly constant
I think the problem solved now and this is my vi you can see in the middle of the vi the numeric constant at the input of the comparators