CRAFT cycle · 2.5 hours · Fri 5/29 · Week 1 close
HDL for Digital System Design · UCF ECE · Barcelona Summer 2026
| Phase | Time | Activity |
|---|---|---|
| 🌍 Contextualize | 10 min | Barcelona clocked systems · Sagrada photos recap |
| ⚠️ Reframe | 15 min | posedge · <= vs = · RTL = count the assigns |
| 🛠 Assemble | 70 min | D-FF · loadable register · counter · LED blinker from 25 MHz |
| 🛡 Fortify | 45 min | Sim + GTKWave · AI sanity check · on-board verify |
| 🔗 Transfer | 10 min | Week 1 recap · weekend video (D5+D6 merged) |
▸ Phase 1 of 5 · ~10 min
Barcelona on a clock
Yesterday's combinational logic had no notion of "when." Today: time itself becomes an input.
Project a few student photos from yesterday. Ask: "Where in the basilica do you see something that has memory of what came before?" Spoiler: almost nothing. The shape is combinational. Today we add the parts that do remember.
▸ Phase 2 of 5 · ~15 min
The one rule that prevents almost every Day-4 bug
"Lines inside always @(posedge clk) execute top-to-bottom, like statements in a function."
Every assignment in an always @(posedge clk) describes what happens on a single clock edge, all at once. The order of nonblocking (<=) assignments doesn't change the hardware.
= in always @(*).<= in always @(posedge clk).<= updates (q2 <= q1; q1 <= d;) shift data one stage per edge — a real shift register. Swap to = and q2 grabs the new q1, collapsing the pipeline. This is why <= is the rule in clocked blocks.
always @(posedge clk) begin
if (rst) begin
q1 <= 0; // ← FF #1
q2 <= 0; // ← FF #2
cnt <= 0; // ← FFs (one per bit of cnt)
end else begin
q1 <= d;
q2 <= q1; // shift-register stage
cnt <= cnt + 1;
end
end
Three <= targets ⇒ three storage elements. cnt is N flip-flops where N = bit-width.
▸ Phase 3 of 5 · ~70 min · You build
From one FF to a visible blinker
en and load. Implicit feedback when disabled.module dff (
input wire clk, rst, d,
output reg q
);
always @(posedge clk) begin
if (rst) q <= 1'b0;
else q <= d;
end
endmodule
Three lines of behavior. One flip-flop in the netlist. This is the atom of all sequential logic.
d to a button, clk to the 25 MHz pin. The LED reflects the button — but only at clock edges. Press fast — see the sampling.
module blinker (
input wire clk, // 25 MHz from Go Board
output reg led
);
localparam HALF_PERIOD = 12_500_000; // 0.5 s
reg [23:0] cnt;
always @(posedge clk) begin
if (cnt == HALF_PERIOD - 1) begin
cnt <= 0;
led <= ~led;
end else begin
cnt <= cnt + 1;
end
end
endmodule
24-bit counter (224 = 16 777 216 > 12 500 000). The toggle pattern is the canonical "slow event from a fast clock."
▸ Phase 4 of 5 · ~45 min · Verify · waveform · AI check
Sequential logic earns sequential proof
cd labs/week1_day04/ex1_dff/starter
iverilog -o dff_tb dff.v dff_tb.v
vvp dff_tb # generates dump.vcd
gtkwave dump.vcd # add clk, d, q to viewer
q change only on the rising edge of clk? Look — don't assume.q sample the value of d at the edge, not before or after?q low immediately on the next edge?HALF_PERIOD to 5 in sim — watch the counter wrap and the LED toggle.Prompt: Ask an AI (ChatGPT, Claude, Copilot — pick one) to explain the difference between blocking (=) and nonblocking (<=) assignment in Verilog.
= in always @(*), <= in always @(posedge clk)"?en low → output frozen even when d changes.▸ Phase 5 of 5 · ~10 min · Week 1 closes
What four days bought you
D1 Concurrent mental model. Toolchain. LED on hardware.
D2 Vectors, muxes, hierarchy. Adder + 7-seg decoder.
D3 Procedural combinational. Latch trap. First PPA compare. ALU.
D4 Clocked logic. RTL counting. You can now build any clocked digital circuit.
Monday is the merged D5+D6 session — counters + testbenches + the deep dive on AI-assisted verification.
Monday afternoon: Semidynamics visit — RISC-V vector processor startup, RTL meets commercial silicon.
🔗 End of Week 1 · Buen fin de semana
Four days. Four working boards. One mental model that fits all of hardware.
Week 2: verification, AI, and the visits that show you why this matters.