Building a 1-Bit CPU as a Custom ASIC, Then Overclocking It From 1 Hz to 10 MHz

Open on YouTube ↗
Overview

Ichiken built a 1-bit CPU from the transistor level up, had it fabricated as a real chip, and then tested how far it could be pushed. The design is deliberately minimal, described by its original creator as among the world's lowest-performance computers. The project had two aims: to show how a digital ASIC is laid out and manufactured, compared with the analog op-amp chip Ichiken built earlier, and to see how fast such a tiny CPU can run once the clock and supply voltage are raised. As before, the work was done with help from ISHI-kai, an open-source semiconductor community.

9 min read
1:44

The Source Design: naoto64's 1-Bit CPU

Ichiken is clear that the 1-bit CPU is not their own invention. The ASIC is based almost entirely on a circuit designed by naoto64, who also sells assembly kits for it. naoto64's sales page describes the CPU as one of the world's lowest-performance computers. In the ASIC version, the clock and display circuits sit outside the chip, but the CPU section follows essentially the same circuit design as the original.

The CPU has four parts: a register, a program counter, a ROM, and a decoder. The register is a D flip-flop. The arithmetic logic is an XOR gate built from four NAND gates, which works as a half-adder with no carry. The decoder is made from AND, OR, and NOT gates. The ROM section contains gates too, but the actual program values come from external DIP switches.

Both the program counter and the register are 1 bit wide. Ichiken suggests this may be about as bare-bones as a CPU can get. As a result there are only two instructions: ADD and JMP.

2:59

Layout: Digital Is Much Easier Than Analog

The logic gates were already defined, so the layout job was mostly a matter of arranging them in a row. As with the op-amp project, Ichiken used KLayout, an open-source layout editor.

Ichiken contrasts this with the earlier analog work. For the op-amp, transistor placement needed a lot of care, such as pairing transistors, matching them with common-centroid arrangements, and adding dummy transistors at the edges. A digital circuit does not demand that level of fussiness. The process design kit (PDK) also provides standard cells, which are pre-built transistor combinations optimized for the process. For this chip, Ichiken simply chose the standard cells they needed, placed them, and connected them with a metal layer.

Each standard cell has inputs and outputs that connect to the cells beside it. The cells arrive fully functional, so there is no need to design how the transistors behave. Ichiken found it a relief to focus on wiring instead of transistor layout. They note that the two projects differ in circuit size and transistor count, so the comparison is not direct. Still, the op-amp layout took dozens of hours, while the 1-bit CPU took about two or three hours. In Ichiken's words, it was honestly a lot easier than last time.

4:41

Fabrication at Tokai Rika

As before, Ichiken did the design and layout and outsourced manufacturing to an external foundry. The chip was again made through chip pooling: several participants share space on one die, which keeps the cost per person as low as possible. The foundry this time was Tokai Rika.

The foundry sent photos from the manufacturing process, including before-and-after images of the aluminum metal wiring step, with the ICHIKEN logo visible. Ichiken says images like these really bring home that the semiconductors are being manufactured.

The finished chips came in both bare-die and packaged versions. Under a digital microscope, the bare die shows many different circuits, since other people's designs share the chip. Ichiken's 1-bit CPU occupies the upper-right corner, and on closer inspection they judged it to be very well made.

5:49

The Test Setup

The chip cannot run on its own, so Ichiken built a board with a chip socket and assembled the peripheral circuitry on a breadboard. The DIP switches act as ROM and hold the instructions and immediate data. The area around the LEDs contains the clock and shows the states of the program counter and the register. The program counter can only be 0 or 1, and there is a single register.

One practical issue: the smallest standard cells used in the CPU cannot supply enough current to drive an LED, so the LEDs are driven through buffer transistors. Ichiken admits they are not sure this is a proper way to build a CPU, but went ahead anyway.

6:24

Programming It: JMP Loops

Only four DIP switch bits are used: switches 1 and 2 for address 0, and switches 7 and 8 for address 1. In each pair, the first bit selects the instruction (1 means JMP, 0 means ADD) and the second holds the immediate data. A switch at 0 V reads as 0, and one at 5 V reads as 1.

