HDL and verification basics
Đã giới thiệu| English | Ý nghĩa |
|---|---|
| synthesizable/ˈsɪnθəsaɪzəbl/ | Có thể tổng hợp |
| testbench/ˈtestbentʃ/ | Bảng kiểm thử |
HDL: describe hardware, verify by exhaustion
- Synthesizable code becomes gates (
assign,always @(*),posedge clk); delays and$displaylive only in the testbench. Simulation runs time; synthesis makes gates. - The exhaustive loop is the same 8-row check as the Karnaugh route, automated.
{exercise:uni-ee3x-hdl}

Which construct belongs ONLY in a testbench?
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Delays simulate but do not synthesise — hardware has no #10. Everything else becomes gates; the boundary is the discipline.
A testbench that checks a full adder against a second gate copy of the same design is —
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
The reference model must be independent - arithmetic (a+b+cin = 2*cout+sum) or a hand trace. A restated implementation hides the very bug you seek.
The 4-bit shift register q <= {q[2:0], sin} with sin = 1,0,1,1 over four clocks traces q as —
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Each edge shifts left and admits sin on the right - machine-simulated trace 0001, 0010, 0101, 1011. The concatenation IS the shift.