Hi guys
I've got a couple of projects which I've started up again, one for the 6502 and the other a 65816. This is the 6502 one (the 65816 comes next when this one is completed) and I thought I'd share the progress:
I/O:The PCB is relatively simple, with no real I/O on it, but instead relies on 3 PCI physical slots, each of which can be seen as 2 logical slots. There is a bank of 8 LEDs which are mapped into the I/O space and controlled by a physical latch. There's also a 4 switch DIP input, again, mapped into the I/O space.
Clocks:The clock (PHI2) has been tested up to 8MHz (cannot test faster as that's the fastest DIP SRAM that I presently have), and can be clock stretched for slower devices, whilst maintaining a global clock (this is thanks for BDD's clock stretching design).
Memory map & paging:(this is presently being modified as required, so isn't fixed as yet)
0000-0FFF : RAM, Zero page & stack + work area, always mapped in
1000-1FFF : RAM, always mapped in by default, can be marked as pagable using MR
2000-2FFF : RAM, always mapped in by default, can be marked as pagable using MR
3000-3FFF : RAM, always mapped in by default, can be marked as pagable using MR
4000-BFFF : RAM, pagable
C000-C0FF : I/O & register space, always mapped in
C00x : MR, register, read/writable
C01x : PDR, register, read-only
C02x : FWR, register, lower 4 bits, read-only
C03x : SR, register, write-only
C04x : INTSR, register, read-only
C0Fx : BR, register, bank (paging) register, lower 4 bits, read/writable
C100-CFFF : RAM, OS ROM working area, presently pagable
D000-FFFF : OS ROM, may be shadowed into bank 0 RAM using MR
Banks:0 - 7 : RAM
8 - 13 : PCI slots (6 logical slots)
14 - 15 : Optional OS ROM pages as the OS ROM will be (minimum) 256KB - possible rom paging register may be implemented to change which part of the OS ROM is mapped in by these slots, or bits 0 & 1 of MR may be utilised. This may not be done depending on the need for it.
Registers (presently mapped at C000 to C0F0):MR (Memory Register): Manage writing to underlying RAM beneath the ROM area, ROM full shadowing, paging control of 1000-3FFF areas. Read/wriable.
PDR (PCI Detection Register): Bits 0 to 5 reflect the detected PCI cards (one bit per logical 'slot', so 2 bits per physical slot). Read-only.
SR (Status Register): Mapped to the 8 LEDs on the PCB. Read-only.
INTSR (Interrupt Status Register): The IRQ and NMI signals from the physical PCI slots are mapped here. Read-only.
BR (Bank Register): Contains (and controls) the current (page) bank number. Read/writable.
IRQs & NMIs:Each physical PCI slot has one IRQ line and one NMI line.
The card will AND all of the IRQ signals for the ICs on it and feed the result down this line (same with NMIs). The 6502'S ISR is then expected to consult INTSR to see which type of interrupt (IRQ or NMI) and which slot generated it.The 6502's IRQB and NMIB lines will still be set/cleared as standard.
The PDR consists of:
Bits 0-2 are IRQs for PCI slots A,B,C. Bits 3-5 are NMIs for PCI slots A,B,C. A one in a given bit field indicates the source of an IRQ/NMI.
The ISR should check both the INTSR and PDR.
The INTSR always reflects the interrupt signals as they presently are, so clearing the source of an interrupt clears the appropriate bit in this register.
Buses:Address lines A0 to A19, with A16 to A19 seen as the 4 bit banking address.
The databus is, as ever, 8 bits, with an optional pull up or pull down bus resistor network on the PCB (not presently needed/fitted).
PCI slotsThe PCI slots have 50 signals, which cover the full (A0-19) address & (D0-7) data buses, the GCLK and PHI2 clocks, the RWB, RD and WD signals, IRQ and NMI signals, BE and RDY signals (capable of shutting down the 6502 in favour of an offbaord MPU), two 'logical' slot detection lines, WSE (wait state enable) line, Reset (RESB), 2x VCC and 4x GND power/ground connections.
Each logical card is expected to provide (at a minimum) ROM space for a descriptor table, address glue logic, control of WSE and detection signals.
Banks 8 to 13 (1 bank per logical slot) are allocated to the PCI slots.
Signal Breakout/Indicators:A0-15 - 20 pin IDC socket
A16-A19 - Discrete pins
D0-7 - 10 pin IDC socket
RESB, IRQB, NMIB, RWB, ROM, RAM - Discrete pins
Aux power out - 3 sets of VCC & GND connections.
JTAG for CPLD - 2x4 pin header
PHI2, GCLK, WSE - Discrete pins
2x 'scope grounds - Discrete pins
Jumpers:Isolation jumpers for GCLK and PHI2
WSE mode jumper to set +1 or +2 extra cycles when WSE asserted
A17 and A18 isolation jumpers for the OS ROM so a 1,2 or 4 Mbit ROM may be fitted (all must be 32 pin DIPs though).
Jumper pad for the optional data bus termination bus resistor to set it to pull up or pull down as needed.
Testing:LEDs: Can be written to at 8MHz
ROM shadowing: CPLD logic present, but untested
IRQS/NMIs: CPLD logic present, but untested
Banking: RAM banks 0 to 7 tested ok at 8MHz for 4000-BFFF
PCI slots: Untested as yet. I have had a PCI card with serial and VIA on it to test it with, but the card isn't populated as yet.
Power usage is at just over half a watt (116mA @ 5V = 580mW)
Wait stating: CPLD logic present, but untested until I have RAM which is faster than the OS ROM.
Additional possibilities:I would like to implement a system 16 or 32 bit register attached to a (non-ripple) counter, which sets off an IRQ when it reaches zero. I'm not sure if the CPLD has enough terms left for this as I didn't think of it until after the PCB was manufactured. We'll see. The good news is that the GCLK and PHI2 clocks are linked to two of the three CPLD's clock pins, thus saving terms.
Some pictures:
Attachment:
1 (Custom).jpg [ 719.02 KiB | Viewed 2255 times ]
Attachment:
2 (Custom).jpg [ 594.65 KiB | Viewed 2255 times ]
Attachment:
3 (Custom).jpg [ 753.83 KiB | Viewed 2255 times ]
Attachment:
4 (Custom).jpg [ 605.85 KiB | Viewed 2255 times ]