At the start of the demo, the chip was executing JMP 0. With no additions performed, the register stayed at 0. Ichiken then programmed JMP 1 at address 0 by turning switches 1 and 2 on. At address 1, switch 7 was at 5 V (JMP) and switch 8 at 0 V (immediate 0), giving JMP 0. After a reset, the CPU loads JMP 1 at address 0 and jumps to address 1. There it runs JMP 0 and goes back to address 0, and the cycle repeats. Since no addition occurs, the register LED never lights.

8:08

Programming It: Repeated Addition Without Carry

The next program adds 1 to the register over and over. Address 0 holds ADD with an immediate of 1 (the instruction bit at 0, the data bit at 5 V). Address 1 holds JMP 0, so execution loops back.

Ichiken held the reset button, powered up, and released reset. On the first clock pulse, ADD A,1 runs. The register becomes 1, and the program counter moves to 1. On the next clock, JMP 0 runs. The program counter returns to 0, and the register is unchanged. On the clock after that, ADD runs again and adds 1 to a register that already holds 1. The adder has no carry, so 1 + 1 gives 0 and the register clears. The CPU keeps repeating this, and the register LED toggles on and off.

10:37

Overclocking at the Standard 5 V

Ichiken notes that whenever a project involves a homemade CPU, overclocking is the obvious next step. The demos ran at 1 Hz, and raising the input clock frequency counts as overclocking. The process's standard operating voltage is 5 V, so the first test was to find the maximum frequency at 5 V.

At 10 Hz the CPU clearly still worked. At 50 Hz it was visibly running but too fast to follow by eye, so Ichiken switched to an oscilloscope showing the clock, program counter, and register from top to bottom. The waveforms at 100 Hz matched the program as expected. Each rising clock edge alternated between ADD A,1 and JMP 0, and the register flipped between 1 and 0 because there is no carry.

The frequency went up to 1 kHz, 10 kHz, and 100 kHz with no trouble. At 1 MHz the CPU still ran, but the waveforms were quite distorted. Ichiken remarks that this is where transistor design really starts to matter. Above that, the edges became increasingly rounded, and in places the voltage no longer fell all the way to 0 V. At 3.0 MHz it was working "by a thread." At 3.1 MHz the register values started misbehaving. At the standard 5 V, then, the limit was reached at roughly 3 MHz.

13:24

Raising the Supply Voltage

Ichiken next increased the supply voltage. At 6 V the circuit responded more strongly and ran up to 3.7 MHz. At 7 V it reached 4.3 MHz.

At 8 V, Ichiken stopped probing the program counter and watched only the clock input and the register. They reasoned that dropping one probed waveform barely affects CPU operation but reduces loading on the circuit. With that change, the CPU ran up to 8.4 MHz at 8 V. Ichiken notes that the transistors themselves are guaranteed only up to 8 V. With voltage ripple, surges, and wiring effects included, the chip might already be seeing more than 8 V. Since it was still working, they carried on.

At 10 V, starting from 8.4 MHz and stepping up, the limit was 10.0 MHz. At 10.1 MHz the behavior became odd in places.

15:15

Power, Heat, and Where Ichiken Stopped

At 11 V, power consumption jumped. At 10 V the circuit drew roughly 65 mW, and at 11 V it drew about 170 mW (Ichiken also reads it as about 166 mW). The clock could go a little higher, to around 10.4 MHz.

At 12 V, power jumped to about 0.5 W at once, and Ichiken said it looked like the transistors might burn out. A thermal camera showed the chip visibly heating up. Ichiken adds a caveat: because other people's circuits share the same die and were also powered, some of the heat and power may come from those circuits. Judging the situation to be getting risky, they stopped there.

Closing Observations

Ichiken points out that the breadboard wiring to the 1-bit CPU is quite long. They suspect that a dedicated printed circuit board could let the chip run at a somewhat higher frequency, though this was not tested.

As for what the CPU can actually do, Ichiken admits it is essentially limited to blinking an LED. Their conclusion is that the project is still an interesting way to learn about semiconductor design and layout, especially in contrast with the far more labor-intensive analog op-amp chip from the previous project.