Re: Extended expansion connector...
Posted: Tue Jan 14, 2014 4:30 pm
Ok, this is one of those 'been there, done that' topics. Getting more out of the 64-pin J1 has been a MAJOR part of the GF design. OK, I know nothing ever came of it but I put in a whole lot of research and thought into that so let me share my findings:
Signals that were never used:
DBGL - it only has a pullup on the motherboard, it was intended as a control pin for the data bus buffer on a buffered motherboard, without any clear definition of why it would do what it was intended for. To my knowledge, apart from homebrew projects, PCML was the the only one to produce a 4-position buffered backplane box but I suppose that's one of those unseen rarities so there is really no point in supporting this signal on the off chance this backplane used it.
* SAFE
R, G, B - Important note: HSYNCHL and VSYNCH _ARE_ used, notably by GC and SGC to trigger RAM refresh periodically. The initial prototypes of Qubide did not have these passed to the through connector and failed with GC/SGC. For the same reason shorting either of the sync signals on the video output connector will result in the GC/SGC not wroking. VSYNCH is also used as the source of the frame interrupt (20ms), and timing for the PAUSE command. Aurora uses different timings for video yet in order to be compatible must generate 20ms pulses on VSYNCH and 16384Hz pulses on HSYNCHL. In other words, these signals must remain (even HSYNCHL but I'll get to that later).
RGB lines are indeed candidates for output lines. Using them for video conversion is certainly possible though care must be taken because they are very nosiy - they are passed in parallel to the outputs on the video connector so there is a long and convoluted PCB line with no signal integrity measures taken, running the length of the QL motherboard with one end on the J1 connector. A piggyback board for the 8301 or indeed a replacement would be a far better idea, also using them as RGB lines is controversial in a system which is in all likelyhood not going to offer compatible RGB signals on them anyway, since we are designing a new computer.
* MAYBE CONTROVERSIAL
FC0, 1, 2 - As far as i know these are only used internally to the QL to provide the VPAL input that causes the CPU to use autovectoring. Although interrupt acknowledge happens when FC0..2 are all high, the QL only tests for FC0 and 1 being high, which means that FC2 is completely unused. GC and SGC being the usual suspects when it comes to replacing the internal CPU with something else, may require FC0 and 1 and VPAL, but since we are designing a new CPU board, they are never going to be connected to it so these signals can be re-used for something more creative.
* SAFE
VPAL, E - 6800 family interface signals. VPAL is pulled low by logic on the QL motherboard, E is CLKCPU/10, and runs constantly. To my knowledge only the QEP programmer used E and VPAL and I am not even certain of that, IIRC some version suse 6800 PIA chips for IO. E might be used on some RAM expansions to derive a refresh clock. Again, it is profoundly unlikely such a RAM expansion is going to be connected.
EDIT: any 68k CPU above 68010 does not implement 6800 peripheral compatibility, and even if it did it did and ran above 10MHz it would likely not work, so anything 6800 based cannot be supported anyway, hence these can be re-used. On the GF in particular VPAL was left open because it could run with a QL motherboard, so QL motherboard logic would pull down VPAL whenever a high level would appear on pins originally used by FC0 and FC1.
* SAFE
ROMOE - this has to my knowledge only been used on the MPLANE so that a ROM slot can be put on it. Not sure MPLANE actually passes all signals from the discussed set so it's usefulness is questionable here.
* POSSIBLE
EDIT:
IPL02L and IPL1L - to my knowledge only the QL motherboard generates them. However, I would rather not redefine these as IPL0L, IPL1L and add IPL2L, since using the pins directly is not practical. They were actually intended to be used through an interrupt priority encoder and it's actually more practical to redefine them as discrete level interrupts. Also, the QL internally uses only one interrupt level (EXTINTL is routed through the 8302 ULA and geenrates the same level), IIRC level 2?
More on interrupts later.
* POSSIBLE
EDIT:
BERRL - forhot about that one. As far as i could find out this was never used. It is normally used to indicate that a bus device is not responding (not generating DTACKL) and when pulled low will terminate the bus cycle and generate an exception - normally this would result in some sort of error handling code being called. However, none of the OS versions provide for this so depending on OS pulling it low will either crash the QL or do nothing. This signal is pulled high on-board and it permanently remains high. It's most suitable for redefining as a 5V power supply pin.
* POSSIBLE
Signals that are used but should not be:
ASL - It is actually explicitly mentioned in the hardware literature not to use this pin and use DSL instead for everything. However, there are boards that use it to gate data bus buffers, latest I have looked at is the Sandy superQboard. The big question is, does plugging one into a 3-row connector make sense? For the GF I re-used this signal as a 32-bit cycle, since it makes little sense to connect practically all old-style peripherals to the J1 connector, in any case anything made before Qubide and thereabouts.
* POSSIBLE
Signals that have fixed connections:
SP0, 1, 2, 3 - these are all connected to ground on the motherboard. And should probably stay that way.
This gives us 11 possible signals on the standard J1 which could be used differently.
Now, that being said, let's consider what would need a wider and faster expansion bus?
There are really only two possibilities:
1) Enhanced video
2) Fast IO (such as fast IDE)
Adding RAM on J1 makes little sense as it's impossible to make it run really fast like in the case of closely coupling it to the CPU - because trying to get fast signals on J1 is asking for trouble. To an extent doing the same for a graphics card is prone to the same restriction - it will be faster than 8-bit access by a factor of 10 but with added logic and still about half the speed it could be with the same hardware if connected to the local CPU bus. However, with some clever shadowing that can be overcome.
Fast IO on the other hand may not require full 32-bit access, and definitely not a lot of address lines.
ANd what would require more address lines but not necessarily speed or a wide bus? The only thing would be something like a large flash memory. Problem being, it's likely going to be 3.3V so again probably not feasible. Also, whatever is in it will benefit from being copied into RAM, and this immediately points to rather storing the contents on a mass storage device.
Also - a 32-bit bus MUST use either byte select lines or separate byte write lines, this in itself takes up 4 signals on the bus.
Finally there is the issue of signal integrity. This is not obvious and has less to do with signal termination and even ground planes, and everything to do with signal return paths.
Most people are not aware that ground planes are NOT used for shielding or power supply primairly, but to offer an automatically optimized return path for each signal running over or under the ground plane. If a power plane is included, it actually also acts as a ground plane, but for the intents of this text, assume there is only one ground plane. When current passes through a PCB line, it obviously has to return to the source in order to complete the circuit. In digital systems, current mostly flows during a change in the signal state either 0 to 1 or 1 to 0. This means it flows in short and very fast peaks. But because a line and it's return path form a loop (and this means inductance) and the procimity of the line to everything else including the ground plane forms a capacitor, you get in the forst approximation a resonant circuit. Actually it's more complex and something called a 'transmission line' is formed. However, the dominant character is inductive, and inductance is actually a property of a circuit to opose the change of current. In other words, it will opose the propagation of the signal in the first place, and the resonant characteristic of the line as such will also provide for ample ringing at the beginning and end of the signal changing state - in other sords, the signal will be corrupt and may indeed corrupt other signals through various coupling phenomena.
The primary mission of a ground plane is to reduce the area the current loop circumscribes. It does this because current always tries to find the path of least resistance, or to be more precise impedance - simplified, impedance is a sort of equivalent resistance of an inductor. Because the inductance of the loop is proportional to the area enclosed by the loop. the smaller this are, the less inductance. In wires, this is done by twisting signal and return wires together or maing coaxial cables, which insures that the signal and return parths are along the same path as much as possible, making the area of the loop virtually zero. A ground plane on the other hand does this by providing an unbroken plane for the return current to find a path on, and it will automatically find one immediately under the related signal trace simply because the resulting loop will be the smallest and the current will flow most easily along that path. In other words, if an unbroken ground plane is provided for the signals on the PCB to find return paths with minimum loop area, they will do so automatically.
Now, I know this is an awfully long text but here is how it is relevant:
Because ground pins on J1 are situated at oposite ends separated by many centimeters of signal pins, even if two boards with perfect ground planes are connected through a mail and female part of J1, they cannot form a uniform ground plane between them. This is because the ground plane has a big hole around all the signal pins. Wen current goes from one board to the other, the signal will pass through the actual pin but the return must go all the way to the closest edge where it will find a ground connection and then back all the way to get under the signal trace. This part forms a large loop, and what is worse, the loops of every signal must pass through the same space so you get coincident loops - which is also known as a transformer. So all signals couple to all other signals electromagnetically around J1 and I think it is obvious that can't be good. It's even much worse if anything magnetic is placed anywhere close to the middle of J1, or the whole lot is in a magnetic material enclosure such as steel.
If there were ground pins dispersed along the length of J1, there would always be one 2-3 pins aeay form any signal in question, reducing the break in the ground plane from one board to the other, and quite drastically reducing loop area, as well as separating loops for signals to the left and right of it. A single ground pin in the middle would already separate thing into two groups of signals and reduce coupling 4-fold, as well as reduce loop area by half (in real world terms this means at least 2x reduction in ringing, or the ability to pass at least 2x faster signals with the same integrity.
GF was designed to have a 3-row connector that actually had practically all of the 3rd row pins connected to ground, which means that there is a ground pin close to every 2 signal lines, providing near perfect ground plane connection - certainly as good as can be done with that connector type.
This sort of thing may well be mandatory to get sufficient signal integrity even for a fast 8-bit bus, never mind a 32-bit bus. Because I wanted to implement a good quality bus in order to run it fairly fast, I actually rather used the entire third row (except for some detect pins) as ground, and thought up a multiplexed 32-bit bus that can run over the regular J1 connector, even though that requires more logic to interface a CPU to the bus. In the case of GF, the 68060 had to have 3.3V to 5V translation done anyway along with dynamic bus sizing (the 68020 has this built in), so all signals had to pass through a PLD - adding the multiplexed option was just a combination of bypass paths around the bus sizing logic so it was very easy to add. Although it's not capable of extreme speeds, it would easily be an order of magnitude or more faster than the original bus, but not trivial to implement on a 68020.
Signals that were never used:
DBGL - it only has a pullup on the motherboard, it was intended as a control pin for the data bus buffer on a buffered motherboard, without any clear definition of why it would do what it was intended for. To my knowledge, apart from homebrew projects, PCML was the the only one to produce a 4-position buffered backplane box but I suppose that's one of those unseen rarities so there is really no point in supporting this signal on the off chance this backplane used it.
* SAFE
R, G, B - Important note: HSYNCHL and VSYNCH _ARE_ used, notably by GC and SGC to trigger RAM refresh periodically. The initial prototypes of Qubide did not have these passed to the through connector and failed with GC/SGC. For the same reason shorting either of the sync signals on the video output connector will result in the GC/SGC not wroking. VSYNCH is also used as the source of the frame interrupt (20ms), and timing for the PAUSE command. Aurora uses different timings for video yet in order to be compatible must generate 20ms pulses on VSYNCH and 16384Hz pulses on HSYNCHL. In other words, these signals must remain (even HSYNCHL but I'll get to that later).
RGB lines are indeed candidates for output lines. Using them for video conversion is certainly possible though care must be taken because they are very nosiy - they are passed in parallel to the outputs on the video connector so there is a long and convoluted PCB line with no signal integrity measures taken, running the length of the QL motherboard with one end on the J1 connector. A piggyback board for the 8301 or indeed a replacement would be a far better idea, also using them as RGB lines is controversial in a system which is in all likelyhood not going to offer compatible RGB signals on them anyway, since we are designing a new computer.
* MAYBE CONTROVERSIAL
FC0, 1, 2 - As far as i know these are only used internally to the QL to provide the VPAL input that causes the CPU to use autovectoring. Although interrupt acknowledge happens when FC0..2 are all high, the QL only tests for FC0 and 1 being high, which means that FC2 is completely unused. GC and SGC being the usual suspects when it comes to replacing the internal CPU with something else, may require FC0 and 1 and VPAL, but since we are designing a new CPU board, they are never going to be connected to it so these signals can be re-used for something more creative.
* SAFE
VPAL, E - 6800 family interface signals. VPAL is pulled low by logic on the QL motherboard, E is CLKCPU/10, and runs constantly. To my knowledge only the QEP programmer used E and VPAL and I am not even certain of that, IIRC some version suse 6800 PIA chips for IO. E might be used on some RAM expansions to derive a refresh clock. Again, it is profoundly unlikely such a RAM expansion is going to be connected.
EDIT: any 68k CPU above 68010 does not implement 6800 peripheral compatibility, and even if it did it did and ran above 10MHz it would likely not work, so anything 6800 based cannot be supported anyway, hence these can be re-used. On the GF in particular VPAL was left open because it could run with a QL motherboard, so QL motherboard logic would pull down VPAL whenever a high level would appear on pins originally used by FC0 and FC1.
* SAFE
ROMOE - this has to my knowledge only been used on the MPLANE so that a ROM slot can be put on it. Not sure MPLANE actually passes all signals from the discussed set so it's usefulness is questionable here.
* POSSIBLE
EDIT:
IPL02L and IPL1L - to my knowledge only the QL motherboard generates them. However, I would rather not redefine these as IPL0L, IPL1L and add IPL2L, since using the pins directly is not practical. They were actually intended to be used through an interrupt priority encoder and it's actually more practical to redefine them as discrete level interrupts. Also, the QL internally uses only one interrupt level (EXTINTL is routed through the 8302 ULA and geenrates the same level), IIRC level 2?
More on interrupts later.
* POSSIBLE
EDIT:
BERRL - forhot about that one. As far as i could find out this was never used. It is normally used to indicate that a bus device is not responding (not generating DTACKL) and when pulled low will terminate the bus cycle and generate an exception - normally this would result in some sort of error handling code being called. However, none of the OS versions provide for this so depending on OS pulling it low will either crash the QL or do nothing. This signal is pulled high on-board and it permanently remains high. It's most suitable for redefining as a 5V power supply pin.
* POSSIBLE
Signals that are used but should not be:
ASL - It is actually explicitly mentioned in the hardware literature not to use this pin and use DSL instead for everything. However, there are boards that use it to gate data bus buffers, latest I have looked at is the Sandy superQboard. The big question is, does plugging one into a 3-row connector make sense? For the GF I re-used this signal as a 32-bit cycle, since it makes little sense to connect practically all old-style peripherals to the J1 connector, in any case anything made before Qubide and thereabouts.
* POSSIBLE
Signals that have fixed connections:
SP0, 1, 2, 3 - these are all connected to ground on the motherboard. And should probably stay that way.
This gives us 11 possible signals on the standard J1 which could be used differently.
Now, that being said, let's consider what would need a wider and faster expansion bus?
There are really only two possibilities:
1) Enhanced video
2) Fast IO (such as fast IDE)
Adding RAM on J1 makes little sense as it's impossible to make it run really fast like in the case of closely coupling it to the CPU - because trying to get fast signals on J1 is asking for trouble. To an extent doing the same for a graphics card is prone to the same restriction - it will be faster than 8-bit access by a factor of 10 but with added logic and still about half the speed it could be with the same hardware if connected to the local CPU bus. However, with some clever shadowing that can be overcome.
Fast IO on the other hand may not require full 32-bit access, and definitely not a lot of address lines.
ANd what would require more address lines but not necessarily speed or a wide bus? The only thing would be something like a large flash memory. Problem being, it's likely going to be 3.3V so again probably not feasible. Also, whatever is in it will benefit from being copied into RAM, and this immediately points to rather storing the contents on a mass storage device.
Also - a 32-bit bus MUST use either byte select lines or separate byte write lines, this in itself takes up 4 signals on the bus.
Finally there is the issue of signal integrity. This is not obvious and has less to do with signal termination and even ground planes, and everything to do with signal return paths.
Most people are not aware that ground planes are NOT used for shielding or power supply primairly, but to offer an automatically optimized return path for each signal running over or under the ground plane. If a power plane is included, it actually also acts as a ground plane, but for the intents of this text, assume there is only one ground plane. When current passes through a PCB line, it obviously has to return to the source in order to complete the circuit. In digital systems, current mostly flows during a change in the signal state either 0 to 1 or 1 to 0. This means it flows in short and very fast peaks. But because a line and it's return path form a loop (and this means inductance) and the procimity of the line to everything else including the ground plane forms a capacitor, you get in the forst approximation a resonant circuit. Actually it's more complex and something called a 'transmission line' is formed. However, the dominant character is inductive, and inductance is actually a property of a circuit to opose the change of current. In other words, it will opose the propagation of the signal in the first place, and the resonant characteristic of the line as such will also provide for ample ringing at the beginning and end of the signal changing state - in other sords, the signal will be corrupt and may indeed corrupt other signals through various coupling phenomena.
The primary mission of a ground plane is to reduce the area the current loop circumscribes. It does this because current always tries to find the path of least resistance, or to be more precise impedance - simplified, impedance is a sort of equivalent resistance of an inductor. Because the inductance of the loop is proportional to the area enclosed by the loop. the smaller this are, the less inductance. In wires, this is done by twisting signal and return wires together or maing coaxial cables, which insures that the signal and return parths are along the same path as much as possible, making the area of the loop virtually zero. A ground plane on the other hand does this by providing an unbroken plane for the return current to find a path on, and it will automatically find one immediately under the related signal trace simply because the resulting loop will be the smallest and the current will flow most easily along that path. In other words, if an unbroken ground plane is provided for the signals on the PCB to find return paths with minimum loop area, they will do so automatically.
Now, I know this is an awfully long text but here is how it is relevant:
Because ground pins on J1 are situated at oposite ends separated by many centimeters of signal pins, even if two boards with perfect ground planes are connected through a mail and female part of J1, they cannot form a uniform ground plane between them. This is because the ground plane has a big hole around all the signal pins. Wen current goes from one board to the other, the signal will pass through the actual pin but the return must go all the way to the closest edge where it will find a ground connection and then back all the way to get under the signal trace. This part forms a large loop, and what is worse, the loops of every signal must pass through the same space so you get coincident loops - which is also known as a transformer. So all signals couple to all other signals electromagnetically around J1 and I think it is obvious that can't be good. It's even much worse if anything magnetic is placed anywhere close to the middle of J1, or the whole lot is in a magnetic material enclosure such as steel.
If there were ground pins dispersed along the length of J1, there would always be one 2-3 pins aeay form any signal in question, reducing the break in the ground plane from one board to the other, and quite drastically reducing loop area, as well as separating loops for signals to the left and right of it. A single ground pin in the middle would already separate thing into two groups of signals and reduce coupling 4-fold, as well as reduce loop area by half (in real world terms this means at least 2x reduction in ringing, or the ability to pass at least 2x faster signals with the same integrity.
GF was designed to have a 3-row connector that actually had practically all of the 3rd row pins connected to ground, which means that there is a ground pin close to every 2 signal lines, providing near perfect ground plane connection - certainly as good as can be done with that connector type.
This sort of thing may well be mandatory to get sufficient signal integrity even for a fast 8-bit bus, never mind a 32-bit bus. Because I wanted to implement a good quality bus in order to run it fairly fast, I actually rather used the entire third row (except for some detect pins) as ground, and thought up a multiplexed 32-bit bus that can run over the regular J1 connector, even though that requires more logic to interface a CPU to the bus. In the case of GF, the 68060 had to have 3.3V to 5V translation done anyway along with dynamic bus sizing (the 68020 has this built in), so all signals had to pass through a PLD - adding the multiplexed option was just a combination of bypass paths around the bus sizing logic so it was very easy to add. Although it's not capable of extreme speeds, it would easily be an order of magnitude or more faster than the original bus, but not trivial to implement on a 68020.