Week 5 – System-level Design¶
Lecture 1¶
Two coding styles -
_next, _regof all registers seperatelyAXI Stream (
ready/validflow control)Converting a pipleined module to AXI Stream with
cen = !(m_valid && !m_ready)Problem -
readymust be combinational to freeze the module. Long combinational path when multiple modules chainedSolution: Skid Buffer
State machine, waveform…etc.
Latency and Throughput
SystemVerilog Gotchas
Activity: Find ALL Bugs in piplined
a*x + b. Fixes:<=inalways_ff,=inalways_combNever drive same signal from two
alwaysblocksDelay
bto match latency ofa * x$signed()on every operandSpelling mistake in port name creates a new wire implicitly
Arithmetic shift, not logical
Latch inference when skipping
else,case defaultAvoid driving/reading signals at the edge on testbenches
UART
Protocol
TX
RX
Lecture 2¶
Incremental CPU Design (8 opcodes, 40-lines of SV)
Memory module
Fetching instructions (PC)
Load data:
LOADStore data:
STOREALU operations:
MOV, ADD, SUB, MULJump instruction:
JNZ
Try programs:
Sum first N numbers
Fibonacci sequence
Factorial
Discussion¶
Presentations from students who did optimizations
Review for Final Exam