Skip to content

Commit 5d45c06

Browse files
thomasahleclaude
andcommitted
Add inline comments to modules-and-ports tb.sv
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cc41b35 commit 5d45c06

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • src/lessons/sv/modules-and-ports
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
module tb;
2-
logic [7:0] a, b, sum;
2+
logic [7:0] a, b, sum; // stimulus signals
3+
4+
// Instantiate the design under test, connecting ports by name
35
adder dut(.a(a), .b(b), .sum(sum));
6+
47
initial begin
5-
a = 8'd10; b = 8'd32;
6-
#1 $display("sum = %0d", sum);
8+
a = 8'd10; b = 8'd32; // apply inputs
9+
#1 $display("sum = %0d", sum); // wait 1 time unit, then print result
710
end
811
endmodule

0 commit comments

Comments
 (0)