LabVIEW 2009 Real-Time & FPGA 最新技術剖析 National Instruments 美商國家儀器 行銷部技術經理吳維翰
LabVIEW RT 2009 Agenda NI Real-Time Hypervisor MathScript RT RT System Backup and Restore crio Streaming API LabVIEW FPGA 2009 Enhanced compiler C interface to FPGA
NI Real-Time Hypervisor
What is Virtualization? The term: refers to abstraction of operating systems from hardware resources In practice: running multiple operating systems simultaneously on a single computer
NI Real-Time Hypervisor Architecture Windows XP LabVIEW Real-Time Real-Time Hypervisor Hardware Support Real-Time Hypervisor PXI Dual- and Quad-Core Controllers I/O RAM CPUs Multicore Computer New NI Industrial Controller
Benefits of the Real-Time Hypervisor Capability: make use of real-time processing and Windows XP services Applications Graphics Services Determinism Real-Time I/O Timing
Benefits of the Real-Time Hypervisor Consolidation: reduce hardware costs, wiring, and physical footprint Virtualized System with NI Real-Time Hypervisor
Benefits of the Real-Time Hypervisor Efficiency: take advantage of multicore processors effectively Quad-Core Controller with Virtualization Windows XP LabVIEW Real-Time
Configuring a Real-Time Hypervisor System
Using NI Real-Time Hypervisor Systems Configuration: NI Real-Time Hypervisor Manager Communication: virtual Ethernet and virtual console Development and Deployment: similar to traditional real-time systems
Assigning I/O and RAM Between OSs
Booting Into the Hypervisor
Accessing the Real-Time Target in MAX
Communicating Between OSs Virtual Ethernet Virtual Console (COM 4)
LabVIEW Development and Deployment Same as traditional NI real-time systems
Demo: Running a LabVIEW Real-Time Motor Control Application
Performance and Benchmarks
Interrupt Latency and Performance Impact LabVIEW Real-Time Windows XP NI Real-Time Hypervisor Interrupt I/O Device or Communication Request
Benchmarks for DAQ Application I/O Channels (w/ PID) Maximum Loop Rate w/ Hypervisor (khz) Maximum Loop Rate without Hypervisor (khz) 1 4 16 11.5 9.3 7.0 25.4 22.6 12.4 Most LabVIEW Real-Time applications running between 1-5 khz will be able to run at full rate on a Real-Time Hypervisor system
Communication Benchmarks Ethernet Throughput on Hypervisor and Non-Hypervisor Systems 70000 60000 Throghput (kb/s) 50000 40000 30000 20000 10000 0 0 1000 2000 3000 4000 5000 6000 7000 8000 Packet Size (Bytes) Physical Ethernet (w/ hypervisor) Virtual Ethernet (w/ hypervisor) Physical Ethernet (no hypervisor) 9000
Mathscript RT
LabVIEW MathScript Text-based signal processing, analysis, and math within LabVIEW 800 built-in functions Create user-defined functions Reuse many of your existing.m files A native LabVIEW solution Interactive and programmatic interfaces Enables hybrid programming Does not require 3rd-party software 2D and 3D Plotting / Visualization Probability and Statistics Digital Signal Processing (DSP) Optimization Approximation (Curve Fitting / Interpolation) Advanced Functions Ordinary Differential Equations MATLAB is a registered trademark of The MathWorks, Inc. All other trademarks are the property of their respective owners. Basic Operations Polynomial Operations Trigonometric Linear Algebra Matrix Operations Boolean and Bit Operations Data Acquisition / Generation Vector Operations Other
MathScript Node Combine textual math with graphical development Implement equations and algorithms with text Define input and output variables on the border Debug.m files with single step, breakpoints, and syntax highlighting MathScript Node
NEW! LabVIEW MathScript RT Module Deploy.m Files directly to NI Real-Time Platforms
Why is This Functionality Important?.m files
Typical Real-Time System Implementation Math Tool Design Entry Testbench Debug Convert to C Code Algorithm Development Functional Testing Toolkit for Code Generation Mathematics Design Tool Algorithm Compiler for RealTime Target Debug Application on Real-Time Real-Time Compiler, Linker, Debugger + Real-Time Processor and Other Hardware Embedded System Tool Deployment
Streamlining Development Process with LabVIEW LabVIEW Design Entry Testbench Debug Direct Compilation for Real-Time Target Algorithm Development Functional Testing LabVIEW Embedded Technology LabVIEW Real-Time Debugging Deployment Validation LabVIEW Algorithm Deployment
Deploying the User s.m Files on Embedded Hardware DEMO Windows XP/Vista LabVIEW 2009 LabVIEW Real-Time Module LabVIEW MathScript RT Module NI PXI-4472 ±10 V input range 8 SSAI up to 102.4 ks/s
Is LabVIEW MathScript Deterministic? Yes and No Developers can write deterministic MathScript code Need to test the application for jitter Some of the built-on constructs and operators introduce jitter into the application Receive performance and memory comparable to G Jitter causes the performance to be non-deterministic
Deterministic core language* Deterministic functions* Guidelines for determinism Determinism warnings Breakpoints and probes Improved compiler load time Support in RT Execution Trace Toolkit Additional RT deployable functions (ODE, ) Window performance equivalent to Node Remove error handling in generated code Other DFIR-based compilation (including debugging) Execute multiple nodes in parallel Compiler refinements (always statically compile when possible) Structs Compatibility Performance Real-Time MathScript RT Module Roadmap Bug fixes N-d arrays, cell arrays Editing improvements in Window and Node Q1 2010 NI Week 2010 NI Week 2011 Beyond
Deterministic core language* Deterministic functions* Guidelines for determinism Determinism warnings Breakpoints and probes Improved compiler load time Other Compatibility Performance Real-Time MathScript RT Module Roadmap Bug fixes Support in RT Execution Trace Toolkit Additional RT deployable functions (ODE, ) Window performance equivalent to Node Remove error handling in generated code DFIR-based compilation (including debugging) Execute multiple nodes in parallel Compiler refinements (always statically compile when possible) Deterministic core language* Deterministic functions* Guidelines for determinism Determinism warnings Structs Breakpoints and probes Improved compiler load time N-d arrays, cell arrays Editing improvements in Window and Node Q1 2010 NI Week 2010 NI Week 2011 Beyond
RT System Backup and Restore
Backing Up and Restoring Real-Time Targets Programmatically over the network OR RT Desktop PC Utility USB drive
Programmatic RT System Replication - Back up an image - Restore an image
RT System Replication via USB Tools» Real-Time Disk Utilities» Create Desktop Utility USB Drive Backup, Restore, or Replicate the Real-Time System
Real-Time Application Reference Designs
Jump-start your application
Jump-start your application Reference Applications for crio Waveform Acquisition http://zone.ni.com/devzone/cda/epd/p/id/6206 crio Reference Designs for Structural Health Monitoring http://zone.ni.com/devzone/cda/tut/p/id/9851 Reference Design for Adding Licensing to LabVIEW Real-Time Applications http://zone.ni.com/devzone/cda/epd/p/id/5912 Reference Applications for crio Order Analysis Using a High Speed Tach http://zone.ni.com/devzone/cda/epd/p/id/6301 In-vehicle Datalogger Reference Application for CompactRIO http://zone.ni.com/devzone/cda/epd/p/id/5751
What s New in the LabVIEW 2009 FPGA Module
New Feature Summary New compilation experience Early size estimates, new GUI, and more Timing violation debugging Critical-path highlighting New and improved IP High-throughput math and signal processing Host integration improvements C Interface and host scaling for IP More CLIP clocks, new feedback nodes, statechart debugging New hardware EtherCAT FPGA, new NI ELVIS platform board, NI FlexRIO adapters
Compilation Process: LabVIEW FPGA 8.6 Generating Intermediate Files: Pass/Fail What State: Generating Idle, In Queue, Intermediate Compiling, Files: Pass/Fail Transferring Generating Xilinx Log Intermediate Output Files: Pass/Fail Generating Done: Intermediate Pass/Fail Files: Pass/Fail
New Compilation Window Progress bar and status output Nonmodal compile window Select reports Compile server Output window Early resource estimates Clickable alerts Progress bar-only view
From Run Arrow to Bit File Compile
Compilation Improvement Summary Early size and speed estimate HDL synthesis results reporting Critical-path highlighting Debugging when design does not meet timing Precompile options Define effort levels for size and speed Clickable alerts When new reports are available Better compiler state output Progress bar and state Continue working without disconnect Window is nonmodal Reduced memory Somewhat faster compile and larger FPGA support
Timing Violation Debugging
New and Improved IP New High-throughput math Arithmetic, sin/cos, atan, natural log, exponential FIFO/memory profiling FIFO/memory name controls, counts left Improved FFT, window, resample Support 100 MHz clock rates Fixed-point cast Arithmetic, sin/cos, atan, natural log, exponential LabVIEW Digital Filter Design Toolkit FXP data type and IP Generator Feedback node Multiple pipelines in one node
New Host Capabilities C Interface to LabVIEW FPGA NiFpga_Status NiFpga_Open (const char * bitfile, const char * signature, const char * resource, uint32_t attribute, NiFpga_Session * session) NiFpga_Status NiFpga_ReadI8 (NiFpga_Session session, uint32_t indicator, int8_t * value) Host Scaling for FPGA IP Example: FFT to spectrum Example: Signal generation parameters
Other New Features Use FPGA custom data with the CompactRIO Scan Mode Learn more on what s new in LabVIEW Real-Time Clocks from CLIP Create a clock and export it from a CLIP CLIP supports 64-bit numbers New XML tag to allow 64-bit numbers Statechart debugging interface Debug FPGA statecharts in simulation Object-oriented programming Supports classes New IP on IPNet (ni.com/ipnet) RF, digital filtering, digital protocols
New FPGA Hardware Packaged Embedded Single-Board Embedded PCI/PXI Plug-In Deterministic distributed I/O with a programmable FPGA Extended temperature NI Single-Board RIO, -40 to 85ºC New PCI Express NI R Series Multifunction RIO Boards
Thank You!!