Giter VIP home page Giter VIP logo

learn-fpga-programming's Introduction

FPGA Programming for Beginners

FPGA Programming for Beginners

This is the code repository for FPGA Programming for Beginners, published by Packt.

Learn FPGA Programming, published by Packt

What is this book about?

Field Programmable Gate Arrays (FPGAs) have now become a core part of most modern electronic and computer systems. However, to implement your ideas in the real world, you need to get your head around the FPGA architecture, its toolset, and critical design considerations. FPGA Programming for Beginners will help you bring your ideas to life by guiding you through the entire process of programming FPGAs and designing hardware circuits using SystemVerilog.

This book covers the following exciting features:

  • Understand the FPGA architecture and its implementation
  • Get to grips with writing SystemVerilog RTL
  • Make FPGA projects using SystemVerilog programming
  • Work with computer math basics, parallelism, and pipelining
  • Explore the advanced topics of AXI and serial interfaces
  • Discover how you can implement a VGA interface in your projects

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

always @(posedge CK) begin
 stage = D;
 Q = stage;
end

Following is what you need for this book: This FPGA design book is for embedded system developers, engineers, and programmers who want to learn FPGA and SystemVerilog programming from scratch. FPGA designers looking to gain hands-on experience in working on real-world projects will also find this book useful.

With the following software and hardware list you can run all code files present in the book (Chapter 1-11).

Software and Hardware List

Chapter Software required OS required
1-11 Xilinx Vivado 2020.1 Windows, Linux (Centos 7.4-7.7 or Ubuntu 18.04 or 20.04)
1-11 Nexys A7 Board Windows, Linux (Centos 7.4-7.7 or Ubuntu 18.04 or 20.04)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Errata

  • Page 24 (Paragraph 2, line 4) and Page 34 (Paragraph 1, line 2): Appendix should be github folder /CHx/build/ which contains the tcl file for non-project

Related products

Get to Know the Author

Frank Bruno is an experienced high-performance design engineer specializing in FPGAs with some ASIC experience. He has worked for companies such as SpaceX and Number Nine, and currently works as an FPGA engineer for Allstone Trading.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781789805413

learn-fpga-programming's People

Contributors

asicguy avatar nithikpackt avatar packt-itservice avatar packtutkarshr avatar rahuldsouzapackt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-fpga-programming's Issues

FAIL: AND Gate mismatch

Hi,

I am reading your book and I am trying to run simulation on Vivado 2022.1 for CH1's logic_ex example. However, it fails on checking and show "FAIL: AND Gate mismatch". I tried to set Project device to Nexys A7-100T and Arty A7-100, and the results are same. I wonder if you may advise.

bug in CH4/calculator_moore.sv

A bug in the author's Moore state machine program: undefined EQUAL state, causing the program to remain in WAIT4BUTTON state and crash.
add after line 61

last_op[Center]: state<=EQUAL;

add after line 80

EQUAL: begin
  last_op<=op_store; // Store our last operation
  state<=WAIT4BUTTON;
end

wrong code in CH4/traffic light

in the traffic_light.sv,
localparam COUNT_1S = int'(100000000 / CLK_PER); localparam COUNT_10S = 10 * int'(100000000 / CLK_PER);
because of 1s=1,000,000,000, so the code above lack of one 0.
and all the code don't include the localparam COUNT_1S, in the line 82 and 99 the COUNT_10S should change to COUNT_1S.

The explaination for new project setup is absent

In the book it is said:

Important note
To give you a jumpstart, all the projects in this book come complete with pre�set-up project files. Please see the appendix for instructions on setting up the 
first project in both project mode and non-project mode. This will guide you 
for setting up your own projects in the future.

I saw the errata but nothing in this folder is explaining how to setup a new project. Am I missing something?

CH5 Audio part - Possible sample counter overflow and test bench sine generation faulty

First of all I want to thank you for the book and its accompanying resources. Great introduction to FPGA programming!

I'm using Vivado 2023.2, and had it transform the project to its new directory structure.

When simulating the pdm_audio project I get the following sine in data_in:
image

After fixing this, it turns out that the interleaved sampling is not working as I expected.
The counter[0] and counter[1] signals are used such that the resulting amplitude_valid signal of one can even coincide with that of the other, resulting in an amplitude signal that is not ideal.
Hopefully the difference is clear in the following image:
Sampling not fixed:
image

Sampling fixed:
image

After fixing that, the resulting amplitude signal still had some weird bumps in it:
image

During analysis of this behavior I concluded that the sample_counter can overflow because it is a 7 bit counter, but there is an overflow occurring if all 128 m_clk ticks that it is counting m_data is asserted.
I fixed this by reducing the number of m_clk ticks that m_data is added to sample_counter.

Then the resulting data_in and amplitude signals are as follows:
image

I will see if I can create a Pull Request for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.