6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu May 02, 2024 1:33 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: 8726 dissection
PostPosted: Mon Oct 11, 2021 6:55 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
//Previos thread: 6530 dissection.

This thread is about a transistor level dissection of the 8726 REC (RAM Expansion Controller),
brought to you by Frank Wolf and ttlworks.

8726 was used in the Commodore REU (RAM Expansion Unit),
a cartridge to be plugged into the C64 and C128 expansion port.

Basically, the 8726 is a DMA\DRAM controller.
It's not possible to access the REU DRAM from the C64\C128 directly,
it's only possible to move/swap/verify blocks of data between REU DRAM and C64\C128 memory.

There were three models of the REU:
1700 (128kB of DRAM), 1750 (512kB of DRAM), 1764 (256kB of DRAM).
8726 came in DIP64 and PLCC68 package.

8726 was designed by Victor F. Andrade, who also did the 65CE02,
and later went to AMD for working on the K7.
And from what's in the chip, I have to say that he is very good at logic design.

;---

Some more links:

codebase64: Commodore REU
codebase64: description of the REU registers
pokefinder: 1750\1764 REU service manual

;---

I have to say, that me and Frank had greatly underestimated size/complexity of the circuitry within the 8726,
because half of the chip space is empty (I think that the amount of pads didn't allow for a smaller chip size).

The previous dissection was about the 6530, a manually routed design from 1975.
8726 is a CAD routed design from 1985, and to me it's a bit scary to see how the game of routing chip layouts
had changed within only 10 years.

Sometimes I had bumped into the size limitations when drawing schematics with the Eagle full version during thsi dissection,
so I started to wonder what CAD software and what workstation Victor Andrade had used there,
and how expensive CAD software plus workstation had been back in 1985.


Some of our readers are familiar with the game, when you need a PCB done fast.
You spend some time with drawing the schematics, then you throw the components from the schematics into a PCB,
and try to arrange them until the airwires between said components don't look too scary anymore.
And from there, it's autorouter plus some hand optimisation.
To me, the 8726 chip layout has that particular smell.

Note:
For consistence with Frank's notation, low_active signals are named foo#, not /foo.

Orientation for all the chip pictures: RES# pad is North.


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 6:56 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
Eagle 6.4 schematics for my schematic pictures in this thread,
just in case if somebody needs them.

Note: KiCad is supposed to be able to import these schematics,
unfortunately it doesn't seem to be possible to disable the layers 'name' and 'value' in KiCad schematics,
so making my schematics look nice and clean in KiCad will require some work, sorry.

Attachment:
8726r1_dissection_schematics.zip [909.57 KiB]
Downloaded 39 times


Last edited by ttlworks on Fri Jul 29, 2022 6:16 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 6:58 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
0) cheat sheet

A very simplified schematic to give an overview about what came out during the dissection.

Attachment:
8726_0_cheatsheet.png
8726_0_cheatsheet.png [ 1.18 MiB | Viewed 2091 times ]


A picture of the 8726 silicon, with the interesting areas marked according to the cheat sheet.

Attachment:
8726_orientation.png
8726_orientation.png [ 377.25 KiB | Viewed 2641 times ]


Just as a reference, another picture of the 8726 silicon without the markings.

Attachment:
8726_small.png
8726_small.png [ 722.76 KiB | Viewed 2641 times ]


Last edited by ttlworks on Fri Jul 29, 2022 6:12 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:01 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
1) DMA# pad, located North West on the chip.

//Since the chip has a lot of pads, I had decided to go through them clockwise, starting with DMA#.

The low_active DMAo# signal [generated in "31) tapeworm from hell"] is sampled by a transparent latch
controlled by DMA1 [generated in "21) RAS_CAS_logic" from PHI1 and DotCLk].

The output of said transparent latch plus DMAo# go into a NAND with push_pull output.
The NAND feeds an inverting and a non_inverting super buffer,
which control the driver FETs for the DMA# pad.

;---

Basically, what we have on the DMA# pad is DMAo# AND (DMAo# latched by DMA1).

