Signal Processing using FPGAs Carl Leuschen Instructor: Zoom, by - - PowerPoint PPT Presentation

signal processing using fpgas
SMART_READER_LITE
LIVE PREVIEW

Signal Processing using FPGAs Carl Leuschen Instructor: Zoom, by - - PowerPoint PPT Presentation

Signal Processing using FPGAs Carl Leuschen Instructor: Zoom, by appointment Office Hours: Location/Time: 3150 Learned, 9-9:50 AM MWF Webpage: people.eecs.ku.edu/~leuschen/ *syllabus* email: leuschen@ku.edu Signal Processing using FPGAs


slide-1
SLIDE 1

Signal Processing using FPGAs

Instructor: Office Hours: Carl Leuschen Zoom, by appointment Location/Time: 3150 Learned, 9-9:50 AM MWF Webpage: email: people.eecs.ku.edu/~leuschen/ *syllabus* leuschen@ku.edu

slide-2
SLIDE 2

Signal Processing using FPGAs

T ext: DSP with FPGAs, U. Meyer-Baese (**PDF free at at KU Library – no need not purchase a book). Assorted Datasheets, User Guides, and Application Notes. Red Pitaya 125-14 Kit

  • Dev. Board:
slide-3
SLIDE 3

Signal Processing using FPGAs

Backgound Concepts: Prerequisites

Digital Logic Design 140/443 Combinational Sequential Timing (Set-up and Hold) HDL Programming (VHDL, Verilog) Digital Signal Processing 360/x44 Signals and Systems Linearity Impulse Response z-Transform Convolution FIR and IIR Filters Fourier Transforms (FFTs) System Controller (MCU): Programming 168/388 Some knowledge of Linux? (will discuss later)

slide-4
SLIDE 4

EECS 700: DSP w/FPGAs

  • Reading Assignment
  • Browse Red Pitaya Documentation

https://redpitaya.readthedocs.io/en/latest/index.html 7-Series Family Overview & Zynq TRM

  • Homework #0 (Due ASAP) – nothing to turn in

1. Gain access to Xilinx Vivado (personal computer – free download, EECS Computer locally and through Citrix) 2. Go through tutorial #1 to create a bootable SD card and boot up the board. 3. Get a copy of the textbook (pdf version).

slide-5
SLIDE 5

Basic Components of an FPGA

  • Input and Output
  • Need to get electrical signal in and out of the device
  • Pad: physical connection
  • Buffers and Transceivers
  • Conditions the signal
  • Isolates inputs and outputs
  • Supports high-speed protocols
  • Routing
  • Connects components to each other
  • Switches
  • Logic Elements
  • Where the function is implemented (LUTs, FF)
  • Device Specific Components
  • DSP, Block Memory, Processors, PLL
slide-6
SLIDE 6

Input Output Pads & Logic Buffers, Delays, (De)Serializers Interconnects & Switches Configurable Logic Elements (CLE) Clock Regions Clock Distribution Clock Management Tiles (CMT) Digital Clock Managers (DCM) Phase-Locked Loops (PLL) Block RAM (BRAM) Digital Signal Processor (DSP) Memory Controllers (MCB) Spartan-6 LX9 CSG324

Device used previous semesters.

slide-7
SLIDE 7

Last time course was taught

slide-8
SLIDE 8

The current state of the art? At least for DSP, Radar, Comms, 5G …

Common Peripherals Flash Memory Com (Serial) Port PCIe, USB, SD, SATA I2C,CAN, … Integrated Mixed Signal Multi-Channel ADC Multi-Channel DAC Synchronous CPUs Quad-Core ARM Dual-Core ARM ***Linux*** FPGA Custom Peripherals Hardware co-processor Signal Processing

slide-9
SLIDE 9

Red Pitaya 125-14 Board

slide-10
SLIDE 10

Components

slide-11
SLIDE 11

Software Tools

Synthesis & Placement: Vivado Simulator: ISim Schematic Viewers: RTL and Hardware Layout Viewers: FPGA Editor and PlanAhead Logic Analyzer: Chipscope Intellectual Property: Core Generator Embedded Processor: XPS and SDK Constraints Editor Timing Analyzer Power Analyzer

slide-12
SLIDE 12

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-13
SLIDE 13

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-14
SLIDE 14

Design Example 1

  • Basic Combinational Circuit
  • Design Specifics
  • 4 input DIP switches: switch[3:0]
  • 4 output LEDs: led[3:0]
  • Functional description ...
slide-15
SLIDE 15

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device
  • Chipscope logic analyzer (third level of debug)
slide-16
SLIDE 16

Design Example 1: Vivado Project

  • Start Vivado, File → New Project.
  • Set Name and Location, Next.
  • RTL Project, Next.
  • Choose Device, Next
  • From Nexys-4 User Guide.
  • Check the Project Properties.
  • Finish.
slide-17
SLIDE 17

The Vivado Window Layout

