SlideShare a Scribd company logo
CCFE is the fusion research arm of the United Kingdom Atomic Energy Authority.
This work was funded by the RCUK Energy Programme [grant number EP/I501045] .
Developing new Zynq based
instruments using
Koheron-SDK
graham.naylor@ccfe.ac.uk
• Why use an FPGA and what is Zynq?
• Setting up the Koheron-SDK
• Looking around the SDK
• Using IP integrator and writing new IP cores
• Define our instrument
• Red Pitaya
• Build and develop the instrument (add DSP)
• Make the instrument on the target board
• Test the instrument
Building an instrument from scratch
Slide 2
Developing Zynq based instruments using Koheron-SDK April 2017
• FPGAs now contain a huge number of logic
gates for computation (Modern high end CPUs and
GPUs have up to 15 billion transistors – current FPGAs can have
over 30 billion and continue to scale)
• Good at doing ultra fast hard real-time, with
DSP throughput way exceeding that of CPUs
and GPUs
• Zynq incorporates 1 - 4 ARM cores and can
run a full OS to interface with high level
applications (UI)
Why use an FPGA and what is Zynq?
Slide 3
The challenge is to seamlessly make use of the FPGA (logic part) and the
CPU (software programmed).
Many tools exist and Xilinx provide so called ‘High Level Synthesis’ and
‘SDSoC’ (Software Defined System on a Chip) in order to provide an
easy way in for software programmers used to C/C++. This does however
require the use of a relatively small library set of functions (IP) provided
with a logical description (that will effectively provide an accelerated
function). This functions are then orchestrated from the software level.
Integrating IP using a tool from Xilinx called ‘IP Integrator’ works at the
logical level and allows more tightly integrated hardware processes for
very high speed digital signal processing with complex functions.
The Koheron-SDK allows the use of IP integrator, while providing a clean
interface to a C++/python environment on the processor, without writing
any code in an HDL (Hardware Definition Language).
Which development environment to use?
Slide 4
The Koheron Instrument build procedure
This is the title of the slide and the date it was written
Slide 5
Build of instrument from
definition files on the left
orchestrated by a make file
Build of instrument from
definition files on the left
orchestrated by a make file
• Visit https://www.koheron.com/software-development-kit/
• Builds on methodology developed by Pavel
Demin (https://github.com/pavel-demin/red-pitaya-notes)
• Runs on Ubuntu (Works well on a virtual machine)
• Follow instructions on Koheron site to install
dependencies and clone repository from Github
-essentially clone repository and run: sudo –H make setup
Setting up the Koheron-SDK
Slide 6
• -> Look at directory structure:
fpga/cores, examples/xxx (formerly instruments/xxx), tmp/, boards/redpitaya
(xdc in config)
Depending on which version of Vivado (eg 2016.2) you have, may
need to edit fpga/settings64.sh to match (currently expects
2016.4).
Various build activities co-ordinated by ‘make’ commands
Note make files currently (April 17) work in Python 2.7 or 3.5
(Anaconda allows switching between python installations). You can set up environments to be able to
switch:
conda create –n py27 python=2.7
conda create –n py35 python=3.5
switch to it using
source activate py27
If using vivado 2016.2 use the version switch when using ‘make’
commands (eg- make VIVADO_VERSION=2016.2
CONFIG=examples/led-blinker/config.yml )
Looking around the SDK
Slide 7
The whole logic part of the design is encapsulated in the IP integrator ‘Block
Diagram’. No design is held outside this diagram, but is automatically wrapped
in an HDL wrapper. Connections to physical pins needs to be defined – this is
contained in the xdc files provided.
To write a new core block to be used in the block diagram:
Create a new directory for your block definition: ../fpga/cores/newcore_vx_x
Insert:
hdl definition – eg ‘newcore.v’
‘core_config.tcl’ (see another core for an example)
‘newcore_tb.v’ (if you wish to test it)
To test it use:
make CORE=fpga/modules/newcore_vx_x test_core
Include core name in the config.yml file of the instrument using it (then will build
automatically)
Using IP integrator and writing new IP cores
Slide 8
Create a new directory for your new instrument:
../instruments/my_instrument
Three files are needed:
config.yml (board to be used, required cores, memory map, configuration
and status registers required, fixed parameters, relevent xdc constraint files for
the board being used, and the server and drivers required – work from an
existing example)
block_design,tcl (work from an instrument with similar needs and remove
what is not needed and edit – see later)
my_instrument.hpp (again work from an existing instrument and edit to
include the controls needed)
Optionally:
test.py ( a test python script to test or make use of the required functions – see
existing examples in other instruments)
Web interface defined by one or more typescript files
Define a new instrument
Slide 9
• Start with a block_diagram.tcl copied from a similar instrument example (ie
has the interfaces you might need). Remove the bits you don’t need. What is
missing can be created in ip-integrator (Vivado tool).
• Create the block diagram using:
make CONFIG=instruments/my_instrument block_design
- This opens Vivado
Once you have the design in Vivado with the block diagram open:
• Edit the block diagram and add the IP you need and connect up.
• Export the block diagram to a tcl file in the instrument directory and call it
‘block_diagram.tcl’, replacing the original using file>export>Export Hardware…,
or the command:
write_bd_tcl -force <path to:->/koheron-
sdk/instruments/sdr/block_design.tcl>
• Exit Vivado
Create the block diagram
Slide 10
• An SD card on the Red Pitaya host is needed with the Linux OS set up. A pre-
made SD card image can be downloaded from the Koheron web site, or the full
SD card built using (where <my_instrument> is the name of the specific
instrument directory containing the design of the instrument to be created):
make CONFIG=instruments/<my_instrument>/config.yml all # instrument, os, (device tree, U-boot and Linux kernel), drivers + web server.
sudo bash ./os/scripts/ubuntu-development.sh tmp/<my_instrument> ./os tmp/<my_instrument>/os <my_instrument>
# SD card image with Ubuntu 16.04 root file system
Copy image from tmp/<my_instrument> directory on to an SD card using image writing
software (eg dd on linux or HDD Raw copy tool on Windows) – warning, sd card images
tend to be rather large and you shouldn’t really need to keep more than one.
• If updating the instrument bitfile or adding a new one run:
make CONFIG=instruments/<my_instrument>/config.yml HOST=<IP address> run
This builds and downloads the required bit file and drivers to the target board
• In case of problems in bit file generation, open the created xpr file: tmp/<instrument
name>.xpr
• Locate errors and change implementation strategy if necessary (due to failure to close
timing for example), eg to ‘Performance ExplorePostRoutePhysOpt’
Create the instrument and send to target
Slide 11
• Aim is not to build a high performance polished instrument
(for that see http://pavel-demin.github.io/red-pitaya-notes/)
• Purpose is to show how to build an instrument using signal
processing techniques within IP integrator of Vivado and deploy on
the Red Pitaya as an example to show how quickly it can be done.
• Walk through video of the steps in the videos (links at end of this presentation).
• Based on a Software Defined Radio (SDR) which uses a homodyne
receiver demodulating an AM signal with the layout below performed
in logic on the FPGA:
Hands-on example of a software defined radio on the Red Pitaya
Slide 12
ADC
decode
ADC
decode
Local
Oscillator
Local
Oscillator
LPFLPF
LPFLPF
CORDICCORDIC
DAC
output
DAC
outputAntenna
In
I
Q
I
Q
A
φ
FM demodulation/QPSKdecode/….
To speaker
PS controlPS control
LPFLPF
• Loop aerial uses about 1.5m of 10 way ribbon cable in a
loop with the connections staggered to make 10 turns.
Ribbon cable reduces the parasitic capacitance of the
loop and parallel capacitance is added to achieve
resonance at the frequency required. In our case around
400pF and a 60pF adjustable capacitor were used to
tune to 909kHz
• An adapter was used to adapt from the SMA output of
the DAC and a 3.5mm jack socket to connect a headset
(or speakers)
Assemble loop aerial and headset connection
This is the title of the slide and the date it was written
Slide 13
• Open the web site http://koheron/ if connected on the same subnet. Find the
ip address by typing:
nslookup koheron
on a local machine if wishing to connect to it remotely.
• The web page will allow the configuration parameters to be set and the
status values to be read.
• Test other functionality using python test programs, such as in the
examples.
• For streaming of large volumes of fast data, the python program could be
run on the Zynq ARM and connecting to 127.0.0.1
• For high bandwidth data acquisition, the FPGA program should store directly
to DDR and the ARM read the data post-shot (via DMA or direct write
through a memory interface ‘MIG’ on the PL part of the Zynq).
Hands-on video at:
Files required for this design at:
https://my.pcloud.com/publink/show?code=kZhxrAZ8srvxsa0SKBTue6ITJDmvySgGXkX
Test the instrument
Slide 14
Download SD card image from Koheron site and
extract to a .img file.
Insert SD card and unmount:
sudo fdisk –l (To find name of drive eg /dev/mmcbkl0 )
sudo umount /dev/mmcbkl0 (or whatever drive name from above)
Copy image on to SD card:
sudo dd if=/dev/mmcblk0 of=……/<sd-card-copy>.img
Copying file to SD card using dd on Linux
This is the title of the slide and the date it was written
Slide 15
• Index.html at /usr/local/www on Koheron instrument target
• Type script pages (.ts files) defined on development machine in
<instrumentName>/web and listed in app.ts are zipped (by the make
process) and sent over to the target and compiled in to app.js at run
time for the live instrument in /tmp/live-instrument/ on the target to
provide an interactive web page.
Web interface
This is the title of the slide and the date it was written
Slide 16
• Currently 3 hands on videos are available:
i) Looking round the Koheron-SDK
ii) Building the Software Defined Radio in IP
integrator
iii) Building the SDR instrument using Make
files and testing using a simple client
application
iv) Web interface (TBD)
Tutorial videos
This is the title of the slide and the date it was written
Slide 17