DMA# stops the 6510 CPU in the C64\C128 by pulling RDY low, when the 8726 takes over the bus.
For more details, see "2) BA".

Attachment:
si8726_1_dma.png
si8726_1_dma.png [ 50.86 KiB | Viewed 2640 times ]

Attachment:
8726_1_dma.png
8726_1_dma.png [ 57.03 KiB | Viewed 2640 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:05 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
2) BA

BA is a signal generated by the VIC-II inside the C64\C128.

If the VIC-II needs the bus during PHI2 when handling badlines or sprites,
BA low stops the 6510 CPU by pulling its RDY input to low.
For details, please see:
C64 schematics, part 1.
C64 schematics, part 2.
6567 VIC-II preliminary datasheet, PDF page 19.
VIC-II article by Christian Bauer, 2.4.3 Memory access of the 6510 and VIC

BA changes during PHI1.
BA1 is BA sampled during PHI1 by a transparent latch.
BA2# goes high after BA was low for three cycles, indicating that the VIC-II took over the C64\C128 bus completely.

If the C64\C128 bus is available, if a DMA access to C64\C128 memory is active (indicated by DMAo# is low),
OE_RW enables the driver for the R/W# pad [plus the A0..15 bus drivers, see "16) A0"].
during PHI1=low (what is different from PHI2_in=high).

//From the looks of the propagation delays which were intentionally built into the circuitry,
//to me it looks like the 8726 timing was a bit tricky on the C64\C128 side.

Attachment:
si8726_2_ba.png
si8726_2_ba.png [ 57.77 KiB | Viewed 2639 times ]

Attachment:
8726_2_ba.png
8726_2_ba.png [ 196.16 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:07 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
3) CS#

When the C64\C128 reads/writes 8726 registers, it does by pulling the low_active chip select CS# low.

CS# (low active) goes throug an inverting super buffer, then through an inverter, and becomes CSi# (low active).

Later in "5) rw", two control signals are generated from CSi#, R/W# and PHI1:
When CS2R# (low active) is low, the 6510 does a 8726 register read during PHI1 low (what is different from PHI2_in is high).
When CS2W# (low active) is low, the 6510 does a 8726 register write during PHI1 low (what is different from PHI2_in is high).

;---

There are two control signals for D0..D7 pad drivers\buffers, see "18) D0".
OE_D (high active): D0io..D7io > D0..7.
OE_DI# (active low): D0..D7 > D0io..7io.
;
D0..7 is the external data bus of the C64\C128.
D0io..7io (bidirectional) is the internal data bus of the 8726.

Just describing the simplified concept of the circuitry which generates OE_D and OE_DI# here:

Inverted CS2R# and OED go into an OR gate.
The output of the OR gate is sampled by a transparent latch controlled by OED_GATE.
If the output of the OR and the latch are high, OED is high: D0io..D7io > D0..7.
;
OED (high active) is generated in "31) tapeworm from hell" during DMA when the 8726 writes C64\C128 memory.
OED_GATE is generated in "21) RAS_CAS_logic" from PHI1 and DotClk.

CS2W# and inverted OEDI go into an AND gate, which generates OE_DI#.
If CS2W# is low, or OEDI is high: D0..D7 > D0io..7io.
;
OEDI (high active) is generated in "31) tapeworm from hell" during DMA when the 8726 reads C64\C128 memory.

And yes, timing on the C64\C128 side of things in the 8726 still looks a bit tricky...

Attachment:
si8726_3_cs.png
si8726_3_cs.png [ 42.49 KiB | Viewed 2639 times ]

Attachment:
8726_3_cs.png
8726_3_cs.png [ 119.06 KiB | Viewed 2639 times ]

;---

Side note:

Imagine, you want to delay a signal, and all you have is 7405 type open collector inverters with pullup resistors at the output.
Adding a capacitor to GND at the output will delay the signal, but delays for the high_to_low edge and low_to_high edge would be different.

That's because the pullup resistor between output and VCC will have a higher impedance than the output transistor in the inverter
which switches the output to GND (if they would have the same impedance, the voltage at the output won't go below logic HIGH level).

So if you want to have identical delays for high_to_low edge and low_to_high edge when resorting to 7405 plus pullup resistor plus capacitor,
the trick is to send the signal through _two_ 7405 type inverters, by using identical pullup resistors to VCC and identical capacitors to GND.

The 8726 just uses FETs instead of pullup resistors to VCC and bipolar transistors switching to GND.


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:08 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
4) PHI

The PHI2_in clock signal generated by the VIC-II inside the C64\C128 goes through an inverting super buffer,
then clears/sets a RS flipflop which is built from two NOR gates (gate outputs are boosted by non_inverting super buffers).

The outputs of the non_inverting super buffers then give us the two non_overlapping clock signals PHI1 and PHI2.

Nothing unusual here, it's pretty much standard.

Attachment:
si8726_4_phi.png
si8726_4_phi.png [ 37.38 KiB | Viewed 2639 times ]

Attachment:
8726_4_phi.png
8726_4_phi.png [ 59.93 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:11 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
5) rw

R/W# is the read/write control signal from/to the C64\C128, and yes:
since the 8726 needs to be able to write C64\C128 memory, it's bidirectional.
High=read, low=write.

;---

On the input side, R/Wi# just is the buffered R/W# signal.

CS2R# (low_active) enables 8726 register reads and goes low
when R/W# is high AND CS# is low (6510 read access)
AND PHI1 is low (what is different from PHI2_in is high).

CS2W# (low active) enables 8726 register writes and goes low
when R/W# is low AND CS# is low (6510 write access)
AND PHI1 is low (what is different from PHI2_in is high).

;---

On the output side, basically we have a non_inverting buffer,
fed by (low active) R/Wo#, enabled with (high_active) OE_RW.

During DMA for C64\C128 memory writes (DMAo# is low):
R/Wo# is generated in "31) tapeworm from hell",
OE_RW is generated in "2) BA".

The unusual thing about the non_inverting buffer is,
that the output transistors do non_overlapping switching to GND\VCC,
and we are going to see that sort of circuitry quite often in the 8726
when it comes to bus drivers.

We have two NANDs, one fed by R/Wo# and OE_RW, the other fed by inverted R/Wo# and OE_RW.
The outputs of the NANDs fed the R and S input of a RS flipflop built from two NOR gates.
The outputs of the RS flipflop then control the output driver FETs, switching R/W# to GND\VCC.

If OE_RW is low, the outputs of both NANDs are high,
so the (high active) R and S inputs are both high,
what forces both outputs of the RS flipflops to low and disables the output driver FETs.

Point is, that we already had a RS flipflop with buffered outputs in "4) PHI",
and from the logic design point of view the non_inverting buffer driving R/W#
to me somehow looks like a modified PHI1\PHI2 clock generator with output enable.

Attachment:
si8726_5_rw.png
si8726_5_rw.png [ 45.41 KiB | Viewed 2639 times ]

Attachment:
8726_5_rw.png
8726_5_rw.png [ 100.17 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:13 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
6) DotClk

DotClk is the dot clock from inside the C64\C128.

//Frequency is 8* PHI2_in, PHI2_in is supposed to change with the rising edge of DotClk.

DotClk (high active) goes through an inverting super buffer and becomes DotClk# (low active).

DotClk# then goes into the Dot/Dot# clock generator inside "21) RAS_CAS_logic".

Attachment:
si8726_6_dotclk.png
si8726_6_dotclk.png [ 23.05 KiB | Viewed 2639 times ]

Attachment:
8726_6_dotclk.png
8726_6_dotclk.png [ 18.76 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:14 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
7) IRQ#

IRQ (high active) is a 8726 internal interrupt signal,
it is generated in "30) Register $00".

IRQ goes into an inverting super buffer,
which controls the driver FETs pulling the external IRQ# signal low if IRQ is high.

Inside the C64\C128, IRQ# (low active) goes to the IRQ# pin of the 6510,
and something like a 3.3kOhm pullup resistor is supposed to be between IRQ# and VCC.

Attachment:
si8726_7_irq.png
si8726_7_irq.png [ 27.26 KiB | Viewed 2639 times ]

Attachment:
8726_7_irq.png
8726_7_irq.png [ 22.73 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:15 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
8) RES#

RES# (low active) RESET signal from inside the C64\C128
goes through an inverting super buffer,
then through a non_inverting super buffer,
and becomes RES (high active).

Attachment:
si8726_8_res.png
si8726_8_res.png [ 20.96 KiB | Viewed 2639 times ]

Attachment:
8726_8_res.png
8726_8_res.png [ 21.72 KiB | Viewed 2639 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:16 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
9) BS

BS (high active) goes through an inverting super buffer and becomes BS# (low active).

It defines the size of the two DRAM banks attached to the 8726 inside the REU,
see "26) AM16..18 address counter, bank select logic".

BS=low (BS#=high): two banks with 256kB of DRAM each.
BS=high (BS#=low): two banks with 64kB of DRAM each.

Note, that we are just talking about the configuration of the 8726 bank select logic here,
not about the _real_ size of a DRAM bank which physically is attached to the 8726.

Attachment:
si8726_9_bs.png
si8726_9_bs.png [ 16.94 KiB | Viewed 2638 times ]

Attachment:
8726_9_bs.png
8726_9_bs.png [ 16.52 KiB | Viewed 2638 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:18 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
10) CAS1#

The CAS1# (low active) output connects to bank1 DRAM CAS#.

Basically, we have a non_inverting driver which turns CAS1o# (low_active) into CAS1#.
CAS0o#, CAS1#o, RAS0#o, RAS1o# are generated in "21) RAS_CAS_logic".

Drivers for CAS0#, CAS1#, RAS0#, RAS1# have identical chip layout,
nothing fancy in there.

Attachment:
si8726_10_cas1.png
si8726_10_cas1.png [ 47.49 KiB | Viewed 2638 times ]

Attachment:
8726_10_cas1.png
8726_10_cas1.png [ 58.14 KiB | Viewed 2638 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:19 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
11) DWE#

DWE# (low active) is the write enable output signal for the DRAMs attached to the 8726.

Basically, we have an inverting driver which turns DWE (high active) into DWE#.

The inverting DWE# driver driver is just a variation of the non_inverting "11) CAS1#" driver:
the output FETs driving the DWE# pad to GND\VCC are swapped to make it inverting.

Attachment:
si8726_11_dwe.png
si8726_11_dwe.png [ 43.11 KiB | Viewed 2638 times ]

Attachment:
8726_11_dwe.png
8726_11_dwe.png [ 45.72 KiB | Viewed 2638 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: 8726 dissection
PostPosted: Mon Oct 11, 2021 7:20 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
12) DD0

DD0..DD7 are the data inputs/outputs of the DRAMs attached to the 8726.

DD0io..DD7io is the bidirectional data bus inside the 8726 related to DD0..7.

DD0..7 drivers\buffers have identical chip layout, so we just focus on DD0.

;---

On the input side, DD0 is sampled with a transparent latch during PHI1,
what indicates that the 8726 does DMA data access to the DRAM banks during PHI1.

The output of the latch is placed on the DD0io bus by a non_inverting buffer
controlled by DDRD (high active), which is generated in "31) tapeworm from hell".

;---

On the output side, we have a non_inverting driver fed by DD0io, driving DD0,
controlled by DWE (high active).

As mentioned in "11) DWE#",
DWE (high active) is the write enable signal for the DRAMs,
generated in "31) tapeworm from hell".

Drivers have output FETs switching non_overlapping to GND\VCC
it's a variation of the driver we already had in "5) rw",
making creative use of a RS flipflop built from two NOR gates.

Attachment:
si8726_12_dd0.png
si8726_12_dd0.png [ 79.02 KiB | Viewed 2638 times ]

Attachment:
8726_12_dd0.png
8726_12_dd0.png [ 160.58 KiB | Viewed 2638 times ]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: