Challenge
- Open
CH2/SystemVerilog/build/challenge.xpr
orCH2/VHDL/build/challenge.xpr
. - Modify the lines in
challenge.sv
to implement a full adder:
SystemVerilog
assign LED[0] = ; // Write the code for the Sum
assign LED[1] = ; // Write the code for the Carry
VHDL
LED(0) = ; -- Write the code for the Sum
LED(1) = ; -- Write the code for the Carry
Modify tb_challenge.sv
to test it:
SystemVerilog
if () then // Modify for checking
VHDL
if … begin -- Modify for checking
Hint: You may want to jump ahead in the book at Chapter 3, Combinational Logic to look at addition or do a quick web search.