More Related Content

What's hot

Configuration of CB Ce cc Poster
Configuration of CB Ce cc PosterConfiguration of CB Ce cc Poster
Configuration of CB Ce cc PosterEr. Ashish Pandey
 
Electronic device and circuit presentation
Electronic device and circuit presentationElectronic device and circuit presentation
Electronic device and circuit presentationKamrulHasan506
 
189626882 ep227-digital-electronics
189626882 ep227-digital-electronics189626882 ep227-digital-electronics
189626882 ep227-digital-electronicsDimple Bansal
 
Operational amplifier UA741
Operational amplifier UA741Operational amplifier UA741
Operational amplifier UA741unni krishnan
 
Motor Control Relay, Pwm, DC and Stepper Motors
Motor Control Relay, Pwm, DC and Stepper MotorsMotor Control Relay, Pwm, DC and Stepper Motors
Motor Control Relay, Pwm, DC and Stepper MotorsDevashish Raval
 
Basic electronics
Basic electronics Basic electronics
Basic electronics arunavasava
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adderGaditek
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gatesKumar
 
Basics Electronics Engineering ppt.
Basics Electronics Engineering ppt.Basics Electronics Engineering ppt.
Basics Electronics Engineering ppt.PRINCE SHARMA
 
Classification of power supply and its different types
Classification of power supply and its different typesClassification of power supply and its different types
Classification of power supply and its different typeselprocus
 
Types of MOSFET Applications and Working Operation
Types of MOSFET Applications and Working OperationTypes of MOSFET Applications and Working Operation
Types of MOSFET Applications and Working OperationEdgefxkits & Solutions
 
Why ece ppt
Why ece  pptWhy ece  ppt
Why ece pptkathir20
 

What's hot (20)

Power amplifiers
Power amplifiersPower amplifiers
Power amplifiers
 
Configuration of CB Ce cc Poster
Configuration of CB Ce cc PosterConfiguration of CB Ce cc Poster
Configuration of CB Ce cc Poster
 
Parity generator & checker
Parity generator & checkerParity generator & checker
Parity generator & checker
 
Electronic device and circuit presentation
Electronic device and circuit presentationElectronic device and circuit presentation
Electronic device and circuit presentation
 
189626882 ep227-digital-electronics
189626882 ep227-digital-electronics189626882 ep227-digital-electronics
189626882 ep227-digital-electronics
 
Operational amplifier UA741
Operational amplifier UA741Operational amplifier UA741
Operational amplifier UA741
 
Amplifier
AmplifierAmplifier
Amplifier
 
Basics of digital electronics
Basics of digital electronicsBasics of digital electronics
Basics of digital electronics
 
EC6202 ELECTRONIC DEVICES AND CIRCUITS Unit 1
EC6202 ELECTRONIC DEVICES AND CIRCUITS Unit 1EC6202 ELECTRONIC DEVICES AND CIRCUITS Unit 1
EC6202 ELECTRONIC DEVICES AND CIRCUITS Unit 1
 
BOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATEBOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATE
 
Motor Control Relay, Pwm, DC and Stepper Motors
Motor Control Relay, Pwm, DC and Stepper MotorsMotor Control Relay, Pwm, DC and Stepper Motors
Motor Control Relay, Pwm, DC and Stepper Motors
 
Basic electronics
Basic electronics Basic electronics
Basic electronics
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gates
 
Basics Electronics Engineering ppt.
Basics Electronics Engineering ppt.Basics Electronics Engineering ppt.
Basics Electronics Engineering ppt.
 
Classification of power supply and its different types
Classification of power supply and its different typesClassification of power supply and its different types
Classification of power supply and its different types
 
Types of MOSFET Applications and Working Operation
Types of MOSFET Applications and Working OperationTypes of MOSFET Applications and Working Operation
Types of MOSFET Applications and Working Operation
 
Power MOSFET
Power MOSFETPower MOSFET
Power MOSFET
 
Why ece ppt
Why ece  pptWhy ece  ppt
Why ece ppt
 
Bjt
BjtBjt
Bjt
 

Similar to Developing new zynq based instruments

Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System LabNonamepro
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
generate IP CORES
generate IP CORESgenerate IP CORES
generate IP CORESguest296013
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitVasily Ryzhonkov
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt8885684828
 
xapp744-HIL-Zynq-7000
xapp744-HIL-Zynq-7000xapp744-HIL-Zynq-7000
xapp744-HIL-Zynq-7000Umang Parekh
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubroanoopc1998
 
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsUplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsSatya Harish
 
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Developer Network
 
Using VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersUsing VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersMichelle Holley
 
VLSI Training presentation
VLSI Training presentationVLSI Training presentation
VLSI Training presentationDaola Khungur
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Deepak Kumar
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugincudma
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 

Similar to Developing new zynq based instruments (20)

Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
generate IP CORES
generate IP CORESgenerate IP CORES
generate IP CORES
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt
 
Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
 
xapp744-HIL-Zynq-7000
xapp744-HIL-Zynq-7000xapp744-HIL-Zynq-7000
xapp744-HIL-Zynq-7000
 
learning STM -32
learning STM -32 learning STM -32
learning STM -32
 
STM -32
STM -32STM -32
STM -32
 
Larson and toubro
Larson and toubroLarson and toubro
Larson and toubro
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutionsUplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
UplinQ - qualcomm® hexagon™ sdk optimize your multimedia solutions
 
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia SolutionsQualcomm Hexagon SDK: Optimize Your Multimedia Solutions
Qualcomm Hexagon SDK: Optimize Your Multimedia Solutions
 
Using VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear ContainersUsing VPP and SRIO-V with Clear Containers
Using VPP and SRIO-V with Clear Containers
 
VLSI Training presentation
VLSI Training presentationVLSI Training presentation
VLSI Training presentation
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugin
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
Hands on OpenCL
Hands on OpenCLHands on OpenCL
Hands on OpenCL
 

Recently uploaded

一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单
一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单
一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单aveka1
 
Item # 4 -- 525 Argo Avenue ARB Case 926F
Item # 4 -- 525 Argo Avenue ARB Case 926FItem # 4 -- 525 Argo Avenue ARB Case 926F
Item # 4 -- 525 Argo Avenue ARB Case 926Fahcitycouncil
 
