POC VERSION TWO
Re: POC VERSION TWO
There are so called emulator adapters available (? at least I hope so). For example here or such a beast. On top of that you can connect a board containing your CPLD plus buffers. This looks ugly but should work. But it isn't cheap for sure. Perhaps designing a POC V2.2 with drivers will be cheaper.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: POC VERSION TWO
Dr Jefyll wrote:
As an afterthought: Does the CPLD drive the CPU clock input?
PHI1 is not used.
Quote:
Assuming the CPLD offers selectable slew rates per pin, and if you haven't already done so, maybe you should try selecting the "fast" setting...
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: POC VERSION TWO
GaBuZoMeu wrote:
Neither route gets me excited.
Quote:
Perhaps designing a POC V2.2 with drivers will be cheaper.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: POC VERSION TWO
BigDumbDinosaur wrote:
GaBuZoMeu wrote:
Perhaps designing a POC V2.2 with drivers will be cheaper.
- Removal of some functions from the CPLD. The CPLD in V2.2 will be limited to generating chip selects, which means only combinatorial logic will be used. This change should (in theory) remove any tricky timing issues that may have been lurking in V2.1's CPLD. Functions that were present in the V2.1's CPLD and have been removed are:
- Generation of qualified read and write signals. Discrete logic is used for this function, in the same circuit configuration I used in POC V1.1.
- Memory mapping. I have eliminated the "layered" memory map that makes it possible to replace ROM at $00E000-$00FFFF with RAM, as well as replace RAM at $00C000-$00CFFF with ROM. In V2.2., ROM will appear in both of these address ranges. RAM will appear at $000000-$00BFFF, $00D800-$00DFFF and $010000-$0FFFFF.
- A16-A19 address bit generation. This function is now handled by discrete logic, specifically a 74AC573 D-latch, connected up in a fashion similar to the circuit shown on page 48 of the 65C816's data sheet. As my clock generator circuit can produce an inverted Ø2, I don't need the inverter shown in WDC's circuit.
- Wait-state generation. As I know the ROM I've been using can easily work with a 12.5 MHz Ø2 clock, I decided to forego wait-stating and the timing issues that it can pose.
- Use of buffers/drivers on the outputs of the CPLD. The purpose of this change is to produce voltage level conversion, as the CPLD's output levels are really TTL, not CMOS. If you examine the schematic and PCB layout, you'll see a jumper block (JP1), which can be configured to connect control inputs on all devices driven by the CPLD directly to the CPLD or to the buffers/drivers. This will allow me to determine what effect, if any, the CPLD's output voltages has on the unit's ability to run in a stable fashion. There are a total of nine outputs on the CPLD, so I am using a 74ACT245 to handle eight of them, and one section of a 74ACT125 to drive the ninth circuit.
- Use of a bus transceiver on the data bus. Here again, I'm using a 74ACT245 as a level converter. The two SRAMs and the EPROM actually produce TTL voltage levels, not CMOS, which the 'ACT245 will convert to the CMOS levels expected by the 65C816 (if one can believe the WDC data sheet) during a read cycle. The control circuitry to the 'ACT245 is arranged so the data bus will be isolated from the '816 during Ø2 low, which is when the bank bits are present. This is a bit of a "belt and suspenders" move, since reads and writes are also qualified by Ø2. In theory, data bus contention during the "turn-around time" after the '816 ceases driving the bank bits onto the data bus shouldn't occur.
Here's the PCB layout:
The PCB's size top-to-bottom is the same as that of V2.0 and V2.1, but is 5/8" (15.88mm) larger side-to-side to accommodate the additional hardware. I also did some minor rearrangement in places to get a better layout, as well as to make room for an Aries 28-C182-10 "ejecta-DIP" socket (U12) for the ROM. This change was made to eliminate having to piggy-back a ZIF socket on the ROM socket for quick ROM changeouts.
Here's the source code for the CPLD logic:
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: POC VERSION TWO
Based on a (very) quick scan, I'd say those LED's need two current-limiting resistors, not one.
I have to say I'm not a fan of schematics which (like other pages of this one) are basically just nets lists.
I welcome the visual aid of actual lines drawn to indicate connections (or fundamental connections such as buses at least). They increase readability, almost as the comments in a source file do. (Am I the only one that feels this way?) Anyway, I'm glad you didn't draw the LED's as a net list. Maybe I'll look at the other pages some other time.
Good luck with the new project, BTW!
-- Jeff
I have to say I'm not a fan of schematics which (like other pages of this one) are basically just nets lists.
Good luck with the new project, BTW!
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: POC VERSION TWO
Dr Jefyll wrote:
Based on a (very) quick scan, I'd say those LED's need two current-limiting resistors, not one.
Quote:
Good luck with the new project, BTW!
x86? We ain't got no x86. We don't NEED no stinking x86!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: POC VERSION TWO
What about something like:
Or am I hopelessly out of my league?
Or am I hopelessly out of my league?
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: POC VERSION TWO
barrym95838 wrote:
What about [...]
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: POC VERSION TWO
Dr Jefyll wrote:
Good luck with the new project, BTW!
A brief look at your pcb layout I found: I would suggest moving C27 just below C28 will greatly ease the handling of the ZIF socket.
You have two unused triple input AND gates left and 3 buffers of an AC125. I haven't looked at the specs, but wouldn't one of the two gates serve for buffering /O3 as well?
You have made no provisions to /ABORT and to slow down (using RDY or manipulating PHI2). But you have 4 I/O pins left on your ATF:
- I would use /ABORT to detect a write attempt to the ROM space, but it could become handy for other situations as well.
- If you later add an extension board there the sheer length of the signal lines may force you to slow things down.
Regards, Arne
Re: POC VERSION TWO
One thing more:I assume that are typos.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
POC VERSION 2.2
Dr Jefyll wrote:
barrym95838 wrote:
What about [...]
Quote:
But OTOH with this scheme it'd be easy to substitute a single, bi-color LED instead of two discrete devices if you wanted to.
Attached are the corrected schematic and PCB layout.
GaBuZoMeu wrote:
I would suggest moving C27 just below C28 will greatly ease the handling of the ZIF socket.
Quote:
One thing more:
I assume that are typos.
I assume that are typos.
The console port on J2 (shown on the last page of the schematic) is rigged up so it can be operated at TIA-232 or TTL (actually, CMOS) voltage levels, depending on how the jumper blocks JP2 and JP3 (located on the same page as U15) are configured. The TIA-232 configuration is for use with a standard terminal or a thin client acting as a terminal. The TTL configuration is for testing a VT-100 terminal device I have yet to build.
Quote:
You have two unused triple input AND gates left and 3 buffers of an AC125. I haven't looked at the specs, but wouldn't one of the two gates serve for buffering /O3 as well?
Quote:
You have made no provisions to /ABORT and to slow down (using RDY or manipulating PHI2). But you have 4 I/O pins left on your ATF:
- I would use /ABORT to detect a write attempt to the ROM space, but it could become handy for other situations as well.
- If you later add an extension board there the sheer length of the signal lines may force you to slow things down.
- I would use /ABORT to detect a write attempt to the ROM space, but it could become handy for other situations as well.
- If you later add an extension board there the sheer length of the signal lines may force you to slow things down.
If you read my previous post you will see I intentionally decided to leave wait-stating out of the picture so as to remove all clock-related functions from the CPLD. The V2.2 design has a specific purpose and that is to prove—or not prove—that differing voltage levels (TTL vs. CMOS) are behind some of the problems with POC V2.1.
The only expansion beyond what you see in this design will be my SCSI host adapter, which plugs into socket J5, same as in POC V1.1, the latter which runs at 12.5 MHz. No wait-stating is needed with the host adapter.
Last edited by BigDumbDinosaur on Sat Jul 21, 2018 3:55 am, edited 1 time in total.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: POC VERSION 2.2
BigDumbDinosaur wrote:
The way in which I drew the ejection socket (which isn't a ZIF, see below image) includes the space required to clear the two levers that force the ROM out of the socket. Moving C27 probably wouldn't gain much as far as working room is concerned.
BigDumbDinosaur wrote:
No, they are correct.
BigDumbDinosaur wrote:
The 'ACT125 and 'ACT541 are being used as level converters, which the AND gate wouldn't be able to do—it's not a TTL-compatible device.
BigDumbDinosaur wrote:
If you read my previous post you will see I intentionally decided to leave wait-stating out of the picture so as to remove all clock-related functions from the CPLD. The V2.2 design has a specific purpose and that is to prove—or not prove—that differing voltage levels (TTL vs. CMOS) are behind some of the problems with POC V1.1.
Regards,
Arne
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: POC VERSION 2.2
GaBuZoMeu wrote:
BigDumbDinosaur wrote:
The way in which I drew the ejection socket (which isn't a ZIF, see below image) includes the space required to clear the two levers that force the ROM out of the socket. Moving C27 probably wouldn't gain much as far as working room is concerned.
Quote:
BigDumbDinosaur wrote:
The 'ACT125 and 'ACT541 are being used as level converters, which the AND gate wouldn't be able to do—it's not a TTL-compatible device.
Quote:
BigDumbDinosaur wrote:
If you read my previous post you will see I intentionally decided to leave wait-stating out of the picture so as to remove all clock-related functions from the CPLD. The V2.2 design has a specific purpose and that is to prove—or not prove—that differing voltage levels (TTL vs. CMOS) are behind some of the problems with POC V1.1.
Circuitry is in place to implement wait-stating. For now, there is no logic in the CPLD to implement wait-states, so it won't activate any of the pins involved.
I have no plans to implement ABORT interrupts in this design. That is for a future design with more powerful logic.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
POC VERSION TWO POINT TWO: Wait-States
GaBuZoMeu wrote:
You have made no provisions to /ABORT and to slow down (using RDY or manipulating PHI2)...
BigDumbDinosaur wrote:
Okay... 
When the 65C816 is stopped by negating RDY it halts in what is effectively the Ø2 high state, the same as if the Ø2 clock had been "frozen" in the high phase. While halted, the '816 will maintain the state of A0-A15, RWB, MLB, VPB, VDA, VPA and E as they were immediately prior to the negating of RDY. If the '816 was halted during a write cycle, D0-D7 will contain whatever it is that the '816 is writing. The MX output will reflect X, since the internal clock will be high.
Now, here's the problem. The CPLD in V2.2 is being used only to generate chip selects via combinatorial logic. Discrete logic is being used to generate the /RD and /WD signals, as well as the A16-A19 address bits. Also, a bus transceiver acting as a level converter sits in between the MPU's D0-D7 connections and the system's RAM, ROM and I/O. Ø2 is used to qualify /RD and /WD. Ø1 (inverted Ø2) is used to open and close the 'AC573 latch that captures the A16-A19 address bits. Ø1 is also used to gate the data bus transceiver so it isolates the rest of the data bus from the '816 while Ø2 is low, which is when the bank bits are emitted.
Considering all this, it is patent that merely halting the '816 with RDY won't work as expected—significant problems will arise. The first one is the state of /RD or /WD (depending on if the '816 has been halted during a read or write cycle, respectively) will not be maintained while the '816 is stopped. Instead, /RD or /WD will rise and fall as the clock falls and rises, possibly confusing the device being accessed.
Adding to the confusion, each time Ø2 falls, the data bus transceiver will go to the high-Z state, breaking the connection between the '816 and the device being accessed. Again, during a wait-stated write cycle the device being accessed may malfunction due to inadvertent timing violations.
More onerously, the latch that captures the bank bits and generates A16-A19 will open each time Ø1 goes high during the wait-state and then close again when Ø1 goes low. The problem is that while the latch is open it will be capturing data, not bank bits. Hence the effective address seen by the rest of the system will change during the wait-state, causing no end of grief.
Faced with these little contretemps, I have to make one of two choices: forego wait-stating in V2.2 or concoct a different way to accommodate slow hardware. Wait-stating is not essential, as the chosen hardware can run quite fast...12.5 MHz is easy with POC V1.1, which is 100 percent discrete logic. On the other hand, I have aspirations of trying to get the speed higher in V2, which will demand wait-states on ROM and some of the I/O hardware. So, what's a broken down old dinosaur to do?
While contemplating this matter, I was staring at the schematic, specifically the clock generator circuitry, and thinking about what goes on inside the '816 while RDY is low. That's when I decided the solution might be in halting the clock during Ø2 high for the required amount of time and then letting it resume. I would be simulating externally what the '816 does internally during a wait-state (also when the WAI instruction has been executed).
The basic clock generator circuit in all my POC units is:
I use the 74AC74 flip-flop to strengthen the clock signal, assure symmetry and in the case of V2.2, generate the Ø1 signal that gates the bank bits latch and the data bus transceiver. As is typical of this sort of circuit, the /CLR and /PRE inputs to the flop are tied to Vcc, which causes the flop's Q and /Q outputs to follow the D input as the clock oscillator's output goes high on each cycle. Of course, /CLR and /PRE can be used in other ways, as can be seen by examining the flop's function table:
In particular, note the first row in the table, in which /PRE is low. In this case, Q will stay high and /Q will stay low, without regard to what is going on at the CLK and D inputs. Q high and /Q low is the Ø2 high state.
So, my thinking goes, if I assert /PRE when a wait-state is needed, Ø2 will be "frozen" high, causing the '816 to halt as though RDY has been brought low. With Ø2 continuously high, the state of /RD and /WD will be maintained. At the same time, Ø1 will be "frozen" low. Hence the data bus transceiver will remain gated to maintain the path between the '816 and the rest of the system, and the bank bits latch will remain closed, thus maintaining the state of A16-A19. So far, so good.
Naturally, solutions may give rise to new problems. Since it would be the CPLD that would make the determination when a wait-state is needed and how long it should be, it must have a continuously running clock input and most importantly, that clock must stay in sync and phase with the Ø2 clock when the latter is not halted. The unused second section of the flop can be used to produce the CPLD's clock, which is referred to as the GCLK.
Here's the modified clock generator circuit:
Note the netlist symbol /STP (top right corner). This will be an output from the CPLD. Normally, /STP will be driven high, keeping U1a's /PRE high—Ø1 and Ø2 will run. When the CPLD has determined that a wait-state is required, it will drive /STP low, driving U1a's /PRE low and freezing the Ø1 and Ø2 clocks.
Where the trickiness will come in is in timing. If this is to work, the CPLD must assert /STP immediately after GCLK has gone high in order to start the wait-state. When the wait-state has expired, /STP must be deasserted immediately after GCLK has again gone high so Ø2 and GCLK remain in phase.
Opinions?
Incidentally, I'd expect this arrangment would also work with the 65C02.
————————————————————————————————————
Edit: I started a separate topic on using Ø2-high stretching to achieve wait-states.
Last edited by BigDumbDinosaur on Tue Nov 06, 2018 10:16 pm, edited 2 times in total.
x86? We ain't got no x86. We don't NEED no stinking x86!