Barcelona Abroad · Week 4 · Day 14  🛠 Build Day  🤖 AI TB  📊 PPA

Project Integration & PPA

CRAFT cycle · 2.5 hours · Tue 6/16 · The most Assemble-heavy day in the course

HDL for Digital System Design · UCF ECE · Barcelona Summer 2026

CRAFT

Today at a Glance

PhaseTimeActivity
🌍 Contextualize10 minMetro visit share-out · integration vs module-by-module
⚠️ Reframe15 min"Compiles" ≠ "done" · the four-gate ship checklist
🛠 Assemble90 minProject build · 3 checkpoints · pair-debug
🛡 Fortify30 minPPA snapshot · AI TB run · hardware-on-board sanity
🔗 Transfer5 minDemo rehearsal prep · what to bring Thursday
120 min in Assemble + Fortify. No new content today — every minute is yours. Use it.

▸ Phase 1 of 5  ·  ~10 min

🌍 Contextualize

Yesterday's visit · today's discipline

Yesterday You Saw the Brain · Today You Wire Your Own

  • The Metro Control Room runs on the same primitives you've been building: FSMs · serial links · memory · timers.
  • The difference between their system and yours is discipline, not concepts. They test before deployment. They verify edge cases. They report PPA in design reviews.
  • Today you adopt the same discipline. Compile is not done. Sim-pass is not done. Tested-on-board with a self-checking TB + PPA + AI-audited TB is done.

Share-out (3 min)

Each pair: one sentence on which Metro observation changed your project plan. Quick — we're moving to Assemble fast today.

▸ Phase 2 of 5  ·  ~15 min

⚠️ Reframe

Synthesis is the beginning · not the end

⚠️ "It Compiles, I'm Done"

❌ Programmer's Definition of Done

It compiled. The sim showed something on the waveform. I'm done.

✓ Engineer's Definition of Done

Synthesizes clean. Self-checking TB passes. Fmax meets target. Fits the FPGA. Works on real silicon. AI-generated TB hits every input combo.

At Semidynamics, "done" means the verification team signed off. At HP, "done" means it passed regression. Here, "done" is your checklist below.

The Four-Gate Ship Checklist

GateToolPass criterion
1. Functionaliverilog + self-checking TBAll scripted cases PASS · 0 unexpected output
2. Code qualityreview against conventionsr_/w_/i_/o_ prefixes · parameterized · readable
3. PPAyosys stat + nextpnrLUTs/FFs reported · Fmax recorded · fits the iCE40
4. HardwareGo BoardThe thing it's supposed to do, on real silicon
5. AI TBClaude/GPT + auditPrompt + raw output + corrections + coverage note
Demo Day on Thursday grades all five. Today you close as many as you can — and tomorrow's RISC-V lecture gives you a quiet morning to finish the rest before Thursday.

▸ Phase 3 of 5  ·  ~90 min  ·  Build · three checkpoints

🛠 Assemble

Heads down · structured but yours

Build Plan — 3 Checkpoints

  1. CP1 · 30 min  Core module compiles & simulates. Your top-level module elaborates, your manual TB runs, you see waveforms that match your spec. Instructor walks the room — if you're stuck >10 min, pair-debug now.
  2. CP2 · 30 min  Self-checking TB covers the core · AI TB drafted. Test the contracts your design has to honor (state never overflows, output stable while busy, etc.) with directed checks. Kick off the AI TB prompt in parallel.
  3. CP3 · 30 min  Synthesizes · yosys stat · placed by nextpnr. Numbers in your README. Fmax recorded. If you're here, you're on the demo rubric green path.

Hardware deploy (gate 4) can slip to Wednesday morning — but only if gates 1–3 clear today.

Suggested Build Pattern (Per Module)

// 1. Sketch ports + parameters first — no logic yet
module my_project_core #(
    parameter WIDTH        = 8,
    parameter CLKS_PER_BIT = 217
)(
    input  wire             clk, rst,
    input  wire [WIDTH-1:0] data_in,
    input  wire             start,
    output reg  [WIDTH-1:0] result,
    output reg              done
);

    // 2. Name your states next (FSMs only) — localparam, 3-block style
    localparam IDLE = 2'd0, BUSY = 2'd1, DONE_S = 2'd2;
    reg [1:0] state, nstate;

    // 3. THEN logic — the 3 always blocks from Day 7
    always @(posedge clk)  /* state register */ ;
    always @(*)            /* next-state + output logic */ ;

endmodule

Skeleton first. Logic second. Self-checking testbench third (Day 5+6 pattern: apply → wait → !== compare → PASS/FAIL). This is the order that lets you compile early and often.

🤖 AI TB — Run It in Parallel