Russian anarchist and anti-war movement in the third year of full-scale war
Russian anarchist and anti-war movement in the third year of full-scale warRussian anarchist and anti-war movement in the third year of full-scale war
Russian anarchist and anti-war movement in the third year of full-scale warAntti Rautiainen
 
CrossWalksInspirations for Brockville***
CrossWalksInspirations for Brockville***CrossWalksInspirations for Brockville***
CrossWalksInspirations for Brockville***Stephen Abram
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单aveka1
 
The Role of a Process Server in real estate
The Role of a Process Server in real estateThe Role of a Process Server in real estate
The Role of a Process Server in real estateoklahomajudicialproc1
 
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...Congressional Budget Office
 
PPT Item # 8 - Tuxedo Columbine 3way Stop
PPT Item # 8 - Tuxedo Columbine 3way StopPPT Item # 8 - Tuxedo Columbine 3way Stop
PPT Item # 8 - Tuxedo Columbine 3way Stopahcitycouncil
 
2024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 372024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 37JSchaus & Associates
 
PPT Item # 5 - 5330 Broadway ARB Case # 930F
PPT Item # 5 - 5330 Broadway ARB Case # 930FPPT Item # 5 - 5330 Broadway ARB Case # 930F
PPT Item # 5 - 5330 Broadway ARB Case # 930Fahcitycouncil
 
一比一原版(IC毕业证)帝国理工大学毕业证成绩单
一比一原版(IC毕业证)帝国理工大学毕业证成绩单一比一原版(IC毕业证)帝国理工大学毕业证成绩单
一比一原版(IC毕业证)帝国理工大学毕业证成绩单exuyk
 
Honeycomb for The Hive Design Inspirations
Honeycomb for The Hive Design InspirationsHoneycomb for The Hive Design Inspirations
Honeycomb for The Hive Design InspirationsStephen Abram
 
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单一比一原版(UQ毕业证)昆士兰大学毕业证成绩单
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单ehbuaw
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单ukyewh
 
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单enbam
 
Hub Design Inspiration Graphics May 24 2024.pdf
Hub Design Inspiration Graphics May 24 2024.pdfHub Design Inspiration Graphics May 24 2024.pdf
Hub Design Inspiration Graphics May 24 2024.pdfStephen Abram
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单
一比一原版(UniSA毕业证)南澳大学毕业证成绩单一比一原版(UniSA毕业证)南澳大学毕业证成绩单
一比一原版(UniSA毕业证)南澳大学毕业证成绩单aveka1
 
Item # 8 -- Tuxedo Columbine 3--way Stop
Item # 8 -- Tuxedo Columbine 3--way StopItem # 8 -- Tuxedo Columbine 3--way Stop
Item # 8 -- Tuxedo Columbine 3--way Stopahcitycouncil
 
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...Rahsaan L. Browne
 
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptx
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptxMHM Roundtable Slide Deck WHA Side-event May 28 2024.pptx
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptxILC- UK
 

Recently uploaded (20)

一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单
一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单
一比一原版(SUT毕业证)斯威本科技大学毕业证成绩单
 
Item # 4 -- 525 Argo Avenue ARB Case 926F
Item # 4 -- 525 Argo Avenue ARB Case 926FItem # 4 -- 525 Argo Avenue ARB Case 926F
Item # 4 -- 525 Argo Avenue ARB Case 926F
 
Russian anarchist and anti-war movement in the third year of full-scale war
Russian anarchist and anti-war movement in the third year of full-scale warRussian anarchist and anti-war movement in the third year of full-scale war
Russian anarchist and anti-war movement in the third year of full-scale war
 
CrossWalksInspirations for Brockville***
CrossWalksInspirations for Brockville***CrossWalksInspirations for Brockville***
CrossWalksInspirations for Brockville***
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
 
The Role of a Process Server in real estate
The Role of a Process Server in real estateThe Role of a Process Server in real estate
The Role of a Process Server in real estate
 
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
 
