Open meisterluk opened 3 years ago
Interesting, I will have a look at it, and sorry for the delay
I am not sure why the example is supposed to work. I think the following code does what you want to achieve:
{"signal": [
{"name": "clk_i", "wave": "P.......", "phase": 1.0 },
{"name": "reset_i", "wave": "1.0...1" },
{"name": "in_i", "wave": "=....==<u>", "phase": 0.5, "data": "0 1 0" },
{"name": "state_p", "wave": "=.=====", "data": "00 01 10 11 10|00 00" },
{"name": "state_n", "wave": "=.=====", "data": "01 10 11 00|10 00|01 01"},
{"name": "out_o", "wave": "=.=====", "data": "11 10 00 10 00|11 11"}
],
"config": { "hscale": 1 },
"head": { "tick": 0 }
}
Here:
I believe that the original wavedrom code does not work properly here. <
starts a subcycle, I would expect that the subcycle ends with >
. So, in my understanding you want a half period of u
.
Anyhow, with the original wavedrom it doesn't render as expected. Here is some code I put into the editor:
{"signal": [
{"name": "clk_i", "wave": "P.......", "phase": 1.0 },
{"name": "reset_i", "wave": "1.0...1" },
{"name": "in_i0", "wave": "=....==<", "phase": 0.5, "data": "0 1 0" },
{"name": "in_i1", "wave": "=....==<u>", "phase": 0.5, "data": "0 1 0" },
{"name": "in_i2", "wave": "=.........=.=.u", "phase": 0.5, period: 0.5, "data": "0 1 0" },
{"name": "state_p", "wave": "=.=====", "data": "00 01 10 11 10|00 00" },
{"name": "state_n", "wave": "=.=====", "data": "01 10 11 00|10 00|01 01"},
{"name": "out_o", "wave": "=.=====", "data": "11 10 00 10 00|11 11"}
],
"config": { "hscale": 1 },
"head": { "tick": 0 }
}
I would expect that in_i0
is invalid, in_i1
is what would actually be the expected, in_i2
is the workaround actually working with half cycles working on both wavedrompy and wavedrom.
@wavedrom what do you think. Is this a bug in in wavedrom or expected behavior?
I understand your point and I am not sure about the expected behaviour either. So I am also interested in @wavedrom's position.
Consider the following source code:
This works just fine in the editor. Now, let us try the same source code in wavedrompy:
As far as I can see, this is related to the “<” character.