A Revelation!

Still working on getting the hang of this blogging stuff.  Just thought of something – guess what?  I don’t HAVE to stay on one project until it is completed.  (All right, you veteran bloggers, you can stop laughing now and get up off the floor; ok, so I can be slow on some things sometimes.)  As an engineer, you will rarely get the chance to work on a single project until completion, and so it will be with this blog too.

Anyway, I do have an update to the Ultimate RISC computer that Professor Jones described.  I started to write the emulation for the Parallax QuickStart board (http://www.parallax.com/Store/Microcontrollers/PropellerDevelopmentBoards/tabid/514/ProductID/748/List/0/Default.aspx?SortField=ProductName,ProductName) .  I really love this little board, and when I add Bean’s Propeller Embedded BASIC (PE-BASIC, http://forums.parallax.com/showthread.php?123678-PE-Basic-Version-0.16-July-11-2011&highlight=pe-basic) it feels kind of like the old small computers from the ’70s.

Well, back in the mid-70s, I wrote an emulator for Bell Labs’ CardIAC computer (http://en.wikipedia.org/wiki/CARDboard_Illustrative_Aid_to_Computation.)   This cardboard computer taught the user how computers work on a very basic level.  Because of the CardIAC, I was light years ahead in understanding machine (and thus assembly) language.  Then, back in the early-90s, I dusted it off and morphed it into a visual CPU simulator for a microprocessor course that I was teaching.  Once more, I was starting to work on it to morph it into this Move computer.  I wanted it to be in “kinda” hardware (the Propeller would output an address and read/write to an external memory or I/O device.

After getting a good start, I decided that I was really doing a “proof of concept” project with this.  I really want to do a complete H/W Move Computer, not just a hardware emulation.  So, I am going to re-do this project:  the first implementation will be a purely software version (written in something with a little more horsepower than PE-BASIC, sorry Bean, but an integer-only language without any string handling or other things, while great for an embedded control system, leaves a bit to be desired for this Move Computer.)

My second implementation will then be a simple 4-bit proof of concept done in SSL (Small-Scale Logic) and MSL (Medium-Scale Logic) ICs, such as the 74LS00 or maybe the 4000 family chips.  This will be followed by an actually usable 16-bit or more computer, again done in SSL and MSL.

Here is the block diagram for my Move Computer:

The Control unit will need to generate 8 signals:

Internal to CPU:

  • MAR_WR (Memory Address Register Write or Load)
  • MDR_WR (Memory Data Register Write or Load)
  • MDR_RD (Memory Data Register Read)
  • PCRADDR_RD (Program Count Register Address – hardwired to all 1s, I.E. FFFF)
  • CTRL_RESET (Reset the binary counter to the micro-instruction step)

And external to CPU

  • WR (Write – for Memory or I/O)
  • RD (Read – for Memory or I/O)
  • PCR_INCR (PCR Increment)

Reset:

All control signals go to 1
ACCU (Accumulator) = 0000
PCR (Program Count Register) = 0000

The microcode for the CPU will be pretty simple.  The processor will fetch the contents of the source location and then store it in the destination location.

Fetch the contents of the next Source memory location in the program into the MDR.

1)  PCRADDR_RD = 0 & MAR_WR = 0
2)  PCRADDR_RD = 1, MAR_WR = 1
3)  MAR_WR = 0
4)  MAR_WR = 1, PCR_INCR = 0
5)  PCR_INCR = 1, RD = 0
6)  MDR_WR = 0
7)  MDR_WR = 1
8)  RD = 1

Store the contents of the MDR into the next Destination memory location in the program.

1)  PCRADDR_RD = 0 & MAR_WR = 0
2)  PCRADDR_RD = 1, MAR_WR = 1
3)  MAR_WR = 0
4)  MAR_WR = 1, PCR_INCR = 0
5)  PCR_INCR = 1, MDR_RD = 0
6)  WR = 0
7)  WR = 1
8)  MDR_RD = 1

This looks like it will work, next I will test it in software.  If I stay with this microcode, you will notice that it takes exactly 16 steps.  I would not need the CTRL_Reset signal in that case, just running the sequencer clock beyond the 15(Decimal) or 1111b would start it over again without any need to reset the counter.

Well, that seems to be it for the initial design phase, I will implement it in software and present it in the next posting of this project (with other posts between these, of course.)