[J-core] qemu updates / roadmap
Geoff Salmon
gsalmon at se-instruments.com
Sun May 15 00:02:52 EDT 2016
On 16-05-14 10:50 PM, D. Jeff Dionne wrote:
> On May 15, 2016, at 9:10, Christopher Friedt <chrisfriedt at gmail.com> wrote:
>>
>> I actually had to disable CONFIG_CPU_TESTS because otherwise I was getting stuck in _fail.
>
> That is not necessarily ok to do. While there are a few instructions that will not be available unless you've coded support for them, tests for those (and maybe it's only CAS.L actually) should be #ifdef out and the rest shown to pass. The easiest way to do that is to bring the LED port out to a console print (in qemu) and see where it stops. The tests count in BCD, the top 4 bits are the instruction 'group' and the lower 4 the test number in the group. I would want to know at least which instruction is failing, (other than CAS.L).
The LED port Jeff mentioned is a write to address 0xABCD0000. A
successful run of the cpu VHDL simulator prints this
LED: Write 000000FF at 108000000 fs
LED: Write 00000011 at 180000000 fs
LED: Write 0000004F at 236000000 fs
LED: Write 00000012 at 3996000000 fs
LED: Write 00000021 at 8460000000 fs
LED: Write 00000022 at 11220000000 fs
LED: Write 00000031 at 16316000000 fs
LED: Write 00000032 at 18820000000 fs
LED: Write 00000033 at 20340000000 fs
LED: Write 00000041 at 28500000000 fs
LED: Write 00000042 at 30572000000 fs
LED: Write 00000043 at 32644000000 fs
LED: Write 00000044 at 34812000000 fs
LED: Write 00000045 at 36972000000 fs
LED: Write 00000046 at 39132000000 fs
LED: Write 00000047 at 48684000000 fs
LED: Write 00000051 at 50612000000 fs
LED: Write 00000061 at 58540000000 fs
LED: Write 00000062 at 66700000000 fs
You should see the same values written in the same order running in qemu.
A coarse test you could try is temporarily commenting out the jumps to
these tests in entry.c:
" mov.l testmov_k, r0\n"
" jsr @r0\n"
" mov.l testshift_k, r0\n"
" jsr @r0\n"
I think these contain all the non-SH2 instructions. testmov_k contains
CAS.L and testshift_k contains SHAD and SHLD. If it can then execute the
tests without getting stuck in a fail loop, add those jumps back and try
removing the CAS.L parts of tests/testmov.s and the SHAD and SHLD parts
of tests/testshift.s.
With the above jumps removed, the cpu VHDL sim prints
LED: Write 000000FF at 108000000 fs
LED: Write 00000011 at 180000000 fs
LED: Write 0000004F at 236000000 fs
LED: Write 00000012 at 3996000000 fs
LED: Write 00000022 at 6764000000 fs
LED: Write 00000031 at 11860000000 fs
LED: Write 00000041 at 20028000000 fs
LED: Write 00000042 at 22100000000 fs
LED: Write 00000043 at 24172000000 fs
LED: Write 00000044 at 26340000000 fs
LED: Write 00000045 at 28500000000 fs
LED: Write 00000046 at 30660000000 fs
LED: Write 00000047 at 40212000000 fs
LED: Write 00000051 at 42140000000 fs
LED: Write 00000061 at 50068000000 fs
LED: Write 00000062 at 58228000000 fs
- Geoff
More information about the J-core
mailing list