integer value for attr instead of binary
Closed this issue · 1 comments
nschwass commented
Currently, there is no way to have an integer value appear in the attr section. Integer values are interpolated in binary automatically, which prevents me from displaying the number of bits in the case below. Hack is to put parentheses around the int value to force the attributes to appear as a string.
drom commented
Source for the case:
{reg: [
{bits: 7, name: 'opcode', attr: 7}, // number -> should spread
{bits: 5, name: 'rd', attr: '5'}, // string with number -> should stay a string
{bits: 3, name: 'funct3', attr: '(3)'}, // just string
{bits: 17}
], config: {hspace: 600}}