Dr Jefyll wrote:
Every cycle (clock cycle, I mean, not instruction cycle) has work to do -- stuff that needs to happen, both internally and of course externally for the memory access that takes place on the buses. Toward the end of every cycle (ie: tPCS before the fall of PHI2 ) external circuitry on the mobo is required to put RDY high if all's on schedule, or pull RDY low
if dinner's still in the oven and further baking is required. If all the ducks are in a row we will move on, and after the fall of PHI2 -- ie, during the following cycle -- we will have new work to do, usually involving a new address on the bus. But if RDY got pulled low then things will
not move forward.
Just what was it you had for dinner?
Quote:
Instead the following cycle is simply a continuation of the work we already started (and of course the address will NOT change). The continuation can happen once or any number of times consecutively. After the appropriate number of "not-done-yet" cycles the mobo will decide the ROM or whatever has had enough time, and RDY is put high again (meeting the usual deadline of tPCS before the fall of PHI2). Then after the fall of PHI2 -- ie, during the following cycle -- we move on just as if no pause had ever occurred, with new work to do and (usually) a new address. Hope that helps, but if the extra verbiage has only further muddied the waters then I apologize!
So if I'm correctly following you, your interpretation is the MPU will have completed the current task at the point where RDY is returned high (assuming proper timing) and the fall of Ø2 following the release of
RDY will be the start of a new instruction or the start of the next step in the current instruction.
Quote:
One important point. To guarantee an extra cycle will be inserted it's necessary, as noted, to bring RDY low tPCS before the fall of PHI2.
Yep!
The logic I am using in POC V2's CPLD pulls
RDY low as soon as the CPLD recognizes that the '816 is emitting a valid address (
VDA || VPA is true) and the address corresponds to ROM or the I/O block. The actual high-to-low transition of
RDY occurs on the rise of Ø2. At the expiration of the wait-state period the low-to-high transition of
RDY also occurs on the rise of Ø2. Hence timing requirements should be easily met.
Here is the wait-state simulation for POC V2.0's CPLD:
Attachment:
File comment: POC V2.0 Logic Simulation: Wait-State Test
pocV2.0_logic_wait_state01.gif [ 107.83 KiB | Viewed 1498 times ]
The wait-state starts at vector 12 when the address $00E000 is put on the bus, that address corresponding to high ROM. Recall that the '816 generates a valid address about midway through Ø2 low. So the CPLD "knows" about the address while Ø2 is still low and thus "knows" that a wait-state is going to be needed. Hence at vector 12 the CPLD pin
STP, which drives
RDY (see bottom trace in the graph), is switched from high-Z to active, which means the CPLD is now driving
RDY high—RDY is also pulled up to Vcc through a 3.3K resistor.
At vector 13, the CPLD drives
STP low, pulling
RDY low and starting the wait-state. Vector 13 is at the rise of Ø2, so the logic easily meets the
tPCS setup deadline mentioned by Jeff, as well as the
tPCH hold time. The MPU is halted and if one can believe the data sheet, the address bus,
VDA,
VPA and
RWB will remain unchanged. Furthermore, the data sheet indicates the MPU will internally freeze in the Ø2 high state (which infers a wait-state could also be produced by simply halting Ø2 during the high phase—not something I've ever tried, but technically feasible with the POC design).
At vector 21, the wait state expires and the CPLD drives its
STP high, a procedure that assures
RDY will rapidly return to the high state, regardless of the effects of parasitic capacitance. The data sheet says that with
RDY returned high the MPU will resume execution on the next fall of Ø2, which would occur at vector 23. Again the
tPCS and
tPCH setup and hold times, respectively, would apply. Also at vector 23, the CPLD is done with the wait-state and returns the
STP output to high-Z, leaving the pullup resistor in charge of keeping
RDY high.
According to Jeff's description, at vector 24 the MPU would either start the next step in the current instruction or enter the opcode fetch phase of the next instruction.
During the wait-state, it is necessary to keep both the ROM's
/CS (chip select) and
/OE (output enable) control inputs stable. You can see that
ROMSEL (ROM select), which is connected to
/CS, is asserted at vector 12 and
/RD (read data), which is connected to
/OE, is asserted at vector 13 (rise of Ø2). Both signals are kept in that state all the way through vector 22.
BillO wrote:
55ns is pretty fast. There are 45ns EPROMS that might help. I've only found 128MB versions, but honestly have not looked at anything bigger.
I'm using the 45nS jobs in my project and they are running happily at over 16mHz. Something begins to fail at 16.7mHz, and I'm fairly sure it's the EPROM. Anyway, if it helps they are ST MC271001-45XFI units.
I did a search for ST MC271001-45XFI and came up empty. What is your source for them?
I do have some Atmel 27C256 PROMs that are rated for 45ns. POC V1.1 will boot at 15 MHz with one of them, but the SCSI hardware can't keep up at that clock rate. So even if a faster ROM would help I still have to accommodate slow I.O hardware.
Quote:
Without analyzing, or some knowledge of the current instruction, can your circuitry handle consecutive wait states in the same instruction cycle?
It should be able to do so.