Second part of Video

This commit is contained in:
dan
2023-01-28 22:21:48 -05:00
parent 414f3212d1
commit 263d3a93db
4 changed files with 50 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
// module: button 0 lights up 2 leds, button 0 and 1 light up another
module full_adder (
// Inputs
input [1:0] pmod,
// Outputs
output [3:0] led
);
// Wire (net) declarations (internal to module)
wire not_pmod_0;
// Continous assignmen:replicate 1 wire to 2 outputs
assign not_pmod_0 = ~pmod[0];
assign led[1:0] = {2{not_pmod_0}};
// Continuous assignment: NOT and AND operators
assign led[2] = not_pmod_0 & ~pmod[1];
endmodule