wavedrom/bitfield

compact mode attributes

Opened this issue · 5 comments

drom commented

@nopeslide I have updated wavedrom.com to support compact mode. #23

{reg:[
  {name: 'IPO',   bits: 8, attr: 'RO', type: 6},
  {               bits: 7},
  {name: 'BRK',   bits: 5, attr: 'RW', type: 4},
  {name: 'CPK',   bits: 1 },
  {name: 'Clear', bits: 3 },
  {bits: 8 }
], config: {lanes: 4, compact: true}}

One issue is the field attributes. (RO, RW) In example above. Do you have ideas how we can place attributes in the compact mode?

@drom I don't think there is an elegant way to support attributes in the compact mode, except for just breaking it up.
Even multilines rendered normally have issues placing them right.
I think a dynamic spacing (dependent on the number of attributes) between the lines could solve the general multiline attribute issue.

@drom I believe tooltips are a good way to solve this:
1111111111111

I have issues with names overlapping and also want to represent more informations about the fields like the reset value and so on..

drom commented

Tooltips are OK solution for HTML but not for PDF.

drom commented

Here is another style with extension lines.

RB

regmap

LB

regmap001

LU

regmap002

drom commented

Example with rotated and abbreviated field names.

regmap003