LabVIEW FPGA Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Intaris

Please give us FXP-based enums

Status: New

When instantiating case structures, the bit width of the selector has an influence on the efficiency of the code being produced.  Of course various compiler optimisations will (may?) do a lot of this lifting for us if we actually wire in an FXP (which LabVIEW again tries to coerce to I32, but that's another battle) but I'd like to have the ability to create, use and convert to and from enums with variable bit-widths.  Of course the only parameter of importance for this is the width of the FXP, the integer bits become essentially irrelevant.

 

I currently have to do a lot of U8 Enum FXP conversions in order to be able to force my case structures to adapt to a given width when supplying an enum to control some code.  Readability would benefit greatly if the enum itself could "simply" be an FXT to begin with.