Alternatives to discrete IC's as glue logic

243 views
Skip to first unread message

Richard Lewis

unread,
Jun 23, 2019, 3:31:22 PM6/23/19
to retro-comp
I'm building a Z80 board that has all of the peripherals (CPU/CTC/PIO/SIO) as QFP-44 devices. The RAM is TSOP-32 and ROM is socketed PLCC-32. Yes I should have just used a Z80182 instead... Maybe for the next board. 

Was having a think this morning about replacing the discrete IC's used as glue logic (mostly for chip selection) in my design with single ROM. That idea got shot down when I couldn't find a 5V EEPROM that is faster than 75ns. Then I thought, what about a using a fast SRAM (10ns) as a front-end cache and bootstrap it from ROM using a small MCU? Now I'm up to the same number of chips (and taking up a lot more space) than I had before so no point. Then there is a the point: "Why not use the MCU for the glue logic then?" I suppose if I ran the thing at 100+Mhz it should be fast enough. 

Also there are modern 5V CLPD's like the Microchip/Atmel ATF1502 which can be programmed in VHDL/Verilog with ProChip Designer (yet another tool to install and learn). I have a collection of Max Vs and II's but they can only deal with 3.3V max so would need level shifters on all the pins. 

I suppose to answer my own question is that it's probably easier to stick with discrete IC's. Or if I just used an Z80182 instead then I wouldn't need the external glue logic in the first place. 

-Richard

Tom Storey

unread,
Jun 23, 2019, 3:46:17 PM6/23/19
to Richard Lewis, retro-comp
You can use ATF22V10's or 16V8's instead of the bigger 150X's. I think these come in speed grades down below 10ns. The only issue Ive found so far with the HDL route of programming is simulation tools. WinCUPL includes WinSIM which means you can simulate your design, but ProChip Designer only has options for licensed (for a fee) simulation tools as I understood it. Otherwise you're going to need to find your own solution to that, maybe something open source.

Im playing around with a 1502 at the moment. I bought a development board/kit, although with WinSIM at hand you technically dont need anything physical until you want to program a device - the beauty of simulation tools!

The biggest hurdle is understanding CUPL as a language, and working around WinCUPL/WinSIM and the bugs it has - some of them can be a bit infuriating and a put-off until you figure out how to work around them. Then when you think you understand it, it throws something else at you. But Im getting there.

Im using it to build a single chip SPI peripheral which I may end up using in a project of mine, and I'll probably release the source for others to use if I can finish it without losing my mind. :-) Im writing it in CUPL so that I can simulate it with WinSIM, but some kind of HDL is on the list if I can figure out how to do simulations.

In my oppinion, unless you need the speed, or have tight board space requirements (in which case you can also look at "little logic" devices such that you can sprinkle gates around as you need them) then glue logic is probably just fine.

--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/retro-comp/94db44f2-9272-471b-b892-fe89b2d27f52%40googlegroups.com.

Mark T

unread,
Jun 23, 2019, 3:48:18 PM6/23/19
to retro-comp

It would be interesting to see the schematic of your glue logic.

If its basic address decoding I think it's best to use basic logic functions, as you are already using SMD then maybe the single gate logic chips in sop or ssop would make the layout easier.

If its getting complicated for discrete logic then maybe CPLD could be used. EPM7xxx using quartus II 13 is fairly easy to use and you could design the logic in schematic capture if you havent already started learning vhdl or verilog..

I'm not a fan of using fast modern processors to spoon feed retro processors, it just seems wrong to me. CPLD seems ok as its just a variant of what could have been done with ULAs or ASICs back in the days.

Mark

Richard Lewis

unread,
Jun 23, 2019, 4:06:17 PM6/23/19
to retro...@googlegroups.com
Not having any particular difficulty with the glue logic part in the sense that I have lots of board space. I'm just trying to build a SBC with as few chips as possible. The glue logic is pretty standard:  just some 3-8 muxs for address decoding with some OR's for chip select and a latch or 2 sprinkled in. I'm might try a comparator instead of a mux to get tighter addressing. If I was a masochist I could try BCC packages.... But I'm not confident at this point to attempt BGA, especially in a size of a 4 or 6 ball configuration. 

