LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register and numeric constant in labview fpga

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

 

Message 1 of 9
(3,681 Views)

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?

Message 2 of 9
(3,665 Views)

@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

 

0 Kudos
Message 3 of 9
(3,651 Views)

Depends on the chasis/FPGA but 100x14bits isn't really all that much space.

Message 4 of 9
(3,645 Views)

@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!!!

0 Kudos
Message 5 of 9
(3,640 Views)

@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 Kudos
Message 6 of 9
(3,632 Views)

@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??

0 Kudos
Message 7 of 9
(3,629 Views)

@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.

0 Kudos
Message 8 of 9
(3,627 Views)

@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

0 Kudos
Message 9 of 9
(3,620 Views)