Syscall 2: Firmware, home

SignalChapter 12: Shared buses

94ROLL CALL

The task

a, b, c, and d share a bus. X arrives at a.

P on b, Q on c, and R on d must each receive every value of X.

The board

The board of ROLL CALL4 cores: a, b, c, and d. Inputs X; outputs P, Q, and R. 1 shared bus.aSC-2 15 LINESbSC-2 15 LINEScSC-2 15 LINESdSC-2 15 LINESP0P1P0P1P0P1P0P1XPQR
The board as the puzzle screen lays it out. Cyan pins read, lemon pins write, violet pins go both ways. On a narrow screen, scroll the board sideways to see all of it.

Key idea

Three readers want every value: a reader on the left must rest, or it takes the copy meant for one on its right.

Hints

Each hint goes a step further than the one before. Open them one at a time.

Hint 1Show

a sends each X three times, and each copy goes to the first core that reads it.

Hint 2Show

When b and d both read, b takes the copy: it is farther left.

Hint 3Show

A core that has its copy can wait before it reads again, and leave the bus to the others.

Solution

Reveal the Full SolutionThe complete program for ROLL CALL. Open it only when you want the answer.

The reference program

The game's own solution. It passes every test and scores exactly par on every benchmark.

aSC-2 standard

IN P0
OUT P1
OUT P1
OUT P1

bSC-2 standard

IN P0
OUT P1
NOP
NOP

cSC-2 standard

IN P0
OUT P1

dSC-2 standard

IN P0
OUT P1
CYCLES
276
at par
ENERGY
2808
at par
NODES
4
at par
INSTRUCTIONS
12
at par