Verilog blocks
Write a block’s logic in Verilog: its ports become its pins and it runs with the circuit.
Place a Verilog block from Logic › Programmable and choose Edit Verilog… in the inspector. The module’s ports become the block’s pins: inputs on the left, outputs on the right. The editor checks the code as you type and marks the line with a mistake.
What it runs#
- Modules with ANSI or classic port lists, parameters and localparams.
wire,regandinteger, vectors up to 64 bits, and memories such asreg [7:0] mem [0:255].assign,always @*,always @(a or b),always @(posedge clk or negedge rst)andinitialblocks.begin … end,if/else,case,casezandcasex, andforloops with a fixed count.- Blocking (
=) and non-blocking (<=) assignments, with Verilog’s ordering between them. - Every operator: arithmetic, comparison, logic, reduction, shifts,
?:, concatenation and repeats, with Verilog’s width rules. 1'bzon an output lets go of the pin, for a tri-state bus.
How it meets the circuit#
Inputs switch at half of 5 V; outputs drive 0 or 5 V through 25 Ω. Clock edges are found to within a fraction of a step, as a gate’s are. Choose Vectors › One Pin per Bit to give a vector port a pin per bit instead of a bus pin.
Limits#
- Two-state values, 0 and 1, plus z on outputs; x reads as 0. Arithmetic is unsigned.
- One module per block: instances of other modules, functions, tasks and generate blocks aren’t supported, and the error says so.
- Delays (
#10) and system tasks ($display) are read and ignored; the block’s timing is the circuit’s. - VHDL and SystemC aren’t supported.
Applies to Coppa 0.1 Preview 14. Last updated 22 November 2026.