chipsalliance / firrtl-spec

The specification for the FIRRTL language
38 stars 27 forks source link

Bits index convention #200

Closed mmaloney-sf closed 5 months ago

mmaloney-sf commented 5 months ago

Responding to #197, this PR adds a sentence explaining that we use a big-endian representation for values, with the index of the LSB as 0 and the MSB as one less than the length.

mwachs5 commented 5 months ago

this seems to include changes from another PR?

mmaloney-sf commented 5 months ago

Oops.

Fixed and force-pushed.

dtzSiFive commented 5 months ago

s/as/is/?

programmerjake commented 5 months ago

Responding to #197, this PR adds a sentence explaining that we use a big-endian representation

I would call the LSB being bit zero little-endian or LSB0, unrelated to byte endianness.

also, iirc you wanted to have this be a language-wide convention, not just on the bits function.

mmaloney-sf commented 5 months ago

I would call the LSB being bit zero little-endian or LSB0, unrelated to byte endianness.

I meant it more generally as bit endianness. The language I used in the PR should hopefully suffice.

also, iirc you wanted to have this be a language-wide convention, not just on the bits function.

I considered this, but it looked fairly specific to bits. (Although let me know if I overlooked another primop that used this). I'll keep this in the back of my mind and hoist it up if needed.