1 / 24

Introduction to FPGAs Getting Started with Xilinx

Learn the basics of FPGA programming with concepts such as binary numbers, Verilog language, clocks, counter creation, and visualizing designs. Dive into Xilinx tools and start hands-on learning.

emccloskey
Download Presentation

Introduction to FPGAs Getting Started with Xilinx

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to FPGAs Getting Started with Xilinx

  2. Digital Design • Everything is represented in two discrete values: “0” and “1” • We use low and high voltages to represent these values • Use binary arithmetic and boolean math

  3. Binary Numbers • Converting decimal to binary: • 11 / 2 = 5 remainder 1 • 5 / 2 = 2 remainder 1 • 2 / 2 = 1 remainder 0 • 1 / 2 = 0 remainder 1 • Read it from bottom to top: 1011

  4. Binary Numbers • Converting from binary to decimal • Every digit represents a power of two • Note that we start with 20 (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20) = 11

  5. What is an FPGA? • Field Programmable Gate Array • Hardware that can be customized • Can be programmed to do just about anything you want them to do.

  6. Verilog • HDL (Hardware Descriptive Language) • Allows one to create designs using a text language • One “lays out” the design

  7. Clocks • Clocks define the time element of a design • Clocks alternate between high and low in a square wave Time

  8. Clock Edges • We are only concerned with clock edges usually • Edges are simply where a transition takes place Time

  9. A Simple Counter • We will create a design that counts up on every clock edge • Will store the value in a piece of hardware called a “register” (think memory) • We will use an 8-bit number, representing 28 = 256 different values

  10. Counter clock counter_value A Simple Counter • “Black box” – should have inputs and outputs • Focus on “what” not “how”

  11. The Code module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; always @(posedge clock) begin counter = counter + 1; end endmodule

  12. The Code • “module” declaration specified what the inputs and outputs are module counter( clock, counter_value ); input clock; output [3:0] counter_value; … endmodule

  13. The Code • “reg” keyword makes a register. We use the bracket notation to specify how big the number is • Since we’re using 4 bits, we can represent 24 values, meaning we can count from 0 to 15. • 0000, 0001, 0010, 0011, 0100, etc. reg [3:0] counter;

  14. The Code • “always” specifies that we want to do something whenever a change occurs • In our case, anytime the clock goes from low to high, increment the counter always @(posedge clock) begin counter = counter + 1; end

  15. Visualizing The Code • Concurrency – Everything happens at once • Verilog code turns into real hardware

  16. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; endmodule counter value

  17. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; endmodule counter counter value

  18. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; endmodule counter counter value

  19. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; always @(posedge clock) begin counter end endmodule counter counter value

  20. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; always @(posedge clock) begin counter = end endmodule counter counter value

  21. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; always @(posedge clock) begin counter = counter + end endmodule counter Adder counter value

  22. Visualizing The Code clock module counter( clock, counter_value ); input clock; output [3:0] counter_value; reg [3:0] counter; assign counter_value = counter; always @(posedge clock) begin counter = counter + 1; end endmodule counter Adder 1 counter value

  23. Tools Of The Trade • Xilinx Software – ISE (Integrated Software Environment) • Allows us to create designs • Does all the grunt work of turning our code into physical hardware • We program the chip through ISE

  24. Hands On • Next session will be a walkthrough of the hardware • We’ll get to program an actual counter

More Related