LabVIEW FPGA Idea Exchange

About LabVIEW FPGA Idea Exchange

Have a LabVIEW FPGA Idea?

  1. Does your idea apply to LabVIEW in general? Get the best feedback by posting it on the original LabVIEW Idea Exchange.
  2. Browse by label or search in the LabVIEW FPGA Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  3. If your idea has not been submitted click New Idea to submit a product idea to the LabVIEW FPGA Idea Exchange. Be sure to submit a separate post for each idea.
  4. Watch as the community gives your idea kudos and adds their input.
  5. As NI R&D considers the idea, they will change the idea status.
  6. Give kudos to other ideas that you would like to see in a future version of LabVIEW FPGA!
Showing results for 
Search instead for 
Did you mean: 

Allow Type Cast in FPGA

We need a way to simply reinterpret the bits in our FPGAs.  I currently have a situation where I need to change my SGL values into U32 for the sake of sending data up to the host.  Currently, the only way is to make an IP node.  That is just silly.  We should be able to use the Type Cast simply for the purpose of reinterpreting the bits.

10 Comments
Intaris
N/A

I use the To boolean array and back. To boolean array and back is basically free on FPGA if the bits match.

crossrulz
N/A

I will have to try that, but when I looked at it before, the To Boolean Array coerced my SGL.  I was left to assume this would drop my decimal points and just leave my rounded off integer value.

djclark
N/A

Unfortunately Number To Boolean Array coerces floating point data to U32, rather than flattening it. Everything after the decimal gets truncated.

Intaris
N/A

I don't use SGL on FPGA so that's something I've never seen.

 

I think fixing this bug would be the best approach because that behaviour is wierd.

A_Tish
N/A

I will have to look into this, but try typecasting the SGL as FXP and then use Boolean array to number to typecast to U32.  

 

I will try and find where I had to accomplish this, very long time ago though.

 

I think that is the trick though, would be so much nicer to directly typecast though.  Not sure why the compiler cannot figure it out given they implemented the single already.  

heel
N/A

Yes the lack of typecasting in FPGA is a nuissance. Hope this will get fixed. I dont see any reason why not to support typecasting.

MrJackHamilton
N/A

I'm not sure about this, FPGA space is precious, and high-level implementations are often inefficient, this would consume FPGA space at the expense of coding convenience.

 

As my main concern in coding FPGA is fabric space, I prefer more low-level tools than high-level abstraction tools.

JHE
N/A

To boolean array and its opposite are typecast. They just cannot handle SGL, they get converted to I32 before boolean array.

 

Now, if someone would do some IP Nodes for SGL to U32 cast and back, and share it, I would be one happy camper :-)

 

 

crossrulz
N/A

They are out there.  I would have to search to find it again.  That is what I ended up doing.  But the issue with using IP nodes is you have to recompile them when you go to a new LabVIEW version and/or change hardware.  The type cast should just happen natively.

T-REX$
N/A