Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register rendering options data format #30

Open
leonardopsantos opened this issue Apr 27, 2021 · 0 comments
Open

Register rendering options data format #30

leonardopsantos opened this issue Apr 27, 2021 · 0 comments

Comments

@leonardopsantos
Copy link

leonardopsantos commented Apr 27, 2021

Hi there!

Just to document the options:

import wavedrom

data = """
{"reg":
  [
    { "name":"IO_MODE",         "bits":7, "attr": "RW"},
    { "name":"NS_ACCESS_GPIO",  "bits":1, "attr": "RW"},
    { "name":"PULL_CTRL",       "bits":2, "attr": "RW"},
    { "name":"LPF",             "bits":1, "attr": "RW"},
    {                           "bits":1              },
    { "name":"DRIVE",           "bits":2, "attr": "RW"},
    {                           "bits":18             }
  ],
 "config": {"fontsize":6}
}
"""

svg = wavedrom.render(data)

svg.saveas("demo3.svg")

The available parameters are defined in the bitfield.Options constructor:

class Options:
    def __init__(self, vspace=80, hspace=800, lanes=1, bits=32, fontsize=14, bigendian=False, fontfamily='sans-serif',
                 fontweight='normal'):
@leonardopsantos leonardopsantos changed the title Register rendering options data format Register rendering options data format not respected Apr 28, 2021
@leonardopsantos leonardopsantos changed the title Register rendering options data format not respected Register rendering options data format Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant