Sorry, another long post, but you ask several interesting questions...
Jmstein7 wrote:
Jen? Which core is that?
It's called 65c02_tc:
viewtopic.php?f=10&t=2609(tc = true cycle)
Jmstein7 wrote:
By bus cycle accurate, is that literally what it sounds like, as in you could just drop it into a system that uses a physical 65c02 (as a replacement)?
Bus-cycle-accurate means that each bus cycle has the same function as a real 6502.
For example, the consider the following JSR instruction:
Code:
2000 : 20 34 12 : JSR $1234
And assume SP=01FF.
If you looked at the 6502 bus, you would see 6 cycles used as follows:
Code:
Address Data R/W Purpose
2000 20 R Opcode
2001 34 R Opeand 1
01FF xx R Dummy
01FF 20 W Stack Write (high)
01FE 01 W Stack write (low)
2002 12 R Operand 2
1234 ....
Specifically, the 3 bytes of the instruction appear on the data bus in cycles 1, 2 and 6. Most FPGA cores re-order the cycles, so the instruction appears in cycles 1, 2 and 3. This plays havoc with my 6502Decoder, which functions by looking just at the data bus.
Generally a core doesn't have to be cycle accurate to be compatible with original hardware. But it does have to emulate the bus timings.
In terms of replacing a real processor in original hardware, I have a couple of projects that do this.
- The most mature is called
]AtomBusMon (for historic reasons). This replaces a 6502, 65C02, Z80 or 6809 with an FPGA module and gives you a full in-circuit emulator. This runs at the original clock speed.
- A more recent one is called
BeebAccelerator. It's basically a CPU accellerator. It will run at (upto) 80MHz, unless the external hardware (IO or frame buffer) is accessed. It's currently specific to the Acorn BBC Model B/Master/Electron.
Both of these needed careful attention to the timing (i.e. how soon after the falling edge of Phi0 do the outputs change). Being bus-cycle-accurate matters less, unless you are running demo software that cares about this.
Jmstein7 wrote:
And, back to our little project here, is it possible that there is something that vivado is doing that is causing it not to work for me on a spartan-7? Or, maybe is there some constraint or other I need to add? I'm at a total loss.
Sorry if I'm repeating myself, but please be a bit more specific about "not work". Are you still at this stage:
Jmstein7 wrote:
Hmmm. The system runs, but I haven't gotten the VIA to work (yet). I'm going to try the latest one, now. However, about the clock... I have 12mhz on the board and I have a 4mhz oscillator off-board. Which should I use? Of course, the acia is still connected to the 1.8432mhz.
So the issue is the VIA?
Can we narrow this down about...
1. I assume you are using the latest code (after the merge last night)?
2. In WozMon, what do you see if you do 8800.88FF:
3. In WozMon, what hook an LED (or multiple LEDs up to port B) and try the following:
8802:FF
8800:00
8800:55
8800:AA
8800:FF
Record the terminal session and paste the whole thing into this thread.
I'm trying to figure out whether it's VIA writes, VIA reads or both that are broken.
Dave