samitbasu / rust-hdl

A framework for writing FPGA firmware using the Rust Programming Language
Other
325 stars 17 forks source link

QUESTION: How to concat bit values together? #36

Closed john-terrell closed 9 months ago

john-terrell commented 10 months ago

Is there an easy mechanism to concat different bit values together?

If I have to bit values 0xAA and 0xBB and 0xC - how can I create 0xAABBC? I can shift them manually, of course - is there a more succinct way?

samitbasu commented 9 months ago

Hi @john-terrell - in rust-hdl, you can only shift and or them. In rhdl, you can simply put them into a tuple.