Parameters customize module instantiation
Can “tweak” modules for particular applications
Example: Variable bit widths
module comparator (a, b, c);
parameter width = 8;
input [width-1:0] a, b;
output c;
assign c = (a == b);
endmodule
...
comparator #(32) c32(w, x, p);
...
comparator #(4) c4(y, z, q);
...
Previous slide
Next slide
Back to first slide
View graphic version