el_barto wrote:
I'm building a retro 8-bit computer...What do I need to do with the CPLD to tie all these together?
Just so you know, this is a 6502-family forum. There may be some members who are familiar with the Z-180 hardware, but I'm not one of them. Use of a CPLD in retro designs is not new—several of us have designed 6502-based systems with CPLD glue logic.
You haven't described what sort of computer hardware knowledge and experience you possess, so some of what I'm about to say may come off as patronizing, for which I apologize. You cannot approach a computer build from the position of being a total newbie. Many of us here who have scratch-designed and built machines have professional electronics experience of some sort, so we didn't go into it completely clueless. I had never scratch-built a computer before I built my first unit, but have had years of experience working with computer hardware, as well as a formal education in electronics. So I had a pretty good idea what I was getting into.
The first step is to read everything you can about electronics and computer hardware, especially as relates to the Z-180. I suggest you join a forum that supports the Z-80 family so you can learn as much as possible about how to incorporate it into a system. People who have already built around the Z-180 will be able to answer a lot of your questions on bus design, timing issues and all those other little things that have to be considered in your design. That will get you started.
You need to establish some realistic goals about what you hope to achieve with your machine and not build something whose complexity exceeds your ability to troubleshoot it if it fails to work or doesn't work right. A route I suggest you take is to first build a basic "proof-of-concept" unit using discrete logic so you can test out your ideas on how you want your contraption to work. Also, playing around with your proof-of-concept unit will get you very familiar with the Z-180's behavior and help you visualize how it all works. Only then would I recommend looking at a CPLD for glue logic.
Part and parcel with developing your hardware is being able to write software for it, specifically firmware that will get it to a usable state at boot-time. I don't know about the Z-180, but in the 6502 universe we usually develop firmware in assembly language. So you may find yourself getting very up close and personal with an assembly language development package. Alternatively, you could write the firmware in C if you have access to a Z-180 C compiler.
I don't want to discourage you, but I recommend you learn how to fly a single-engine airplane before you step into the cockpit of a 747. If you've not done this before, incorporating a CPLD into a first design is, in my opinion, too big a leap.