Prompt template: "Generate a self-checking Icarus-compatible testbench for the module below. Cover: nominal flow, reset mid-operation, back-to-back starts, max-WIDTH inputs, illegal opcodes if any. Use $urandom_range(). Print a PASS/FAIL summary at the end. Module: <paste your ports + brief spec>."

  • Fire the prompt at the start of CP2. The AI works while you write your own self-checking testbench.
  • Audit it at the start of CP3. Common issues: wrong reset polarity · forgot $dumpfile · stimulus that never crosses module's actual boundary cases.
  • Save: prompt.txt + tb_ai_raw.v + tb_ai_fixed.v + corrections.md. This is the AI portfolio deliverable.

If You Get Stuck — The 3-Strike Rule

  1. Strike 1 (5 min): Re-read your own code aloud. Half of bugs surface here.
  2. Strike 2 (5 min): Print 3 things: signal value, state value, cycle count. $display beats debugger 80% of the time.
  3. Strike 3 (10 min max): Pair up. Find anyone whose project is in CP3 — they're warm enough to context-switch into yours.
  4. After 20 min stuck: raise your hand. Instructor budget is finite — use it.
Today is the only structured build session. If you spend it stuck, demo day gets ugly. Trigger help-seeking early.

▸ Phase 4 of 5  ·  ~30 min  ·  PPA · AI audit · hardware

🛡 Fortify

Numbers + evidence · the demo-day rubric

The Build-Day PPA Snapshot

$ yosys -p "read_verilog *.sv; synth_ice40 -top my_project_core; stat" 2> ppa.log
$ grep -E "(Number of cells|SB_LUT4|SB_DFF)" ppa.log

$ nextpnr-ice40 --hx1k --json out.json --pcf go_board.pcf \
                --asc out.asc --freq 25 2> pnr.log
$ grep "Max frequency" pnr.log

Paste the numbers into your README:

MetricValueTarget / note
LUTs (SB_LUT4)___iCE40-HX1K has 1280
FFs (SB_DFF)___iCE40-HX1K has 1280
Fmax___ MHz≥25 MHz for Go Board clock
Utilization___ %<80% recommended

AI TB Audit — The 4 Coverage Gaps

  • Boundary values — did the TB hit 0, max, and max-1 for every input?
  • Reset mid-operation — does it assert rst_n at a non-trivial cycle?
  • Back-to-back — does it issue start the cycle after done?
  • Illegal inputs — does it intentionally feed your DUT garbage and check graceful handling?
Add a paragraph to corrections.md: "The AI's TB missed X. I added Y to cover it. Re-running surfaced Z." — that paragraph is the AI portfolio deliverable.

Hardware-on-Board — The 5-Minute Check

  1. make · iceprog out.bin · the board takes the bitstream
  2. Press the input · the output does the thing
  3. Toggle reset · the output recovers
  4. Hit it again 10x · still works

If hardware deploy slips past today, that's OK — you have Wednesday morning. What you cannot skip: gates 1, 2, 3, 5 by end-of-class today.

Record a 30-second phone video of your hardware working. It's your demo backup if the board acts up Thursday.

▸ Phase 5 of 5  ·  ~5 min  ·  Demo prep · ¡a por ello!

🔗 Transfer

Tomorrow · listen · Thursday · ship

Tomorrow + Thursday

Wed AM 6/17🎓 RISC-V guest lecture — David Castells Rufas (UAB) · come with 2 prepared questions
Wed PM 6/17Open lab · finish anything from today's checklist that slipped · rehearse your 5-min demo
Thu 6/18🎤 Demos — 5-min live + 2-min Q&A · then course wrap & AI portfolio share-out
Fri 6/19Departure / free day · final reflection due 5pm
Tonight: push everything from today. Pull request optional but encouraged — it's the diff your demo walks through.

Demo Rehearsal — Practice the 5 Minutes Tonight

SegmentTimeWhat to say
Context1 minWhat does it do? Why does it matter? (Metro-flavored hook OK.)
Live demo1–2 minThe thing working on the Go Board · backup video ready
Testbench1 minOne waveform · your self-checking TB catching a bug-injected variant
Trade-off1 minOne architectural decision · "I chose X over Y because…"
PPA + AI30 sLUTs · FFs · Fmax · one AI TB correction
Lessons30 sOne surprise · one thing you'd change

Rehearsal out loud beats rehearsal in your head. Record a phone video, watch it back once, fix the worst 30 seconds.

🔗 Build day closed · ¡vamos!

Compile. Test. Synthesize.
Ship.

Tomorrow you hear how RISC-V cores get built using the same primitives you just wired together. Thursday you stand up and show what you made. The hardest day of the course is the day you commit to all of it.

CRAFT