bavovanachte / sphinx-wavedrom

A sphinx extension that allows including wavedrom diagrams by using its text-based representation
MIT License
32 stars 18 forks source link

Support for bit fields #11

Closed wifasoi closed 3 years ago

wifasoi commented 5 years ago

Before 2.0 you can use the wavedrom bitfield extension. Now we are limited by the capability of wavedrompy (no problem for me) This is just a reminder that this feature will be available to us when the https://github.com/BreizhGeek/wavedrompy/pull/7 will be merged

wallento commented 5 years ago

Hi,

you can still use bitfield for the online js version, wavedrompy is not necessary.

Anyhow, wavedrompy supports bitfields now (also schematics), but unfortunately it didn't get merged into the original repo so far. But I have uploaded my latest version to pypi as release candidate. Can you please try that?

Cheers, Stefan

wifasoi commented 5 years ago

Ahh ok, didn't know you added the bit extension to your fork, cool. I'll test the release candidate right now, but For future reference down here the stack-trace.

Maybe is a problem with ReadTheDoc, but this is the error that trow me: https://pastebin.com/QJv5eNVb

with this wavedrom snippet

.. wavedrom::

   {"reg":[
      {"bits": 8, "name": "things"},
      {"bits": 2, "name": "stuff" },
      {"bits": 6}
     ],
     "config": { "bits":16,"lanes":1 }
   }
joshuascheid commented 5 years ago

That's because the call to WaveDrom().renderWaveForm() returns None, since the data is not of "signal" type. Either use a top-level "render" call like in https://github.com/wallento/wavedrompy/blob/master/wavedrom/__init__.py#L33 or duplicate that logic at https://github.com/bavovanachte/sphinx-wavedrom/blob/master/sphinxcontrib/wavedrom.py#L137

bavovanachte commented 3 years ago

I'm assuming this fixes the issue reported by @wifasoi . Closing now, feel free to reopen if not the case