LiSARD: LabVIEW integrated Softcore Architecture for ... · PDF fileFirmenlogo Firmenlogo...
Transcript of LiSARD: LabVIEW integrated Softcore Architecture for ... · PDF fileFirmenlogo Firmenlogo...
Firmenlogo
Firmenlogo
LiSARD: LabVIEW integrated Softcore Architecture for Reconfigurable Devices
Programmierbarer Rechenkern für rechenintensive Echtzeitdatenverarbeitung mit PXI-RIO Dr.-Ing. Alexander Pacholik Fachgebiet Rechnerarchitektur und Eingebettete Systeme Technische Universität Ilmenau
Gefördert durch die Deutsche Forschungsgemeinschaft DFG im Rahmen des Sonderforschungsbereiches 622.
Outline
• Beispielanwendung: NPMM-200 • LabVIEW built-in Lösungen Datenfluss, SCTL, Beschränkungen Erweiterungsmöglichkeiten, µProzessor auf PXI-RIO
• LiSARD Rechenkern Konzept, Einbettung in Labview Programmentwicklung, Testmöglichkeiten Anpassbarkeit
• Performancevergleich • Zusammenfassung & Ausblick
Herausforderung: Datenverarbeitungssystem der NPMM-200
• Schlüsselparameter: Positionierbereich: 200x200x25 mm³ Auflösung: 0.8 nm ≥6 Freiheitsgrade
• DAQ/IO 40 analoge Eingänge @ 666⅔ kHz 20 analoge IO @ 8⅓ kHz
• Gesamtzeit für Regelung: 120µs (8⅓kHz control loop)
Low Latency Anforderungen verhindern die Nutzung des RT controllers im kritischen Pfad! Realisierung mit FPGA erforderlich.
Nanopositioning and Nanomeasuring Machine NPMM-200
Herausforderung: Datenverarbeitungssystem der NPMM-200
Data Acquisition Create Measurement Value (MV)
MV PreProcessing
MV PostProcessing Data Fusion (Routing)
Actuation Variable Output Control
Function
Supervisor Trajectory Generator
0 1 2 3 4 5 6 7 8
Data Logging 9
7813R rio0
7853R rio0
7853R rio1
7853R rio5
7853R rio7
7853R rio6
7853R rio0
7853R rio1
7854R rio2
7853R rio3
7813R rio4
DAQ 8 AnalogIn. 666.6kHz
DAQ 8 AnalogIn 8.3kHz
Control 8 Analog Out 8.3kHz
Meas. Data 83.3kHz
Frequency 83.33 kHz
Frequency 8.33 kHz
8108 RT
8108 RT
8108 RT
9
1 0 0 0 0 0 1 1 1 1 2 2 2 2 3 4 4 4
3
9 5 6
9
7 8 7 8
Sequence Control System
Control System
Data Acquisition System
PCI
Ethernet
Interface DIO (16Mhz, 32 Bit ) datawidth
Interface DIO (16Mhz, 16/16 Bit datawidth) Interface DIO (16Mhz, 32/4 Bit datawidth)
Frequency 666.66 kHz
Processing pipeline: • Mehrere Clock Domains Multi-Rate Computing
• Zeitschema erfordert Berechnung mit 83⅓ kHz (12µs pro Stage) Obwohl Regelung bei 8⅓ kHz,
ist eine Realisierung mit 83⅓ kHz erforderlich!
Herausforderung: Datenverarbeitungssystem der NPMM-200
Complex processing system: • Mehrere Clock Domains Multi-Rate Computing
• Komplexe Struktur Große Anzahl IOs 3 PXI Chassis 11 PXI-R FPGA Module Low Latency DIO Kommunikation
• Processing Pipeline Stages running @ 83⅓ kHz
(12µs pro Stage) Komplexe Berechnungen (rekursive
Filter) Fließkomma Arithmetik
mit doppelter Genauigkeit
FPGA-interne Lösung gesucht!
PXI FPGA card
PXI backplane
DIO
DA
CA
DC
FPGA
µProzessor – Einbindung für PXI-RIO
Interrupt Reset
IO
JTAGClock/PLL
MMU
µController
± *÷ =
+1
Core
± *÷ =
+1
µController
Interrupt Reset
IO
JTAGClock/PLL
MMU
µController
± *÷ =
+1
Core
± *÷ =
+1
µController
Anforderungen an DSP-Rechenkern zur Einbindung in LabVIEW
Rechenkern als Basis für DSP-Algorithmen Fließkomma-Arithmetik mit einfacher / doppelter Genauigkeit Einfache Einbettung in ein Applikationskonzept Re-Programmierung der Algorithmen
ohne erneute FPGA-Compilierung Reuse des Rechenkerns (andere Algorithmen)
mit geringem Aufwand. Anpassbarkeit des FPGA-Ressourcenbedarfs an den Einsatzzweck. Testmöglichkeit der Lösungen in LabVIEW. möglichst ausschließliche Realisierung in LabVIEW.
LabVIEW built-in Lösungen (FPGA)
• Labview-Diagramm (Datenfluss) => Abstrakt Beliebig komplexe Funktionen kombinierbar Implizite Synchronisation Reentrant/Non-Reentrant Automatisches Pipelining begrenzt (High Troughput functions)
• SCTL-Diagramm => VHDL-äquivalant Komplexe Funktionen erfordern manuelles Scheduling Explizite Synchronisation Parallele Abläufe/ Strukturen Pipelining manuell
• Benutzerdefinierte Erweiterungen: CLIP HDL-Node / IP-Integration Node
)( rµControlleAufwandhoher
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIOStandard
soft-CPU
Software
JTAG
LabVIEWModel
IP Core C CodeASM Code
Life-CycleModell
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIOStandard
soft-CPU
Software
JTAG
LabVIEWModel
IP Core C CodeASM Code
LabVIEWModell
Life-CycleModell
Standard µProzessor auf PXI-RIO
• Separate Entwicklungsumgebung • Hohe Komplexität des Entwurfsprozesses
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIOStandard
soft-CPU
Software
JTAG
LabVIEWModel
IP Core
PC
C CodeASM Code IDE
LabVIEWModell
Life-CycleModell
Einbettung des LiSARD-Core in LabVIEW
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIOLiSARD
soft-CPU
Software
ASM-Code
LabVIEWModel
LabVIEWModel
Life-CycleModell
LabVIEWModell
• Entwicklungsumgebung als LabVIEW-Bibliothek • Verringerte Komplexität des Entwurfsprozesses
Konzept des LiSARD-Rechenkerns - Überblick
ProgramMemoryInterface
ProgramMemoryInterface
InputRegisters
InputRegisters
OutputRegistersOutput
Registers
CorePipeline
CorePipeline
ProgramMemory
ProgramMemory
DataMemory
DataMemory
DataMemoryInterface
DataMemoryInterface
Sync. Sync.
• Struktur: LabVIEW-Arrays als
Register für Input und Output Synchronisation mit 2-
Draht-Handshake (ähnlich High-Troughput-Functions) Konfiguration durch
Initialisierung von Programm & Datenspeicher Debugging
Der LiSARD-Rechenkerns im Detail
ProgramMemory
ReadInterface
ProgramMemory
ReadInterface
InstructionFetch
InstructionDecode
OperandFetch Execute Write Back
InstructionDecoder
InstructionDecoder
DataMemory
ReadInterface
DataMemory
ReadInterface
Source2Source1
ExecuteModeWriteBackOperationTarget
ALUALU
MU
XM
UX
DataMemory
WriteInterface
DataMemory
WriteInterface
InputRegisters
InputRegisters
OutputRegistersOutput
Registers
• Schlanke VLIW Architektur • Auf mehrere ALUs erweiterbar
Programmentwicklung
Dataflow Graph
AssemblerSource
Dataflow Optimization
InstructionScheduling
BinaryCode
Design Entry Design Entry
Transformation
• Programmentwicklung mittels LabVIEW-Bibliothek • Programm- Configuration Während FPGA-Erstellung durch Memory-Initialization-VIs Zur Laufzeit mittels Debug-Interface
• Optimierung durch externe Werkzeuge möglich
LabVIEW-VI extern
Testmöglichkeiten in LabVIEW
• Effektives Debugging für kleine und mittelkomplexe Algorithmen basierend auf Algorithmen-Iteration
• Erweiterbar auf Debugging der Befehlsschritte für komplexere Algorithmen
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
DACADC
PXI backplane
DIOLiSARD
soft-CPU
Software
ASM-Code,Daten,Trace
(interaktiv)
Debug-Interface
LabVIEWModell
Test-modell
LabVIEWModell
LabVIEWModell
Variabilität des Rechenkerns
• Variationsmöglichkeiten: Operandentyp
(SGL/DBL) ALU-Operationen
(ADD, MUL, DIV, SQRT, EXP, SIN, COS, Int2Float, Float2Int)
Programmspeicher Datenspeicher Konstantenspeicher
(optional) Registergröße für
Inputs/Outputs
ProgramMemoryInterface
ProgramMemoryInterface
InputRegisters
InputRegisters
OutputRegistersOutput
Registers
CorePipeline
CorePipeline
ProgramMemory
ProgramMemory
DataMemory
DataMemory
DataMemoryInterface
DataMemoryInterface
Sync. Sync.± *÷ =
Beispiel: Kalman Filter Realisierungsvarianten
PXIEmbedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
PXI backplane
DIO
DACADC
Kalmanfilter
PXIembedded controllerwith LabVIEW RT
PXI backplane
TI C6713 DSPmodule
PXI FPGAcard
Data acquisitionand output
DACADC
KalmanfilterD
IO
DIO PXI
embedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIO
soft-CPU
Kalmanfilter
PXIembedded controllerwith LabVIEW RT
PXI FPGAcard
Data acquisitionand output
DACADC
PXI backplane
DIO
Kalmanfilter
RT Controller FPGA direkt mit HDL-Nodes
External DSP LiSARD Softcore
Beispiel – Performancevergleich
• Kalman-Filter als LiSARD-Softcore benötigt weniger Ressourcen als direkte Realisierung mit HDL-Nodes in LabVIEW
• Bessere Performance als externe Realisierung (RT-Controller, DSP), ähnliche oder bessere als mit HDL-Nodes in LabVIEW
FPGA spd. max.FPGA res. min.
FPGA w / DSPSoftcore
0
20
40
60
80
100
Slice registers Slice LUTs
Res
sour
cena
usla
stun
g in
%
RT controllerFPGA spd. max.
FPGA res. min.FPGA w / DSP
Softcore
0
10
20
30
40
50
60
Execution Data transfer
Zeit
in µ
s
Zusammenfassung
Prozessnahe Datenverarbeitung auf FPGAs durch LiSARD Rechenkern
Rechenleistung des LiSARD mit DSPs vergleichbar
Leichte Integration in LabVIEW FPGA Programme
Programmentwicklung / Debugging innerhalb von LabVIEW
Erhöhung der Integrationsdichte
anspruchsvolle Applikationen mit PXI-FPGA Systemen
Ausblick & Visionen
Programmgenerierung aus LabVIEW-Vis
Wizard-Konfiguration / Auto-Konfiguration
Direkte Einbindung “outside SCTL”
Unterstützung für Hochsprachen
Komfortableres Debugging