Closed kfeiste closed 2 years ago
This looks like a rendering bug in render_trace()
, it doesn't seem to be reserving the correct number of characters to print the data. Until the bug is fixed, I believe you can work around it for now by overriding symbol_len, like this:
sim_trace.render_trace(symbol_len=8)
With that change to your code, I get this output, which appears to be correct:
addr 0x0 ╳0x1 ╳0x2 ╳0x3 ╳0x4 ╳0x5 ╳0x6 ╳0x7 ╳0x8 ╳0x9 ╳0xa ╳0xb ╳0xc ╳0xd ╳0xe ╳0xf ╳0x10 ╳0x11 ╳0x12 ╳0x13 ╳0x3e8 ╳0x3e9 ╳0x3ea ╳0x3eb ╳0x3ec ╳0x3ed ╳0x3ee ╳0x3ef ╳0x3f0 ╳0x3f1 ╳0x3f2 ╳0x3f3 ╳0x3f4 ╳0x3f5 ╳0x3f6 ╳0x3f7 ╳0x3f8 ╳0x3f9 ╳0x3fa ╳0x3fb ╳0x2ee0 ╳0x2ee1 ╳0x2ee2 ╳0x2ee3 ╳0x2ee4 ╳0x2ee5 ╳0x2ee6 ╳0x2ee7 ╳0x2ee8 ╳0x2ee9 ╳0x2eea ╳0x2eeb ╳0x2eec ╳0x2eed ╳0x2eee ╳0x2eef ╳0x2ef0 ╳0x2ef1 ╳0x2ef2 ╳
0x2ef3
data 0x3e8 ╳0x7d0 ╳0xbb8 ╳0xfa0 ╳0x1388 ╳0x1770 ╳0x1b58 ╳0x1f40 ╳0x8 ╳0x9 ╳0xa ╳0xb ╳0xc ╳0xd ╳0xe ╳0xf ╳0x10 ╳0x11 ╳0x12 ╳0x13 ╳0x3f2 ╳0x7e4 ╳0xbd6 ╳0xfc8 ╳0x13ba ╳0x17ac ╳0x1b9e ╳0x1f90 ╳0x3f0 ╳0x3f1 ╳0x3f2 ╳0x3f3 ╳0x3f4 ╳0x3f5 ╳0x3f6 ╳0x3f7 ╳0x3f8 ╳0x3f9 ╳0x3fa ╳0x3fb ╳0x2ee0 ╳0x2ee1 ╳0x2ee2 ╳0x2ee3 ╳0x2ee4 ╳0x2ee5 ╳0x2ee6 ╳0x2ee7 ╳0x2ee8 ╳0x2ee9 ╳0x2eea ╳0x2eeb ╳0x2eec ╳0x2eed ╳0x2eee ╳0x2eef ╳0x2ef0 ╳0x2ef1 ╳0x2ef2 ╳
0x2ef3
The ROM isn't working as I expect. The first data value comes out correctly, but then it's garbage until the data values that can be represented in less than 8 bits. The rom_data_func is printing the values I expect, but they don't propagate through to the output.