Questions
- When might you use an FPGA?
a) You are prototyping an application that may eventually be an ASIC.
b) You will only have very small volumes.
c) You need something that you can easily change the algorithms on in the future.
d) All of the above.
- When would you use an ASIC?
a) You are developing a very specialized application, with just a small number to be built and the budget is tight.
b) You've been asked to design a calculator that will be mass produced and that requires a custom processor.
c) You need something extremely low power and cost is not a consideration.
d) You are developing an imaging satellite and want the ability to update the algorithms over the lifetime of the satellite.
e) a and b.
- We have seen a full adder in the chapter. A half adder is a circuit that can add two inputs, in other words, no carry in. Can you write the truth table for the sum and carry for a half adder?
- Modify the code and testbench to test the following gates:
NAND
(notAND
),NOR
(notOR
), andXNOR
(notXOR
). Hint: You can invert a unary operator by adding a~
operator in front of it, in other words,NAND
is~&
. Try it on the board.
Challenge
- Open
CH1/build/challenge.prj
. - Modify the lines in
challenge.sv
to implement a full adder:  assign LED[0]  = ; // Write the code for the Sum   assign LED[1]  = ; // Write the code for the Carry
- Modify
tb_challenge.sv
to test it:Â Â Â Â if () begin // Modify for checking
Hint: You may want to jump ahead in the book to look at addition or do a quick web search.