LabVIEW FPGA Programming Best Practices
LabVIEW FPGA Programming Best Practices
com
Presented by:
Zach Hawkins, Software Developer, Averna
CLA, CPI
ni.com
Agenda
About Averna
Structure
Style
Standardization
Summary
Q&A
ni.com
33
Averna at a Glance
Test Engineering Solutions
300
Employees
30+
5
Locations
1250
Professional Services
Special on-site technical or consulting
expertise for client project teams
Global Support
Completed
Projects
R&D Staff
Test Instruments
Tools to accelerate your DOCSIS,
RF and multimedia device testing
Over 65 NI-certified
architects, developers
and instructors
Industry-leading RF,
GPS/GNSS,
optics/photonics
and multimedia experts
Our Industries
AEROSPACE
& DEFENSE
AUTOMOTIVE &
TRANSPORTATION
CONSUMER
ELECTRONICS
LIFE
SCIENCES
Visit us in
Booth #203.
TELECOM
INFRASTRUCTURE
You may need to optimize later if/when new features are added
Some targets have IO nodes that will prevent using them inside SCTLs
ni.com
66
On-chip testing
Off-chip testing
Requirements
ni.com
FPGA code
Host code
Shared code
Testing code
77
How can we write FPGA code that can just be dropped into a new
project?
ni.com
88
<Module>_FPGA
<Module>_Host
API VIs
<Module>_Shared
<Module>.vi
CreateResources.vi (Register Bus optional)
Registers.vi (Register Bus optional)
FPGA_<Test/Module/Main>
Model_<Module/Algorithm>
Test_<TestName>
ni.com
99
Have you ever tried to implement a state machine in pure logic? We have
On an FPGA, additional enable chain logic is added to know which state is active
Use handshaking to control logic that gets placed outside the case structure
Remember that each new case can cause a new MUX to be added in
the HW implementation
ni.com
10
10
ni.com
11
11
ni.com
12
12
Configuration data will come down from the host on a single DMA
channel
ni.com
13
13
ni.com
14
14
ni.com
15
15
Pros
Cons
ni.com
16
16
ni.com
17
17
NI Decrement
NI Increment
A Different Increment
ni.com
18
18
ni.com
19
19
ni.com
20
20
ni.com
21
21
Fanout
ni.com
Memory writes
22
22
Many other operations are dependent on the width of the data type
ni.com
Standardization: Synchronization
ni.com
24
24
Three options:
Uninitialized
ni.com
Additional code is added to return the register to the default value when a
Reset command is sent (RESET = FANOUT!)
25
25
Data-driven synchronization
o
Hardware synchronization
o
o
ni.com
P2P FIFOs
Clocks
Triggers
26
26
Summary
ni.com
27
27
Thank You!
Questions?
Zach Hawkins
28
28
ni.com
29