netlistsvg: Add skins for missing Yosys RTL cells

Some cells from Yosys that could use a skin. I created this issue to figure out which cells should get skinned, as well as what skin they should get. I’m pulling information from the latest version of the Yosys manual. All ideas, comments, and constructive criticism welcome.

unary operators

  • $pos, making into a plus sign may get confusing with addition
  • $neg, making into a minus may get confusing with subtraction
  • $reduce_and should be added as an alias to and
  • $reduce_or and reduce_bool should be added as aliases to or

binary operators

  • $shl, $shr, $sshl, $sshr could be done with just <<, >>, <<<, and >>> respectively
  • $mul, * or x could work
  • $div, / could work
  • $mod, % could work
  • $pow, ^ or a^b may work
  • $eqx may be added as an alias to $eq
  • $ne and $nex could have a =/= symbol

registers

  • $sr, I don’t think this one needs a skin
  • $adff, same as $dff but have an ARST (asynchronous reset) port. This could simply just be on the bottom of the current $dff skin
  • $sdff, same as $dff but have an SRST (synchronous reset) port. This could simply just be on the bottom of the current $dff skin, though not sure how to distinguish from $adff, maybe by putting an A or S next to the reset port
  • $dlatch, $dlatchsr, and $adlatch, not sure what this one would look like
  • $dffsr, not sure what this one would look like

There are several other register variants listed in the manual that may be too niche / difficult to properly define a skin for. These are $dffe, $adffe, $dffsre, $sdffe, and $sdffce.

memories

  • $mem, $memrd, $memwr, $meminit - I’m not sure what to do for these, if anything should be done

gates

  • $_BUF_
  • $_ANDNOT_, $_ORNOT_
  • $_AOI3_, $_OAI3_, $_AOI4_, $_OAI4_
  • $_MUX4_, $_MUX8_, $_MUX16_

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

This looks awesome!

All looks pretty awesome to me!

So I’ve worked a little bit more on this, specifically on the latches / flip-flops. For latches/ffs with a reset, I’ve just added a port onto the bottom that can be populated if it exists, and I’ve not distinguished between synchronous and asynchronous (yet). I also added -bus variants for these.

image

Here’s an example of one diagram before:

image

And after:

image