Reader small image

You're reading from  FPGA Programming for Beginners

Product typeBook
Published inMar 2021
Reading LevelIntermediate
PublisherPackt
ISBN-139781789805413
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Frank Bruno
Frank Bruno
author image
Frank Bruno

Frank Bruno is an experienced high-performance design engineer specializing in FPGAs with some ASIC experience. He has experience working for companies like SpaceX, GM Cruise, Belvedere Trading, Allston Trading, and Number Nine. He is currently working as an FPGA engineer for Belvedere Trading.
Read more about Frank Bruno

Right arrow

Questions

  1. 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.

  2. 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.

  3. 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?
  4. Modify the code and testbench to test the following gates: NAND (not AND), NOR (not OR), and XNOR (not XOR). 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

  1. Open CH1/build/challenge.prj.
  2. 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 
  3. 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.

Previous PageNext Page
You have been reading a chapter from
FPGA Programming for Beginners
Published in: Mar 2021Publisher: PacktISBN-13: 9781789805413
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Frank Bruno

Frank Bruno is an experienced high-performance design engineer specializing in FPGAs with some ASIC experience. He has experience working for companies like SpaceX, GM Cruise, Belvedere Trading, Allston Trading, and Number Nine. He is currently working as an FPGA engineer for Belvedere Trading.
Read more about Frank Bruno