FPGA design with National Instuments

Similar documents
Agenda. Programming FPGAs Why Are They Useful? NI FPGA Hardware Common Applications for FPGAs How to Learn More

Simplify System Complexity

Running OPAL-RT s ehs on National Instruments crio: Sub-microsecond power-electronic simulation

Simplify System Complexity

Developing Measurement and Control Applications with the LabVIEW FPGA Pioneer System

Increase Your Test Capabilities with Reconfigurable FPGA Technology

How to validate your FPGA design using realworld

New Software-Designed Instruments

High-Level Synthesis with LabVIEW FPGA

FlexRIO. FPGAs Bringing Custom Functionality to Instruments. Ravichandran Raghavan Technical Marketing Engineer. ni.com

Don t Think You Need an FPGA? Think Again!

Making the Most of your FPGA Design

Chapter 2 LabVIEW FPGA

Field Programmable Gate Array

Chip Design with FPGA Design Tools

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

ni.com Best Practices for Architecting Embedded Applications in LabVIEW

Method We follow- How to Get Entry Pass in SEMICODUCTOR Industries for 3rd year engineering. Winter/Summer Training

Introduction to LabVIEW and NI Hardware Platform

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Best Practices for Architecting Embedded Applications in LabVIEW Jacques Cilliers Applications Engineering

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

FPGA for Software Engineers

VHDL for Synthesis. Course Description. Course Duration. Goals

Graphical Programming and Implementation of the NI and NI-5781 FPGA Interface

CCE 3202 Advanced Digital System Design

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

Field Program mable Gate Arrays

FPGAs in a Nutshell - Introduction to Embedded Systems-

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Application State Machine

LabVIEW 2009 Real-Time & FPGA 最新技術剖析. National Instruments 美商國家儀器 行銷部技術經理吳維翰

Lecture 12 VHDL Synthesis

High Performance Embedded Applications. Raja Pillai Applications Engineering Specialist

Field Programmable Gate Array (FPGA)

LabVIEW FPGA Module Release and Upgrade Notes

PINE TRAINING ACADEMY

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

Designing Real-Time Control Applications Using LabVIEW and CompactRIO. Developer Days 2009

Quartus Counter Example. Last updated 9/6/18

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

NI-DAQmx Basic Course NITS John Shannon

Midterm Exam. Solutions

TRAFFIC LIGHT CONTROLLER USING VHDL

MOIS Overview. 1. Developer Walkthrough

Chapter 9: Integration of Full ASIP and its FPGA Implementation

Developing a Data Driven System for Computational Neuroscience

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Graphical System Design for Machine Control

CMPE 415 Programmable Logic Devices Introduction

VHX - Xilinx - FPGA Programming in VHDL

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

Embedded Vision Systémy - využití ve výuce a v průmyslu

Advanced Synthesis Techniques

Nikhil Gupta. FPGA Challenge Takneek 2012

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

[VARIABLE declaration] BEGIN. sequential statements

System-level Synthesis of Dataflow Applications for FPGAbased Distributed Platforms

PALMiCE FPGA Probing Function User's Manual

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

CS232 VHDL Lecture. Types

ECE 699: Lecture 9. Programmable Logic Memories

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Control and Datapath 8

Using COTS Hardware with EPICS Through LabVIEW A Status Report. EPICS Collaboration Meeting Fall 2011

Summary of FPGA & VHDL

Lab 3 Sequential Logic for Synthesis. FPGA Design Flow.

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

Rapidly Developing Embedded Systems Using Configurable Processors

Embedded Control Redefined: New C/C++ Options on NI Linux Real-Time

ni.com High-Speed Digital I/O

ni.com/training Quizzes LabVIEW Core 1 ni.com/training Courses Skills learned: LabVIEW environment Certifications Skills tested: LabVIEW environment

Scientific Instrumentation using NI Technology

Introduction to VHDL. Yvonne Avilés Colaboration: Irvin Ortiz Flores Rapid System Prototyping Laboratory (RASP) University of Puerto Rico at Mayaguez

FPGA Provides Speedy Data Compression for Hyperspectral Imagery

The Xilinx XC6200 chip, the software tools and the board development tools

Hardware Synthesis. References

LabVIEW programming II

The LabVIEW RIO Architecture and the Newest Member to the CompactRIO Family

ECE 545: Lecture 11. Programmable Logic Memories

