Reply 20 of 35, by mkarcher
Anonymous Coward wrote on 2019-08-18, 12:52:Personally, I think a busmastering SCSI card over 12MHz is not a good idea. I don't run mine faster than 10MHz. If you're going to do it, at least use a 1542CF or CP. The 1542B is pretty ancient.
ISA is a strange thing. Most cycles on the ISA bus are not synchronous to the bus clock. For example, if you want to write an 8-bit value to an I/O port, you place the data value and the port address (A0..A15) onto the bus, and some time later (after the "setup time"), you enable /IOW for some minimum amount on time. If the device isn't able to take the value within the default minimum time, it can request extra time by lowering IOCHRDY to request the address, data and /IOW signal to keep active while IOCHRDY is low. As soon as IOCHRDY is no longer low and the minimum /IOW time has expired, the bus owner may release /IOW and the address and data lines. While this explanation is slightly simplified (e.g. not talking about AEN), it captures the philosophy of operation on the ISA bus. Note I did not ever write "clock" in the description of an ISA cycle, and that's not because I purposefully left it out, but because the standard ISA cycles are defined without referring to the CLK signal!
If an Adaptec 1542 card is busmastering, it uses its own time source to drive the bus, and doesn't respect the ISA clock at all. For the 1542CF, which can go up to 10MB/s, the time /MEMW or /MEMR is active is quantized on a 50ns grid, i.e. derived from a 20MHz (or 10MHz using both edges) clock. The bus mastering aspect on the 1542 is not at all dependent on the bus clock. On the other hand, you are perfectly correct that the 1542 is a quite old card, and might not be able to cope with ISA cycles that are "too fast", but this does not relate to the bus master cycles, but to the BIOS memory reads and the I/O access to the ports 330-333. I don't know whether the Adaptec 1542 uses IOCHRDY to slow down the cycles if the board is "too fast", or just relies on a minimum time (which is specified in the ISA specification).
Actually, there are 3 ways of timing an ISA cycle: The default one is to not drive IOCHRDY, and rely on the default cycle time. Faster bus clocks can be compensated by adding extra wait states, so the cycle time stays the same. That's why many 386/486 boards add more wait states to 8-bit cycles (might target cards designed for 4.77MHz) than to 16-bit cycles (those cards should be designed for 6MHz at least, as this was the first AT clock frequency). I already explained the second way, which is slowing down a cycle using IOCHRDY. The third way is speeding up a cycle (AT only) by asserting /0WS (aka /NOWS), which instructs the mainboard to ignore the minimum cycle time and perform the bus cycle as fast as possible. Actually, zero-wait-state cycles are the only kind of cycles that do have a reference to the bus clock signal in the ISA specification. For the AHA1542, I don't expect it to use 0WS cycles at all, as the BIOS chip is "slow" anyway, and I/O access to the card is rare. So it should work perfectly at any ISA clock frequency, as long as the mainboard adds a sufficient amount of wait states to "default" cycles that the cycle time stays within spec.
On the other hand, all "fast" graphics cards, like the CL-GD542x, the ET4000 or the TVGA8900D do use the /0WS signal and suppress the default wait states. Running an ISA system at 16MHz thus just requires to have enough default wait states that "slow cards" still work and only the "fast cards" that use 0WS need to be 16MHz-capable. It depends on the chipset (if there is a chipset at all) how to configure the default wait state. Some 286 chipsets have the default wait-state count as hardware strap options, which are fixed on the board.