Puzzle 91 of 100

A ripple counter

Goal

Make Q1 and Q0 count 0, 1, 2, 3 and repeat, one step on each rising edge of CLK, with Q0 as the low bit. Both flip-flops already toggle; the second one has no clock yet.

Die
33 by 31 squares
Layers
Metal, Polysilicon, Contact, N active, P active, N well, Metal 2, Via
Inputs
CLK, CLKN
Outputs
Q0, Q1
Supply
VDD, VDD
Ground
GND, GND

Go to the solution

New in this puzzle

The flip-flops in this chapter

Each flip-flop is drawn for you. It copies D to Q when its clock CK rises, and QN is the inverse of Q. It takes the clock in both senses, CK and CKN, and holds its bit as charge on a gate, so its clock must keep running.

One stage clocks the next

A flip-flop whose QN feeds its D changes state on each rising edge of its clock, so its output runs at half the clock frequency. A second flip-flop clocked from the first runs at a quarter, and together they count in binary.

Guide

  1. Join QN0 to the CK line of the second flip-flop along the outlined path.
  2. Join Q0 to the CKN line of the second flip-flop, so that it receives its clock in both senses.

Hint

Join the CK line of the second flip-flop to QN0 and its CKN line to Q0. The second flip-flop then changes each time Q0 falls, which is on every second count.

Solution

This is the game's reference drawing for the puzzle. It meets the goal and passes the design rules. Other drawings can pass as well.

Top View of the solved die for puzzle 91, A ripple counter, with the Side View below it.
Top View of the solved die, captured from the game. Paths that carry a high level at the moment shown are lit. The Side View below cuts through the row between the dashed lines.
The game window in Isometric View with the solved die for puzzle 91, A ripple counter, the guide, and the scope.
The whole game window in Isometric View. The scope on the right compares each output with its target band, and the message above it confirms that the drawing passes.
Solution drawing for puzzle 91, A ripple counter, drawn on a numbered grid with every layer in its game color and pattern.
The solution on the grid. Squares are numbered from the top left corner, so you can count them. The dashed outline marks the squares you draw, change, or erase; the rest is drawn when the puzzle opens.

Legend

  • Metal269 squares
  • Polysilicon60 squares
  • Contact40 squares
  • N active22 squares
  • P active22 squares
  • N well90 squares
  • Metal 2310 squares
  • Via49 squares
  • Input padCLK, CLKN
  • Output padQ0, Q1
  • Supply padVDD, VDD
  • Ground padGND, GND
  • Squares you draw, change, or erase13 squares

About the drawing

  • The drawing uses 552 of the die's 1023 squares.
  • Part of the drawing is in place when the puzzle opens. To finish it, paint 12 empty squares and change 1 drawn square.
  • It forms 16 transistors: 8 N transistors and 8 P transistors. Each one is a place where polysilicon crosses active silicon.
  • 40 contacts join metal to the polysilicon or active silicon under it.
  • 49 vias join metal 2 to the metal under it.
Starting drawing for puzzle 91, A ripple counter, on a numbered grid.
The drawing when the puzzle opens. The dashed outline marks the squares the solution changes.