Hardware is built from blocks, and in SystemVerilog a block is a module. A module has a name, a list of ports (the wires that go in and out), and a body that describes what happens inside.
module buffer (
input logic a,
output logic y
);
assign y = a;
endmodule
Read it from top to bottom:
module buffer ( starts a block called buffer.input logic a is a 1-bit wire coming in.output logic y is a 1-bit wire going out.assign y = a; connects them: y always equals a.endmodule closes the block.assign is a permanent connectionassign does not run once like y = a in a program. It says "y is always driven by this expression". If a changes a million times, y follows it a million times. You can picture assign as soldering a wire.
On Gate Puzzles, every problem gives you the module header (the name and the ports) in the starter code. Your job is to fill in the body.
RTL for noobies: step 3 of 24.