NEW Design File

slide-18
SLIDE 18

The Vivado Window: Add Sources

slide-19
SLIDE 19

Design Files: example_01.vhd

library IEEE; use IEEE.STD_LOGIC_1164.all; entity example_01 is port ( switch: in STD_LOGIC_VECTOR(3 downto 0); led: out STD_LOGIC_VECTOR(3 downto 0) ); end example_01; architecture behavioral of example_01 is begin led(3) <= switch(2); led(2) <= switch(3) and switch(2); led(1) <= switch(3) or switch(2); led(0) <= '0'; end behavioral;

slide-20
SLIDE 20

In Verilog

module example_01 ( input wire [3:0] switch,

  • utput wire [3:0] led);

assign led[3] = switch[2]; assign led[2] = switch[3] & switch[2]; assign led[1] = switch[3] | switch[2]; assign led[0] = 1’b0; endmodule

slide-21
SLIDE 21

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-22
SLIDE 22

Synthesize

slide-23
SLIDE 23

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-24
SLIDE 24

Schematic

slide-25
SLIDE 25

Schematics

slide-26
SLIDE 26

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-27
SLIDE 27

Simulation Files: example_01_tb.vhd

library IEEE; use IEEE.STD_LOGIC_1164.all; entity example_01_tb is end example_01_tb; architecture simulation of example_01_tb is component example_01 port ( switch: in STD_LOGIC_VECTOR(3 downto 0); led: out STD_LOGIC_VECTOR(3 downto 0) ); end component; signal switch_tb: STD_LOGIC_VECTOR(3 downto 0) := "0000"; signal led_tb: STD_LOGIC_VECTOR(3 downto 0); begin dut: example_01 PORT MAP ( switch => switch_tb, led => led_tb ); stim_proc: process begin wait for 100 ns; switch_tb <= "1010"; wait for 100 ns; switch_tb <= "0101"; wait; end process; end;

No more VHDL coding.

slide-28
SLIDE 28

In Verilog

`timescale 1ns/1ps module example_01_tb; reg [3:0] switch; wire [3:0] led; example_01 dut ( .switch(switch), .led(led)); initial begin #100; switch = 4’b1010; #100; switch = 4’b0101; #100; end endmodule

slide-29
SLIDE 29

Simulate Testbench

slide-30
SLIDE 30

Results

slide-31
SLIDE 31

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-32
SLIDE 32

Constraints File: example_01.xdc

set_property PACKAGE_PIN U9 [get_ports {switch[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {switch[0]}] set_property PACKAGE_PIN U8 [get_ports {switch[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {switch[1]}] set_property PACKAGE_PIN R7 [get_ports {switch[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {switch[2]}] set_property PACKAGE_PIN R6 [get_ports {switch[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {switch[3]}] #set_property -dict { PACKAGE_PIN U9 IOSTANDARD LVCMOS33 } [get_ports { switch[0] }]; #set_property -dict { PACKAGE_PIN U8 IOSTANDARD LVCMOS33 } [get_ports { switch[1] }]; #set_property -dict { PACKAGE_PIN R7 IOSTANDARD LVCMOS33 } [get_ports { switch[2] }]; #set_property -dict { PACKAGE_PIN R6 IOSTANDARD LVCMOS33 } [get_ports { switch[3] }]; set_property PACKAGE_PIN T8 [get_ports {led[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[0]}] set_property PACKAGE_PIN V9 [get_ports {led[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[1]}] set_property PACKAGE_PIN R8 [get_ports {led[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}] set_property PACKAGE_PIN T6 [get_ports {led[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[3]}] #set_property -dict { PACKAGE_PIN T8 IOSTANDARD LVCMOS33 } [get_ports { LED[0] }]; #set_property -dict { PACKAGE_PIN V9 IOSTANDARD LVCMOS33 } [get_ports { LED[1] }]; #set_property -dict { PACKAGE_PIN R8 IOSTANDARD LVCMOS33 } [get_ports { LED[2] }]; #set_property -dict { PACKAGE_PIN T6 IOSTANDARD LVCMOS33 } [get_ports { LED[3] }];

slide-33
SLIDE 33

Implement Design

slide-34
SLIDE 34
slide-35
SLIDE 35

INIT = 4’h8?????

slide-36
SLIDE 36

FPGA Development Process

  • High level block diagram and design
  • Describes how parts are connected (Structural)
  • Describes how parts work (Functional)
  • Develop the code (Verilog, VHDL, Schematic)
  • Synthesize and Simulate (device independent)
  • Schematics (RTL and Synthesized)
  • Write a test-bench to simulate (first level of debug)
  • Place and Route (device specific)
  • Constraints (pin locations, clock speeds, timing req.)
  • Simulate (second level of debug)
  • Generate a programming file (.bit)
  • Program the device.
  • Chipscope logic analyzer (third level of debug)
slide-37
SLIDE 37

Programming File & Programming