MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9cc0704 Nov 11, 2018
Failed to load latest commit information.
asm Update prime.asm Jan 20, 2014
sim-source Update ccon.c Jan 20, 2014
smal-source Initial commit Jun 22, 2013
verilog Update MCPU_0.1a.v Jan 20, 2014
vhdl Update tb02cpu2.vhd Jan 20, 2014
mcpu.pdf Initial commit Jun 22, 2013 Update Nov 10, 2018
readme_old_v1.06.txt markdown readme Jun 23, 2013

MCPU - Minimal CPU for a 32 Macrocell CPLD

MCPU is a minimal cpu aimed to fit into a 32 Macrocell CPLD - one of the smallest available programmable logic devices. While this CPU is not powerful enough for real world applications it has proven itself as a valuable educational tool. The source code is just a single page and easily understood. Both VHDL and Verilog versions are supplied. The package comes with assembler, emulator and extensive documentation.

This is an old project from 2001. Since it still seems to be of interest to many, I migrated it to Github for easier maintenance. Please refer to the original project description (pdf) for further information.


A very nice write up on this design can be found on the blog of Jean-Claude Wippler here. --Nov 10th, 2018

Version History

  • v1.0x - 2001
    • Released on university homepage
  • v1.06b - 2008
    • last release on
  • v1.1 - 2013/06/23
    • Initial release on github
    • Converted readme to markdown
    • Included bugfixed verilog version submitted by A. Wood.

Archive content

	- example programs.
	- simulator.
	- include file for smal.
	- smal.exe - see license for smal !
	- VHDL source of CPU.
	- VHDL testbench.
	- Memory files.
	- The testbench requires a simple sram implementation.
          I used this one: 
 	  From the Hamburg VHDL archive (

	- Verilog conversion of CPU source 
	- A small Verilog testbench

	- SMAL sourcode.

   - WIN32 Simulator sourcecode. Porting to other platforms should be easy.


SMAL license:

/* smal32.c   language: C
   copyright 1996 by Douglas W. Jones
                     University of Iowa
                     Iowa City, Iowa  52242

   Permission is granted to make copies of this program for any purpose,
   provided that the above copyright notice is preserved in the copy, and
   provided that the copy is not made for direct commercial advantage.

   Note: This software was developed with no outside funding.  If you find
   it useful, and especially if you find it useful in a profit making
   environment, please consider making a contribution to the University
   of Iowa Department of Computer Science in care of:

                     The University of Iowa Foundation
                     Alumni Center
                     University of Iowa
                     Iowa City, Iowa  52242

The other source is licensed under GPL2.

I am always interested in possible uses and modifications to it. Let me know what you are doing with it.