Skip to content

Instantly share code, notes, and snippets.

@paranlee
Last active December 5, 2021 15:13
Show Gist options
  • Select an option

  • Save paranlee/f0cb776a31688e0b53d5d6fd1b77e0fa to your computer and use it in GitHub Desktop.

Select an option

Save paranlee/f0cb776a31688e0b53d5d6fd1b77e0fa to your computer and use it in GitHub Desktop.
fulladder.v
module fulladder #(
parameter width = 2
) (
input [width:0] a,
input [width:0] b,
input c_in,
output c_out,
output [width:0] sum
);
assign { c_out, sum } = a + b + c_in;
endmodule
iverilog -o fulladder.o fulladder.v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment