Lombiq / Hastlayer-SDK

Turning .NET software into FPGA hardware for faster execution and lower power usage.
https://hastlayer.com
BSD 3-Clause "New" or "Revised" License
301 stars 33 forks source link

Implement the ability to use bit variables (HAST-235) #8

Open Piedone opened 7 years ago

Piedone commented 7 years ago

For #2 we need to store bit values in an efficient way. We could use bools, which on the FPGA will be represented as bits (which is great), but probably a more explicit approach would be better. Options:

See: http://stackoverflow.com/questions/352089/why-cant-i-define-a-bit-in-c-sharp

Jira issue

Piedone commented 6 years ago

These could be handled by "compiler intrinsics" of the Transformer specifically: instead of actually transforming them an efficient pre-created hardware implementation could be used (similarly how ImmutableArray support works).

Maybe having an instrinsic behaviour for BitMask would actually be the best: have a configurable-sized (as many bits as you wish) signed/unsigned register with support for basic operators like arithmetic, shifting... Would also help #21.