Can post a schematic later (at the moment I'm chasing my daughter around at the pool). 

Thought about EPM7xxx. I know VHDL well so that won't be an issue. I just have this OCD thing about installing much older versions of packages I already have. But maybe that's the best route. 

With regard to the ATF22V10 and ATF1502, I just don't want to deal at with CUPL. My brain would explode. 

-Richard

Duncan Reed

unread,
Jun 23, 2019, 4:50:19 PM6/23/19
to retro-comp


On Sunday, June 23, 2019 at 8:31:22 PM UTC+1, Richard Lewis wrote:
"Why not use the MCU for the glue logic then?" I suppose if I ran the thing at 100+Mhz it should be fast enough. 

That would be fun to debug. You would need a very fast (in hobbist terms) scope to look at a 100MHz+ digital signal.

Richard Lewis

unread,
Jun 23, 2019, 5:15:11 PM6/23/19
to retro-comp
Fortunately I went overboard and got a 200Mhz scope. The biggest issue is dealing with crossing from a slow to a fast clock domain. With the exception of the latch the other bits of control logic are async anyway so shouldn't be an issue. But as Tom had mentioned I'm not big on using a MCU in my designs except as maybe a programable clock source.  

Duncan Reed

unread,
Jun 23, 2019, 5:19:21 PM6/23/19
to retro-comp

You would need a 500 MHz bandwidth scope to get an accurate 100 MHz digital signal. 5th Harmonics and all that. Try putting a 50 MHz digital signal through a 100MHz scope. You will just see a sine wave.

Duncan Reed

unread,
Jun 23, 2019, 5:28:35 PM6/23/19
to retro...@googlegroups.com

scope10Mhz.png

scope50Mhz.png

Same signal, higher frequency.

Bill Shen

unread,
Jun 23, 2019, 6:08:39 PM6/23/19
to retro-comp
It is possible to build a Z80 SBC without glue logic.  See https://www.retrobrewcomputers.org/doku.php?id=builderpages:plasmo:simple80
  Bill

Richard Lewis

unread,
Jun 23, 2019, 8:41:08 PM6/23/19
to retro-comp
I suppose though what also matters is the sampling rate and the type of interpolation used. Discovered that with relying on sin(x)/x too much. 

Duncan Reed

unread,
Jun 24, 2019, 4:24:48 AM6/24/19
to retro-comp
It is because there is no such thing as a square wave. It is a load of sine wave super impossed on each other. So if you are looking at a 40MhZ digital signal, first sign wave is 40Mhz, 2nd is 80Mhz, 3rd is 120MHz. etc. If you cant see enough of the harmonic the signal is corrupted.

With a pure sign wave it is not as bad, but bandwidth is like TB on Harddisk, you dont really get xTB of Storage. The quoted bandwidth of a scope cuts off at -3db. Effectively by the time you get to 200Mhz you have lost 30% of accuracy. So if you look at a 200Mhz it can be 30% out.

Keysight and Tektronics do some good papers on these.

Regards,
Duncan

Richard Lewis

unread,
Jun 24, 2019, 11:32:24 AM6/24/19
to retro-comp
A Yes, Fourier transforms. I have a math background use them quite often in finance makes sense they would apply here. I am quite a noob with electronics however, I'll read up on those papers you mentioned. 

-cheers
Richard

Duncan Reed

unread,
Jun 24, 2019, 11:44:47 AM6/24/19
to retro-comp

>
A Yes, Fourier transforms. I have a math background use them quite often in finance makes sense they would apply here. I am quite a noob with electronics however, I'll read up on those papers you mentioned.
>

Yep you can see the harmonics in an FFT graphical glory. I planned to do some sort of 'what they dont tell you about scopes' FAQ/Gotcha sheet, but stil on going. I dont think anyone reads the small print when they first buy a scope, including me.

Bear in mind you might not balance the books with your electronics hobby, a tax write off maybe.

Regards.

Sergey Kiselev

unread,
Jun 24, 2019, 11:59:08 AM6/24/19
to retro-comp
ATF16V8B is cheap (less than $1) and it works nicely for generating a few chip selects.
I use GALasm software (https://github.com/daveho/GALasm) to compile fuse maps for ATF16V8/GAL16V8 SPLDs.
The input format is fairly simple - basically assigning a name to each pin, and then specifying logic equations. Here is an example of such an input file.

ATF16V8B can be programmed using a commonly available TL866 programmer. No need to invest in a JTAG adapter.

-Sergey

Tom Storey

unread,
Jun 24, 2019, 12:49:28 PM6/24/19
to Sergey Kiselev, retro-comp


On Mon, 24 Jun 2019, 16:59 Sergey Kiselev, <skis...@gmail.com> wrote:
ATF16V8B can be programmed using a commonly available TL866 programmer.

It was my understanding that the older TL866's aren't compatible with the ATMEL parts, but will do GAL variants, e.g. Lattice.

The TL866-II Plus is required for ATMEL parts.

Alan Cox

unread,
Jun 24, 2019, 12:55:21 PM6/24/19
to retro-comp
> It was my understanding that the older TL866's aren't compatible with the ATMEL parts, but will do GAL variants, e.g. Lattice.
>
> The TL866-II Plus is required for ATMEL parts.

I've been able to program them with my TL866CS minipro. It did need
the latest software and firmware but it claimed it worked and it read
back as valid. Once I've wired up a suitable battery pack and can test
the board I'll find out for sure.

Alan

Tom Storey

unread,
Jun 24, 2019, 1:02:45 PM6/24/19
to Alan Cox, retro-comp
Interesting, I had what I thought was the latest software, downloaded from the manufacturers website, but they weren't even listed as a target. Not even in the text file of supported parts on their site.

I ended up having to buy the II Plus where they were listed in the software for that.

Sergey Kiselev

unread,
Jun 24, 2019, 1:28:37 PM6/24/19
to retro-comp
Same here. I have TL866CS and it works just fine for either ATF16V8 or GAL16V8. TL866A should work as well... technically the difference between these two is only the presence or absence of the ICSP header.

Nigel Kendrick

unread,
Jun 24, 2019, 3:51:36 PM6/24/19
to retro-comp
For what it's worth.. Grant Searle's Z80 design + an I/O port, with all glue logic replaced with a GAL22V10*:


Nigel

*Except for the RAM/ROM flip-flop as two gates on the chip were needed for the oscillator anyway.


On Sunday, June 23, 2019 at 8:31:22 PM UTC+1, Richard Lewis wrote:

Nigel Kendrick

unread,
Jun 25, 2019, 2:07:56 AM6/25/19
to retro-comp
There is a firmware difference too. Somewhere 'out there' there's instructions to reprogram a CS to 'know' it's an A. If you don't do this the programming software won't drive the ICSP header. (Citation: I've done the mod).
Reply all
Reply to author
Forward
0 new messages