LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I32 signed in U32 DMA FIFO

  Dear,
 
In the project, I used a DMA FIFO from the FPGA VI to the Host VI.
I would like keep the data signe (I32), when I recieved the data on the Host.
Can I put the signe on the fist bit? 1bit signe+31 bits unsigned value?
Otherwise how I can do? 
 
Regards
  Massif
0 Kudos
Message 1 of 5
(4,605 Views)

Hi,

Change the representation to fixed-point and fill in the Fixed-Point Configuration according to the properties of the fixed point data type on the FPGA. 

Once the fixed point data is converted, you can use the numeric conversion VIs to convert the data to any representation that is needed on the host.



Message Edité par BenjaminR le 03-20-2008 07:58 AM

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 2 of 5
(4,586 Views)
Massif-
 
DMA FIFOs can currently only pass U32 data types.   To convert your data back to I32 just use the "To Long Integer" conversion bullet, or just wire directly to an I32 indicator.  There is no need to convert to Fixed Point first.
 
 
-Dustin


Message Edited by Dustin W on 03-20-2008 09:43 AM
Message 3 of 5
(4,576 Views)

This is a simple type cast issue.

Use the number to bool array function, then bool array to number.  If you pull up the properties on the bool array to number you can then set the type to U32

This does a type conversion, it does not change the actual bits, but rather how Labview interprets the number.

In the host it is easier, you can pull your U32 out of DMA and use the type cast function to cast it back to the I32 type.

Type cast is NOT type convert.



Message Edited by fppf on 03-25-2008 08:54 PM
Message 4 of 5
(4,553 Views)

Thank you Dustin,

After the convert I keep the signe of my data.
But, I don't understand how it's work.

For exemple:

On FPGA I have a I32 signe number. The max number is 2^32.
I convert this number in a U32. What is the max number? How he keep the signe of the number?

On Host
I convert the number in a I32. (I have the signe number) The max number is 2^32.  

0 Kudos
Message 5 of 5
(4,520 Views)