PARTNO U304 ; NAME U304 ; DATE November 19, 1992 ; REV 2 ; DESIGNER Dave Haynie ; COMPANY Commodore ; ASSEMBLY A3090 ; LOCATION West Chester ; DEVICE g22v10 ; /************************************************************************/ /* */ /* A3090 SCSI Slave Interface */ /* */ /* This device provides the Zorro III slave interface to the */ /* NCR 53C710. */ /* */ /************************************************************************/ /* */ /* DEVICE DATA: */ /* */ /* Device: 22V10-10 */ /* Clock: CLK (25MHz) */ /* Unused: NONE */ /* */ /************************************************************************/ /* */ /* REVISION HISTORY: */ /* */ /* DBH Jul 8: Original version. */ /* DBH Oct 29: Changed SCSI start to consider data strobes, */ /* fixed SCSI chip select for setup time spec. */ /* DBH Nov 19: Modified for self-reference (SCSI chip wants */ /* to DMA to itsself). /* */ /************************************************************************/ /** INPUTS: **/ PIN 1 = !CLK ; /* 33MHz system clock. */ PIN 2 = !SCSI ; /* SCSI chip select. */ PIN 3 = READ ; /* The Zorro III read cycle. */ PIN 4 = !DS3 ; /* Zorro III data strobes. */ PIN 5 = !DS2 ; PIN 6 = !DS1 ; PIN 7 = !DS0 ; PIN 8 = DOE ; /* Zorro III data ouput enable. */ PIN 9 = !DTACK ; /* Zorro III Data transfer acknowledge. */ PIN 10 = !STERM ; /* SCSI bus termination cycle. */ PIN 11 = !MYBUS ; /* A3090 is bus master. */ PIN 13 = A2 ; /* Zorro III addresses. */ /** OUTPUTS: **/ PIN 14 = BA2 ; /* SCSI burst addresses. */ PIN 15 = BA3 ; PIN 16 = !SREG ; /* SCSI register select. */ PIN 17 = !DS ; /* SCSI data strobe. */ PIN 18 = !AS ; /* SCSI address strobe. */ PIN 20 = SIZ0 ; /* SCSI transfer size. */ PIN 21 = SIZ1 ; PIN 22 = A0 ; /* SCSI sizing addresses. */ PIN 23 = A1 ; /** USED INTERNALLY: **/ PIN 19 = !SSYNC ; /* SCSI access synchronizer. */ /** OUTPUT TERMS: **/ /* The SCSI access cycle begins as soon as we have a DOE and at least one data strobe. First thing to do is sync up to this. */ SSYNC.D = SCSI & DOE & !STERM & DS3 & !MYBUS # SCSI & DOE & !STERM & DS2 & !MYBUS # SCSI & DOE & !STERM & DS1 & !MYBUS # SCSI & DOE & !STERM & DS0 & !MYBUS; /* The address strobe goes out directly based on the SCSI sync. It's tri-stated when there's no SCSI access. */ AS.D = SSYNC & !STERM; AS.OE = SCSI & !MYBUS; AS.AR = !DOE; /* added to stop small as glitch after cycle */ /* The data strobe is based on whether its a read or write cycle. It's tri-stated when there's no SCSI access. */ DS.D = SSYNC & !STERM & READ # AS & !STERM & !READ; DS.OE = SCSI & !MYBUS; /* The SCSI chip select needs to be set up to the rising edge of the system clock. So it's gated out with AS and !CLK. During a DMA, the SCSI chip select is just passed through. */ SREG = AS & !MYBUS & !CLK # AS & !MYBUS & SREG # SCSI & MYBUS & !CLK; /* The "burst address" lines don't do any bursting during a slave access, they're just bridged over. */ BA3 = 'b'0; /* 3-state this for self-reference workaround */ BA3.OE = 'b'0; BA2 = A2; BA2.OE = SCSI & !MYBUS; /* Now we have the sizing calculations. The Zorro III data strobes are used to create 68030 style SIZ1, SIZ0, A1, and A0 lines. Valid slave mode transfer sizes are byte or longword only. The translation table used here is: Now byte word 3byte and lword decodes are supported DS3 DS2 DS1 DS0 SIZ1 SIZ0 A1 A0 * 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 0 * 0 0 1 1 0 1 0 0 0 1 0 1 * 0 1 0 1 * 0 1 1 0 * 0 1 1 1 1 0 0 0 0 1 0 0 * 1 0 0 1 * 1 0 1 0 * 1 0 1 1 * 1 1 0 0 * 1 1 0 1 * 1 1 1 0 1 1 1 1 0 0 0 0 * illegal/non-existant transfer For reads, we'll always generate a longword read. For writes, it's either byte or longword, trouble if the software does the wrong kind of write. */ SIZ1 = !DS3 & !DS2 & DS1 & DS0 # !DS3 & DS2 & DS1 & !DS0 # !DS3 & DS2 & DS1 & DS0 # DS3 & DS2 & !DS1 & !DS0 # DS3 & DS2 & DS1 & !DS0; SIZ1.OE = SCSI & DOE & !MYBUS; SIZ0 = !DS3 & !DS2 & !DS1 & DS0 # !DS3 & !DS2 & DS1 & !DS0 # !DS3 & DS2 & !DS1 & !DS0 # !DS3 & DS2 & DS1 & DS0 # DS3 & !DS2 & !DS1 & !DS0 # DS3 & DS2 & DS1 & !DS0; SIZ0.OE = SCSI & DOE & !MYBUS; A1 = !DS3 & !DS2 & !DS1 & DS0 # !DS3 & !DS2 & DS1 & !DS0 # !DS3 & !DS2 & DS1 & DS0; A1.OE = SCSI & DOE & !MYBUS; A0 = !DS3 & !DS2 & !DS1 & DS0 # !DS3 & DS2 & !DS1 & !DS0 # !DS3 & DS2 & DS1 & !DS0 # !DS3 & DS2 & DS1 & DS0; A0.OE = SCSI & DOE & !MYBUS;