Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Al Williams

Dr. Dobb's Bloggers

CPU Design on Paper

April 23, 2013

I've designed a few CPUs in my life from old school to actually practical. FPGAs are great for experimenting with CPU designs, since I could never get all the wiring right for something like Oneder if I were trying to build it out of regular components.

More Insights

White Papers

More >>


More >>


More >>

Even with FPGAs, though, the process is a little daunting. I've often thought that fundamental CPU concepts could be a great thing to teach aspiring computer programmers, even at the high school level. However, getting your hands around an FPGA design flow might be a bit too much.

However, as usual, my thought isn't original. Way back in 1968, Bell Labs released a "paper computer" to help teach kids about how computers work. CARDIAC was nothing more than some cardboard (there are some pictures of one at the Porticus site), but it implemented a simple CPU design that was great for teaching people how these mysterious machines actually worked.

The CPU is definitely a child of the '60s. Like the machine I learned on (another made up computer called TUTAC), CARDIAC was a decimal machine and relied on self-modifying code for things like indexing. Still, you can teach a lot about programming even with a simple machine.

It turns out, you can still find CARDIAC for sale on a few web sites (they must have made millions of them). The included book is pretty sexist for the modern generation (a flow chart about fixing a spare tire starts with a decision block to determine if you are a boy or a girl), but that was how it was back then. If you can get past that, the actual design of the computer is very clever. Of course, the student is the ALU and the control unit, but the die cut pieces direct the flow and provide step-by-step guidance for the execution of each instruction.

I have in mind trying to work with some students on something like CARDIAC and picking out a few to actually do a simple CPU on an FPGA (maybe something like mCPU). However, I didn't want to go buy a classroom full of CARDIACs.

A quick search turned up a CARDIAC emulator, although it isn't totally faithful to the original. Besides, have you tried getting a school to let you load software on their computers? Good luck with that. So I set out to write a simulated CARDIAC CPU in, of all things, Microsoft Excel.

Excel? Why not? The schools have it and it certainly can do the work of a computer made out of cardboard. You can see the result below and download the spreadsheet. I will confess that I was highly inspired by another spreadsheet-based educational simulation for The Little Man Computer. The Little Man Computer was another educational (and fictional) computer from that same time period. If you aren't old enough to remember, things like CARDIAC, Little Man, TUTAC, and MIX were important, because computer time was too expensive in those days to let students just run code on them all the time. Times have certainly changed.

What's this got to do with FPGA CPU design? Well, you have to understand how a CPU works before you can design one in an FPGA or otherwise. Granted, this one has some bad habits (like decimal numbers and self-modifying code). On the other hand, you don't confuse kids with number bases (yet), and you can use those very flaws to point them out and show how modern machines fix them.

If you've ever designed a CPU or other significant FPGA design, how did you get started? I'll have some more thoughts on CARDIAC, the CARDIAC spreadsheet, and learning CPU design next time. Even if you don't actually want to design your own CPU, there are a lot of lessons you can learn from delving under the hood.

Related Reading

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.