Several processors

A design can hold several SAPHOs, each running its own program, joined by wires in a Verilog top level written by you. They pass values in two ways: links (toma/cade), one word at a time, the sender waiting until the receiver takes it; and FIFOs (myFIFO, myDCFIFO), a buffer of words between an output port and an input port.

The processor’s pins

yanc prog.cmm writes the module prog with only the pins its program uses:

pin

direction

what

clk, rst

in

the clock and the reset (active high)

in

in, #NUBITS

the word of the input port being read

req_in[p]

out, one bit per input port

1 in the clock cycle the program reads port p, when in must hold its word

out

out, #NUBITS

the word being written

out_en[p]

out, one bit per output port

1 in the clock cycle the program writes port p

itr

in

the #PRACA restart (see Directives)

cheguei

out

the #TOAQUI marker

link pins

below

All input ports share in: the top level puts on it the word of the port whose req_in bit is 1. All output ports share out: a port’s word is valid when its out_en bit is 1.

The word on out (and on toma_dado, below) comes straight from the processor’s ALU: a block that only stores it when out_en is 1 adds nothing to the clock, but a block that decodes or computes on it before a register makes the processor’s longest path longer. Register it first (GitHub issue #7 weighs a register inside the processor).

The warnings Quartus and Vivado give

Every opcode is a parameter and only what the program uses is built, so the synthesizers report, for any program, things that are not faults:

tool

warning

why, and what to do

Quartus

Critical Warning (127005): Memory depth (16) in the design file differs from memory depth (11) in the Memory Initialization File

a small memory (a few words, built in logic) is as deep as its address reaches, the .mif holds the program’s words only; the rest is set to 0 and never addressed. Nothing to do: padding the .mif would cost a block RAM on bigger programs

Quartus

Warning (10036): ... assigned a value but never read, (10030) on the font of myVGAText

a signal whose reader belongs to an operation the program does not use; the font is a read-only memory

Vivado

[Synth 8-7129] Port ... is either unconnected or has no load, [Synth 8-3936] ... trimmed, [Synth 8-6014]

the same: inputs of operations not built, divider stage registers with constant bits

Measured with Quartus 24.1 (Cyclone IV E and V) and Vivado 2025.2 (Zynq-7010) on 2026-10-21. A warning not in this table may be a real problem: say so in an issue.

FIFOs: myFIFO and myDCFIFO

A FIFO between an output port and an input port lets a writer go on without waiting for each word to be taken. The two FIFO blocks, their ports and how to wire them are in Peripherals.