Lecture 3 Introduction to VHDL

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

Advanced NI-DAQmx Programming Techniques with LabVIEW

Adapter Modules for FlexRIO

EITF35: Introduction to Structured VLSI Design

Agenda. Introduction FPGA DSP platforms Design challenges New programming models for FPGAs

In our case Dr. Johnson is setting the best practices

FPGA architecture and design technology

DESIGN AND IMPLEMENTATION OF MOD-6 SYNCHRONOUS COUNTER USING VHDL

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

ECE 545 Lecture 12. FPGA Resources. George Mason University

EE249 Lab September 30 h, 2008 Hugo A. Andrade

NI Linux Real-Time. Fanie Coetzer. Field Sales Engineer SA North. ni.com

FPGAs: FAST TRACK TO DSP

Digital Signal Processor Core Technology

Verilog for High Performance

Transcription:

FPGA design with National Instuments Rémi DA SILVA Systems Engineer - Embedded and Data Acquisition Systems - MED Region ni.com

The NI Approach to Flexible Hardware Processor Real-time OS Application software Networking and peripheral I/O drivers DMA, interrupt, and bus control drivers FPGA Application IP Control IP DSP IP Specialized I/O drivers and interface DMA controller 2

NI Embedded Software Architecture Options 1 23 LabVIEW C/C++ FPGA Interface C API LabVIEW FPGA Real-Time Processor FPGA 1 LabVIEW RT and FPGA 3 C/C++ on RT, LabVIEW FPGA 2 LabVIEW RT app for I/O, with C/C++ app or library 3

LabVIEW System Design Software Project Explorer Manage and organize all system resources, including I/O and deployment targets Hardware Connectivity Bring real-world signals into LabVIEW from any I/O on any instrument Deployment Targets Deploy LabVIEW code to the leading desktop, real-time, and FPGA hardware targets Parallel Programming Create independent loops that automatically execute in parallel Instant Compilation See the state of your application at all times, instantly Block Diagram Define and customize the behavior of your system using graphical programming Front Panel Create event-driven user interfaces to control systems and display measurements Analysis Libraries Use high-performance analysis libraries designed for engineering and science Models of Computation Combine and reuse.m files, C code, and HDL with graphical code Timing Define explicit execution order and timing with sequential data flow Accelerates Your Success By abstracting low-level complexity and integrating all of the tools you need to build any measurement or control system 4

LabVIEW System Development Environment Complete System IDE Windows Desktop PC Application Real-Time Processor Application System Design Tool FPGA Application 5

LabVIEW System Development Environment Complete System IDE Math and Analysis 6

LabVIEW System Development Environment Complete System IDE Math and Analysis Reuse of Existing Code.m File Scripts.m File Scripts Graphical Graphical 7

LabVIEW System Development Environment Complete System IDE Math and Analysis Reuse of Existing Code Graphical Syntax VHDL 8

LabVIEW System Development Environment Complete System IDE Math and Analysis Reuse of Existing Code C/C++ Code Graphical Syntax 9

LabVIEW System Development Environment Complete System IDE Math and Analysis Reuse of Existing Code Graphical Debugging 10

LabVIEW System Development Environment Complete System IDE Math and Analysis Reuse of Existing Code Graphical Debugging User Interface 11

Abstraction of Hardware Complexities Acquire analog data point-by-point Directly transfer analog data to processor memory via FIFO for data logging, display, etc. ~4000 lines of VHDL LabVIEW FPGA vs. VHDL 12

LabVIEW Environment Basics Project = System Configuration VI = Program or Function Front Panel = User Interface Block Diagram = Code 13

ni.com Embedded systems LabVIEW FPGA

Field-Programmable Gate Array (FPGA) Memory Blocks Store data sets or values in user defined RAM Configurable Logic Blocks (CLBs) Implement logic using flip-flops and LUTs Multipliers and DSPs Implement signal processing using multiplier and multiplier-accumulate circuitry Programmable Interconnects Route signals through the FPGA matrix I/O Blocks Directly access digital and analog I/O 15

FPGAs Are Dataflow Systems F A B C D 16

Parallel Processing F A B C D W X Y Z 17

LabVIEW FPGA Project = System Configuration VI = Application Front Panel = Interface Elements I/O Node Block Diagram = Code 18

