[J-core] What is the correct way to reset the CPU?

Robert Ou rqou at robertou.com
Mon Jul 18 05:43:24 EDT 2016


What is the correct way to reset the CPU? In my simulation, if I
assert the rst pin, the CPU then proceeds to fetch instructions
starting from address 0. However, the boot.elf bootrom compiled for
the Mimas definitely starts with the address of the start function at
0x0 followed by the initial stack at 0x4. I don't understand how the
CPU can get in a state such that it can correctly run this. Could
someone clarify? Do I need to externally feed in a RESET_CPU event?
Also, if I look at the microcode spreadsheet, it seems to be saying
that reset should involve loading *(0x0) to R15?! and *(0x4) to PC.
This seems backwards unless I am reading the spreadsheet wrong
(likely). Could someone explain why the spreadsheet has a store to R15
before the store to PC (row 251 vs row 252 in the 20160418 code dump)?


More information about the J-core mailing list