wavedrom / bitfield

:cake: bit field diagram renderer
MIT License
340 stars 26 forks source link

Support for `--bigendian true` #22

Closed kevbroch closed 4 years ago

kevbroch commented 5 years ago

Looking at the code here: https://github.com/drom/bitfield/blob/master/lib/render.js#L209 I don't see how setting --bigendian true does anything

drom commented 5 years ago

True. This feature was requested but never been properly implemented. Do you plan using it?

kevbroch commented 5 years ago

Yes, that was my hope.

smnice commented 4 years ago

Hi @drom , I discovered WaveDrom by reading your interview with electronicdesign, that you posted recently on LinkedIn. I am part of a project that builds a document drafting framework (with focus on Technical Norms/Standards such as IETF, IEEE, ETSI etc.) and big-endianness is the dominant ordering in networking protocols. Often message descriptions as in the following picture are required:

image

Hence my interest in the bitfield library and especially on the big-endian feature. What would be your advice on how to progress best with this feature ?

drom commented 4 years ago

It should be too hard. Let me try.

drom commented 4 years ago

I ended up implementing 2 options instead of bigendian option in v1.3.1:

You can see how they work here: https://observablehq.com/@drom/bitfield-testbox

smnice commented 4 years ago

Hi @drom , Thanks a lot for this update ! The options {compact: true, vflip: true, hflip: true} provide the rendering that is most often used in our standards. Very impressive your tool. We will implement a prototype in our platform. I will keep you posted.

drom commented 4 years ago

@smnice looking forward to seeing your prototype. Closing this ticket.