[email protected]

33
INTEGRATING TIMING AND FREE-RUNNING ACTORS WITH DATAFLOW Tim Hayles Principal Engineer National Instruments September 9, 2008 [email protected]

description

Integrating Timing and Free-Running Actors with Dataflow Tim Hayles Principal Engineer National Instruments September 9, 2008. [email protected]. Agenda. What is LabVIEW Dataflow? Why is timing important to NI? Further motivation for this research Key elements Asynchronous Data Wires - PowerPoint PPT Presentation

Transcript of [email protected]

Page 1: hayles@ni.com

INTEGRATING TIMING AND FREE-RUNNING ACTORS WITH DATAFLOWTim HaylesPrincipal EngineerNational Instruments

September 9, [email protected]

Page 2: hayles@ni.com

Agenda

What is LabVIEW Dataflow? Why is timing important to NI? Further motivation for this research Key elements

Asynchronous Data Wires Asynchronous Timing Wires A small set of “Free Running” Actors

Implementation Details Examples

Page 3: hayles@ni.com

What is LabVIEW Dataflow? aka Structured Dataflow

Loops, cases, sequences, … aka Homogenous Dataflow

Always a single token on a wire aka simply as ‘G’ Dynamically scheduled Data driven Simple to use and understand Widely successful

Page 4: hayles@ni.com

LabVIEW Dataflow

Page 5: hayles@ni.com

Why is Timing Important to NI?

We make I/O products I/O timing requires

Configuration Routing Synchronization

Multiple subsystems on one board Multiple boards in one chassis Multiple chassis

I/O timing must play well with application timing

Page 6: hayles@ni.com

DAQmx STC Clock Model

Page 7: hayles@ni.com

DAQmx API

Page 8: hayles@ni.com

Dialog Configuration

Page 9: hayles@ni.com

Maybe this would work …

Page 10: hayles@ni.com

Data Acquisition: Dataflow API

Generate a single, re-triggerable pulse, delayed from the trigger

DAQmx dataflow configures a circuit and activates it Clearing the task has the side effect of disabling the circuit

Page 11: hayles@ni.com

Data Acquisition to the Pin

This mixed model is much closer to the actual hardware

Opening up the pulse generator can reveal more detail

Page 12: hayles@ni.com

Now we also want …

To further exploit parallelism even between nodes sharing a data transformation

To incorporate common data exchange techniques into the language

First class support for Pipelines Multi-rate Streaming Timing

Offer a multi-target programming canvas Deployment, startup and shutdown order

Page 13: hayles@ni.com

Asynchronous Wire No inherent semantics All behavior conferred by

implementation outside LabVIEW – though written in LabVIEW

One wire for data One wire for timing Producer and consumer nodes become

“free-running” actors firing based on Data or space availability Timing

Page 14: hayles@ni.com

Timing Wires Carry not time stamps, but ‘ticks’

Time stamps are data Ticks are unit-less and ephemeral state changes

Voltage transition Boolean transition

Route signals Clock domains for FPGA logic Clocks for I/O timing and triggering Triggers for timing computations

Abstract Copper traces (actual wires) Memory locations (‘soft’ clocks and triggers)

Page 15: hayles@ni.com

Timing Wires

Page 16: hayles@ni.com

Timing Wires

Triggers can be polymorphic to accept time stamps (but that’s a data wire)

Page 17: hayles@ni.com

Asynchronous Data Wire Buffered Writer usually, though not always, ‘owns’

the buffer Besides depth, buffer has type

Register Fifo Circular buffer

Type determines behavior aka data exchange policy

Page 18: hayles@ni.com

IF-RIO Experiment RF Transceiver

product Async wires and

actors used on same canvas as LabVIEW dataflow

Page 19: hayles@ni.com

IF-RIO Experiment Now

A new palette of seven async actors and two dataflow actors

FPGA only

Page 20: hayles@ni.com

IF-RIO Experiment – FPGA code

Page 21: hayles@ni.com

Harnessed User G Code

False case writes false to Start DAC otherwise empty

No notion of buffering policies used in async layer

Page 22: hayles@ni.com

IF-RIO Experiment – FPGA code

Page 23: hayles@ni.com

Harnessed User G Code

LabVIEW dataflow makes the copy of the data

When the first copy is made, Start goes true and the DAC begins consuming data

Page 24: hayles@ni.com

Harness Integration of Dataflow

A technique for complete separation of the MOCs The VI is pure LabVIEW dataflow The free-running Harness generates the code to read

and write the asynchronous wires and call the VI Code generation is optimized for streaming

Page 25: hayles@ni.com

Harness Generated Code

If the harnessed VI does not support any of the streaming protocol terminals, the IP Block only executes when There is no pending write A read was succesful

Page 26: hayles@ni.com

System Diagram

MOC integration Complete separation Limited mixing

I/O integration Discover Configure Operate

Target integration Multiple targets One canvas

Page 27: hayles@ni.com

Four Target System Diagram

Page 28: hayles@ni.com

G behind System Diagram Just the accessors and

terminals here

Page 29: hayles@ni.com

G behind System Diagram

G code must provide the loop

Page 30: hayles@ni.com

Three Target System Diagram

Page 31: hayles@ni.com

Physically Constrained View

Page 32: hayles@ni.com

More System Diagram Research

Relation to timestamp based MOCs MOC hosting Debugging Simulation Scheduling

A state machine for deployment, etc Communication between the state machine

and the hosted code Mapping IP among processing resources