PPT Item # 8 - Tuxedo Columbine 3way Stop
PPT Item # 8 - Tuxedo Columbine 3way StopPPT Item # 8 - Tuxedo Columbine 3way Stop
PPT Item # 8 - Tuxedo Columbine 3way Stop
 
2024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 372024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 37
 
PPT Item # 5 - 5330 Broadway ARB Case # 930F
PPT Item # 5 - 5330 Broadway ARB Case # 930FPPT Item # 5 - 5330 Broadway ARB Case # 930F
PPT Item # 5 - 5330 Broadway ARB Case # 930F
 
一比一原版(IC毕业证)帝国理工大学毕业证成绩单
一比一原版(IC毕业证)帝国理工大学毕业证成绩单一比一原版(IC毕业证)帝国理工大学毕业证成绩单
一比一原版(IC毕业证)帝国理工大学毕业证成绩单
 
Honeycomb for The Hive Design Inspirations
Honeycomb for The Hive Design InspirationsHoneycomb for The Hive Design Inspirations
Honeycomb for The Hive Design Inspirations
 
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单一比一原版(UQ毕业证)昆士兰大学毕业证成绩单
一比一原版(UQ毕业证)昆士兰大学毕业证成绩单
 
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
一比一原版(QUT毕业证)昆士兰科技大学毕业证成绩单
 
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单
一比一原版(MQU毕业证)麦考瑞大学毕业证成绩单
 
Hub Design Inspiration Graphics May 24 2024.pdf
Hub Design Inspiration Graphics May 24 2024.pdfHub Design Inspiration Graphics May 24 2024.pdf
Hub Design Inspiration Graphics May 24 2024.pdf
 
一比一原版(UniSA毕业证)南澳大学毕业证成绩单
一比一原版(UniSA毕业证)南澳大学毕业证成绩单一比一原版(UniSA毕业证)南澳大学毕业证成绩单
一比一原版(UniSA毕业证)南澳大学毕业证成绩单
 
Item # 8 -- Tuxedo Columbine 3--way Stop
Item # 8 -- Tuxedo Columbine 3--way StopItem # 8 -- Tuxedo Columbine 3--way Stop
Item # 8 -- Tuxedo Columbine 3--way Stop
 
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...
Writing Sample-Title: Pioneering Urban Transformation: The Collective Power o...
 
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptx
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptxMHM Roundtable Slide Deck WHA Side-event May 28 2024.pptx
MHM Roundtable Slide Deck WHA Side-event May 28 2024.pptx
 