LabVIEW FPGA vs. VHDL: Blink an LED VHDL Implementation begin LED <= LED_local; process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if ToggleLED then LED_local <= not LED_local; end if; end if; end process; Physical wire connection to LED CounterProc: process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if CounterValue = kcountertc then CounterValue <= (others => '0'); ToggleLED <= true; else CounterValue <= CounterValue + 1; ToggleLED <= false; end if; end if; end process CounterProc; end rtl; 19

LabVIEW FPGA vs. VHDL: Blink an LED VHDL Implementation begin LED <= LED_local; process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if ToggleLED then LED_local <= not LED_local; end if; end if; end process; CounterProc: process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if CounterValue = kcountertc then CounterValue <= (others => '0'); ToggleLED <= true; else CounterValue <= CounterValue + 1; ToggleLED <= false; end if; end if; end process CounterProc; Physical wire connection to LED Toggle the physical LED when internal timing signal ToggleLED is true. Executes every tick of the 50Mhz clock. end rtl; 20

LabVIEW FPGA vs. VHDL: Blink an LED VHDL Implementation begin LED <= LED_local; process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if ToggleLED then LED_local <= not LED_local; end if; end if; end process; CounterProc: process (CLK_50MHZ) begin if rising_edge(clk_50mhz) then if CounterValue = kcountertc then CounterValue <= (others => '0'); ToggleLED <= true; else CounterValue <= CounterValue + 1; ToggleLED <= false; end if; end if; end process CounterProc; Physical wire connection to LED Toggle the physical LED when internal timing signal ToggleLED is true. Executes every tick of the 50Mhz clock. Counter establishes the timing of the ToggleLED signal. Goes true when the counter reaches 50,000,000 (1 second) and resets counter. end rtl; 21

LabVIEW FPGA vs. VHDL: Blink an LED LabVIEW Implementation LED I/O Resource 22

LabVIEW FPGA vs. VHDL: Blink an LED LabVIEW Implementation LED I/O Resource NOT (Toggle) 23

LabVIEW FPGA vs. VHDL: Blink an LED LabVIEW Implementation Loop Timing (1000ms) LED I/O Resource NOT (Toggle) 24

Why Are FPGAs Useful? True Parallelism Provides parallel tasks and pipelining High Reliability Designs become a custom circuit High Determinism Runs algorithms at deterministic rates down to 25 ns (faster in many cases) Reconfigurable Create new and alter existing task-specific personalities 25

Parallel Processing F A B C D W X Y Z 26

High Reliability and Determinism Decision Making in Software Multiple Software Layers System or Device ~25 ms Response Outputs Hardware Operating System Driver API Application Software Calculation 27

High Reliability and Determinism Decision Making in Hardware Highest Reliability System or UUT Device Highest Determinism ~25 ns Response Outputs Hardware Calculation Operating System Driver API Application Software 28

Reconfigurable Enables rapid development iterations Reduces overall design cost, taking NRE into account Decreases long-term maintenance vs. FPGAs Custom Circuits ASICs 29

ni.com Common application target

Common Applications High-speed control Custom data acquisition Digital communication protocols Inline signal processing 31

High-Speed Control 32

Custom Triggered Analog Input Custom timing & synchronization Multi-rate sampling Custom counters Flexible PWM Flexible encoder interface 33

Digital Communication Protocol APIs Communications Protocols Palette: SPI/I2C Serial: 34

Inline Signal Processing and Data Reduction Streaming from input to output without host involvement Inputs Analog voltages Digital communication Sensor signals 35

Inline Signal Processing and Data Reduction DMA preprocessed data to Processor: Save to file, additional analysis, Transfer over network Streaming from input to output without host involvement FPGA Processing Encoding/decoding Filtering/averaging Modulation/demod Decimation Stream processing 36 Data Transfer Outputs Analog voltages Digital communication Motor/actuator drives

Data Transfer : I/O FPGA FPGA I/O Nodes acquire and generate data Directly connected to I/O pins Data rates are defined by the AIO/DIO modules FPGA acquires one data point per loop iteration Can rename channels to be application-specific 37

FPGA RT: FPGA Read/Write Controls FPGA VI Real-Time VI 38

FPGA RT: Direct Memory Access (DMA) FIFOs DMA FIFOs are an efficient mechanism for streaming data to/from the FPGA to/from a Real-Time or Windows Processor RIO hardware targets have between 3 to 16 dedicated DMA channels, depending on the FPGA Target-Scoped FIFOs can transfer data between different portions of an FPGA VI or between VIs on an FPGA Target 39

