[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ROM 01 vs ROM 3
> |Programs in ROM can run at the full speed of the processor
> |(normally 2.8 Mhz). Programs in RAM lose some cpu cycles due
> |to the memory refresh required and therefore run slower
> |(about 2.5 Mhz).
>
> While I admit to NOT BEING a gurue, I believe you are wrong. The
> CPU is connected to the bus; the CPU defines the address on one
> half of a cycle and read/writes on the other half of the cycle.
> Ram is refreshed every other cycle and has nothing to do with
> CPU speed other than being connected to the same bus (cycle).
No, he is quite correct (or at least close, approx 2.6 MHz while running from
RAM space). You have to remember that the 2.6 figure is an equivalent average
processor speed, not the actual phase 2 processor clock speed. Here's an
explanation of what goes on in a cycle with the DRAMS (at 2.8 MHz):
When the address lines become valid off of the processor (max about 100ns after
phase 2 goes low), these are broken down into a CAS address and a RAS address.
The RAS adddress is then fed to the DRAMS, and the RAS line on the chips is
enabled. Then, the CAS address is fed, and the CAS line is enabled (RAS is
still enabled). This is where the necessity for RAS before CAS becomes
important. At this point, the DRAMS come up with the data at that address,
and the data lines of the DRAM leave the third state (floating), and become
valid with data.
Now then... If CAS is left enabled and RAS is toggled, there is an internal
counter in the DRAM that will advance when RAS is toggled, and thus refresh
rows of memory in the DRAM without having to manually set the row address from
outside the chip. Neat, huh? The data will stay on the data lines during
this, and this is important, because it allows us to refresh while a memory
operation is completing. It is also possible to refresh while the output is
in the floating stage by enabling CAS while RAS is disabled instead of enabled.
Ok, still with me? The reason that all of this reduces the average speed of
the processor to 2.6 MHz is that the chips have to be refresed so much every so
often, and with all that is going on with the processor, there is not enough
time to do it only while the memory operations are completing. Therefore,
every so often, the processor is suspended, and the DRAMS do nothing more than
refresh.
Any questions? I'd be glad to talk about it... Oh, and somebody tell me if I
got CAS and RAS reversed, please.
Derek