Developing new zynq based instruments

  • 1. CCFE is the fusion research arm of the United Kingdom Atomic Energy Authority. This work was funded by the RCUK Energy Programme [grant number EP/I501045] . Developing new Zynq based instruments using Koheron-SDK graham.naylor@ccfe.ac.uk
  • 2. • Why use an FPGA and what is Zynq? • Setting up the Koheron-SDK • Looking around the SDK • Using IP integrator and writing new IP cores • Define our instrument • Red Pitaya • Build and develop the instrument (add DSP) • Make the instrument on the target board • Test the instrument Building an instrument from scratch Slide 2 Developing Zynq based instruments using Koheron-SDK April 2017
  • 3. • FPGAs now contain a huge number of logic gates for computation (Modern high end CPUs and GPUs have up to 15 billion transistors – current FPGAs can have over 30 billion and continue to scale) • Good at doing ultra fast hard real-time, with DSP throughput way exceeding that of CPUs and GPUs • Zynq incorporates 1 - 4 ARM cores and can run a full OS to interface with high level applications (UI) Why use an FPGA and what is Zynq? Slide 3
  • 4. The challenge is to seamlessly make use of the FPGA (logic part) and the CPU (software programmed). Many tools exist and Xilinx provide so called ‘High Level Synthesis’ and ‘SDSoC’ (Software Defined System on a Chip) in order to provide an easy way in for software programmers used to C/C++. This does however require the use of a relatively small library set of functions (IP) provided with a logical description (that will effectively provide an accelerated function). This functions are then orchestrated from the software level. Integrating IP using a tool from Xilinx called ‘IP Integrator’ works at the logical level and allows more tightly integrated hardware processes for very high speed digital signal processing with complex functions. The Koheron-SDK allows the use of IP integrator, while providing a clean interface to a C++/python environment on the processor, without writing any code in an HDL (Hardware Definition Language). Which development environment to use? Slide 4
  • 5. The Koheron Instrument build procedure This is the title of the slide and the date it was written Slide 5 Build of instrument from definition files on the left orchestrated by a make file Build of instrument from definition files on the left orchestrated by a make file
  • 6. • Visit https://www.koheron.com/software-development-kit/ • Builds on methodology developed by Pavel Demin (https://github.com/pavel-demin/red-pitaya-notes) • Runs on Ubuntu (Works well on a virtual machine) • Follow instructions on Koheron site to install dependencies and clone repository from Github -essentially clone repository and run: sudo –H make setup Setting up the Koheron-SDK Slide 6
  • 7. • -> Look at directory structure: fpga/cores, examples/xxx (formerly instruments/xxx), tmp/, boards/redpitaya (xdc in config) Depending on which version of Vivado (eg 2016.2) you have, may need to edit fpga/settings64.sh to match (currently expects 2016.4). Various build activities co-ordinated by ‘make’ commands Note make files currently (April 17) work in Python 2.7 or 3.5 (Anaconda allows switching between python installations). You can set up environments to be able to switch: conda create –n py27 python=2.7 conda create –n py35 python=3.5 switch to it using source activate py27 If using vivado 2016.2 use the version switch when using ‘make’ commands (eg- make VIVADO_VERSION=2016.2 CONFIG=examples/led-blinker/config.yml ) Looking around the SDK Slide 7
  • 8. The whole logic part of the design is encapsulated in the IP integrator ‘Block Diagram’. No design is held outside this diagram, but is automatically wrapped in an HDL wrapper. Connections to physical pins needs to be defined – this is contained in the xdc files provided. To write a new core block to be used in the block diagram: Create a new directory for your block definition: ../fpga/cores/newcore_vx_x Insert: hdl definition – eg ‘newcore.v’ ‘core_config.tcl’ (see another core for an example) ‘newcore_tb.v’ (if you wish to test it) To test it use: make CORE=fpga/modules/newcore_vx_x test_core Include core name in the config.yml file of the instrument using it (then will build automatically) Using IP integrator and writing new IP cores Slide 8
  • 9. Create a new directory for your new instrument: ../instruments/my_instrument Three files are needed: config.yml (board to be used, required cores, memory map, configuration and status registers required, fixed parameters, relevent xdc constraint files for the board being used, and the server and drivers required – work from an existing example) block_design,tcl (work from an instrument with similar needs and remove what is not needed and edit – see later) my_instrument.hpp (again work from an existing instrument and edit to include the controls needed) Optionally: test.py ( a test python script to test or make use of the required functions – see existing examples in other instruments) Web interface defined by one or more typescript files Define a new instrument Slide 9
  • 10. • Start with a block_diagram.tcl copied from a similar instrument example (ie has the interfaces you might need). Remove the bits you don’t need. What is missing can be created in ip-integrator (Vivado tool). • Create the block diagram using: make CONFIG=instruments/my_instrument block_design - This opens Vivado Once you have the design in Vivado with the block diagram open: • Edit the block diagram and add the IP you need and connect up. • Export the block diagram to a tcl file in the instrument directory and call it ‘block_diagram.tcl’, replacing the original using file>export>Export Hardware…, or the command: write_bd_tcl -force <path to:->/koheron- sdk/instruments/sdr/block_design.tcl> • Exit Vivado Create the block diagram Slide 10
  • 11. • An SD card on the Red Pitaya host is needed with the Linux OS set up. A pre- made SD card image can be downloaded from the Koheron web site, or the full SD card built using (where <my_instrument> is the name of the specific instrument directory containing the design of the instrument to be created): make CONFIG=instruments/<my_instrument>/config.yml all # instrument, os, (device tree, U-boot and Linux kernel), drivers + web server. sudo bash ./os/scripts/ubuntu-development.sh tmp/<my_instrument> ./os tmp/<my_instrument>/os <my_instrument> # SD card image with Ubuntu 16.04 root file system Copy image from tmp/<my_instrument> directory on to an SD card using image writing software (eg dd on linux or HDD Raw copy tool on Windows) – warning, sd card images tend to be rather large and you shouldn’t really need to keep more than one. • If updating the instrument bitfile or adding a new one run: make CONFIG=instruments/<my_instrument>/config.yml HOST=<IP address> run This builds and downloads the required bit file and drivers to the target board • In case of problems in bit file generation, open the created xpr file: tmp/<instrument name>.xpr • Locate errors and change implementation strategy if necessary (due to failure to close timing for example), eg to ‘Performance ExplorePostRoutePhysOpt’ Create the instrument and send to target Slide 11
  • 12. • Aim is not to build a high performance polished instrument (for that see http://pavel-demin.github.io/red-pitaya-notes/) • Purpose is to show how to build an instrument using signal processing techniques within IP integrator of Vivado and deploy on the Red Pitaya as an example to show how quickly it can be done. • Walk through video of the steps in the videos (links at end of this presentation). • Based on a Software Defined Radio (SDR) which uses a homodyne receiver demodulating an AM signal with the layout below performed in logic on the FPGA: Hands-on example of a software defined radio on the Red Pitaya Slide 12 ADC decode ADC decode Local Oscillator Local Oscillator LPFLPF LPFLPF CORDICCORDIC DAC output DAC outputAntenna In I Q I Q A φ FM demodulation/QPSKdecode/…. To speaker PS controlPS control LPFLPF
  • 13. • Loop aerial uses about 1.5m of 10 way ribbon cable in a loop with the connections staggered to make 10 turns. Ribbon cable reduces the parasitic capacitance of the loop and parallel capacitance is added to achieve resonance at the frequency required. In our case around 400pF and a 60pF adjustable capacitor were used to tune to 909kHz • An adapter was used to adapt from the SMA output of the DAC and a 3.5mm jack socket to connect a headset (or speakers) Assemble loop aerial and headset connection This is the title of the slide and the date it was written Slide 13
  • 14. • Open the web site http://koheron/ if connected on the same subnet. Find the ip address by typing: nslookup koheron on a local machine if wishing to connect to it remotely. • The web page will allow the configuration parameters to be set and the status values to be read. • Test other functionality using python test programs, such as in the examples. • For streaming of large volumes of fast data, the python program could be run on the Zynq ARM and connecting to 127.0.0.1 • For high bandwidth data acquisition, the FPGA program should store directly to DDR and the ARM read the data post-shot (via DMA or direct write through a memory interface ‘MIG’ on the PL part of the Zynq). Hands-on video at: Files required for this design at: https://my.pcloud.com/publink/show?code=kZhxrAZ8srvxsa0SKBTue6ITJDmvySgGXkX Test the instrument Slide 14
  • 15. Download SD card image from Koheron site and extract to a .img file. Insert SD card and unmount: sudo fdisk –l (To find name of drive eg /dev/mmcbkl0 ) sudo umount /dev/mmcbkl0 (or whatever drive name from above) Copy image on to SD card: sudo dd if=/dev/mmcblk0 of=……/<sd-card-copy>.img Copying file to SD card using dd on Linux This is the title of the slide and the date it was written Slide 15
  • 16. • Index.html at /usr/local/www on Koheron instrument target • Type script pages (.ts files) defined on development machine in <instrumentName>/web and listed in app.ts are zipped (by the make process) and sent over to the target and compiled in to app.js at run time for the live instrument in /tmp/live-instrument/ on the target to provide an interactive web page. Web interface This is the title of the slide and the date it was written Slide 16
  • 17. • Currently 3 hands on videos are available: i) Looking round the Koheron-SDK ii) Building the Software Defined Radio in IP integrator iii) Building the SDR instrument using Make files and testing using a simple client application iv) Web interface (TBD) Tutorial videos This is the title of the slide and the date it was written Slide 17