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. A packed array is used to infer memories. True or false?
  2. A break statement can be used in a for loop when?

    a) Any time.

    b) If it's possible to rewrite the for loop in such a way as to not need the break.

    c) Only if you can reverse the direction of the loop; that is, go from low to high instead of high to low.

  3. Size the add_unsigned, add_signed, and mult signals:
    Logic unsigned [7:0] a_unsigned;
    logic unsigned [7:0] b_unsigned;
    logic signed [7:0] a_signed;
    logic signed [7:0] b_signed;
    assign add_unsigned = a_unsigned + b_unsigned;
    assign add_signed = a_signed + b_signed;
    assign mult = a_unsigned * b_unsigned;
  4. Division is a very costly operation. Look at the supported Vivado constructs in the Vivado Synthesis manual (Further reading). Can you easily replace the multiply operation with a division operation? What is possible without custom code?

Challenge

Look at the following add_sub module:

  logic signed [BITS/2-1:0]   ...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
FPGA Programming for Beginners
Published in: Mar 2021Publisher: PacktISBN-13: 9781789805413

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