FPGA RT: DMA FIFOs Data Element DMA Engine FPGA DMA FIFO Real-Time Buffer 40

Clocking Process event, and registers ni.com

Understanding Clocks and Hardware Concurrency A Timed Loop on FPGA runs at 40MHz by default, based on the Onboard Clock A While Loop will execute at the rate specified in the Loop Timer function, either in ticks, ms, or µs. 42

Understanding Clocks and Hardware Concurrency The enable chain includes registers between each node that store values and execute at the rising edge of the clock A Timed Loop on FPGA is called a Single Cycle Timed Loop (SCTL) Code executes in 1 clock cycle Removes registers Uses less resources Not all functions are supported 43

ni.com LabVIEW design flow

Simplified FPGA Design Flow Design Entry Simulation Compilation Deployment 45

Simplified FPGA Design Flow Design Entry Interface Abstraction HDL/IP Integration Configuration-Based Simulation Compilation Deployment 46

Interface Abstraction I/O Interfaces to NI and 3 rd party I/O modules, custom daughtercards Built-in DMA FIFO and memory interfaces 47

Configuration-Based Design 48

Reuse of Existing HDL Algorithms Use LabVIEW as the glue of your application Leverage existing digital design team expertise Similar to calling a shared library in LabVIEW on Windows or Real-Time Library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity DemoClipAdder is port ( clk : in std_logic; areset : in std_logic; cporta : in std_logic_vector(15 downto 0); cportb : in std_logic_vector(15 downto 0); caddout : out std_logic_vector(15 downto 0)]; 49

Simplified FPGA Design Flow Design Entry Interface Abstraction HDL/IP Integration Configuration-Based Simulation Simulation Tools Interactive Window Debugging Compilation Deployment 50

Be More Productive with LabVIEW FPGA Verify Faster Verify Code using Simulated I/O Use the Desktop Execution Node to verify code by developing test benches using simulated or file generated I/O Verify Signal Timing with Waveform Probe Use the Digital Waveform Probe to probe your signals relative to one another and view history Debug with Standard LabVIEW Features in Simulation Highlight execution, breakpoints, and stepping features 51

LabVIEW FPGA Desktop Execution Node Unit Test Test Harness 52

Interactive Front Panel User Interface 53

Simplified FPGA Design Flow Design Entry Interface Abstraction HDL/IP Integration Configuration-Based Simulation Simulation Tools Interactive Window Debugging Compilation One-click automation of the Xilinx Tools Local Computer, Server, or Cloud Compilation Deployment 54

Compilation Process LabVIEW FPGA Code Compile VHDL through Xilinx FPGA Logic Implementation 55

Compilation Process LabVIEW FPGA Code Compile VHDL through Xilinx FPGA Logic Implementation Translation VHDL Generation Optimization Analysis & Logic Reduction Synthesis Place & Route Timing Verification Bit Stream Generation Download & Run 56

One-Click Deployment and Compilation Development PC Compile Server and Workers High- Performance Cloud 57

Simplified FPGA Design Flow Design Entry Interface Abstraction HDL/IP Integration Configuration-Based Simulation Simulation Tools Interactive Window Debugging Compilation One-click automation of the Xilinx Tools Local Computer, Server, or Cloud Compilation Deployment Packaged and Board-level Hardware Options 58

Integration with the Latest Hardware Products FlexRIO Zynq Single-Board RIO CompactDAQ Controller System on Module Compact Vision System myrio Quad-core Performance CompactRIO.. 59

NI System on Module Core processing unit for an embedded system Minimizes design time and risk Save time and risk with off-the-shelf hardware and software Quickly prototype with off-the-shelf NI embedded targets and I/O Develop high-speed and advanced applications with an FPGA without HDL expertise Designed, tested, and validated for reliable deployments 60

Xilinx Tools IDE (ISE, VIVADO) and primitive functions ni.com

Xilinx Tools NI provides some IP from LV FPGA like FFT, FIRs Does Xilinx has other IP for our FPGA? -> Coregen 62

Third Party Simulation Used to create detailed models of timing and functional behavior of designs Xilinx ISIM is shipped with the Xilinx Tools ModelSim/Questa 63