OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to...
-
Upload
truongngoc -
Category
Documents
-
view
221 -
download
0
Transcript of OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to...
![Page 1: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/1.jpg)
WebinarBreakdown:• Introduc*ontopseudorandomnumbergenerator(LFSR)code• ReviewofVerilogwrapperinterfacetomicrocontroller• Simula*onwithMentorGraphics®ModelSim®• SynthesisusingIntel®Quartus®PrimeLite• UploadtoFPGAviatheArduinoIDE• OverviewsoKwarelibrary• RunsimplesketchtodemonstratenewFPGAhardware
OpenXLR8:HowtoLoadCustomFPGABlocks
WebinarReplayfrom
January12,2017
![Page 2: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/2.jpg)
Presenters
JasonPecor BryanCrakerHarlieJuedes
![Page 3: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/3.jpg)
•LaptopwithWindowsorLinux(ToolsnotsupportedonMac)
• InstalledTools:–ArduinoIDE– IntelQuartusPrimeLiteEdi*on• IncludesModelsim-IntelFPGAEdi9onandMax10FPGAsupport
• AUSBMinicableforconnecRngXLR8boardtolaptop
Pre-Requisites
YouWillNeed:
Followtheinstructionshere:http://www.aloriumtech.com/openxlr8/
![Page 4: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/4.jpg)
• LFSRCodePackage:
h"ps://github.com/AloriumTechnology/XLR8LFSR
• ArduinoBoardLibraryURL:h"ps://raw.githubusercontent.com/AloriumTechnology/Arduino_Boards/master/package_aloriumtech_index.json
LFSRandBoardLibraryURLs
RenametoXLR8Build
MovetoArduinoLibrariesfile
![Page 5: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/5.jpg)
• GotoSketch->IncludeLibrary->ManageLibraries…
• Searchfor“XLR8”andinstallXLR8CoreandXLR8BuildTemplate
• GotoTools->Board->BoardsManager…• Searchfor“XLR8”andinstallAloriumXLR8Boards
ArduinoIDESetup
![Page 6: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/6.jpg)
Applica*onAccelerator&DevelopmentBoard
DesignedforArduinoDeveloperCommunity
BasedonIntel®MAX®10FPGA
ProgrammablewithArduinoIDE
WhatisXLR8?
Field-programmable
Gate Array
![Page 7: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/7.jpg)
WhyuseFPGA?
HIGHER-PERFORMANCE
FASTERAcceleration
Offload
![Page 8: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/8.jpg)
BoardLevelBlockDiagram
AnalogI/OPower/Reset
BarrelConnector
5VReg
3.3VReg
USB
OSC
ISP
JTAG
Op*onalEEPROM
DigitalI/O
3.3V/5VLevelShiK AnalogPreamps
3.3V/5VLevelShiK
FTDI
I2C
U169Package
![Page 9: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/9.jpg)
FPGABlockDiagram
AVRProcessorCore
ProgramMemoryandFlash
DataMemory
ADC
TimerPWM
I2C
SPI
UART
PLL
ConfigFlash
Image1
Image0
Reconfig
XceleratorBlocks(ProgrammableFPGAFabric)
PinMuxing
ProcessorB
us
![Page 10: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/10.jpg)
AnXceleratorBlock(XB)isanop*mizedhardwareimplementa*onofaspecificfunc*on.
CustomhardwareimplementedonthesamechipTightlyintegratedwiththemicrocontrollerXBscanaccessthesameregisterspace
Integratewiththeinstruc*onsofthemicrocontroller
XceleratorBlocks
Available XBs • Floa*ngPointMath• ServoControl•NeoPixelControl• EnhancedAnalog-to-DigitalFunc*onality
XB Roadmap •EventCountersandTimers•QuadratureEncoders/Decoders• PulseWidthModula*on(PWM)• Propor*onal-Integral-Deriva*ve(PID)control•Mul*pleUARTS
![Page 11: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/11.jpg)
OpenXLR8
HDL
MethodologythatallowsXLR8userstodeveloptheirownXceleratorBlocksanduploadthemtotheFPGA.
![Page 12: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/12.jpg)
Module-LevelDesignandSimulaRon
alorium_lfsr_tb.v
LFSR
Testbench
alorium_lfsr.v
LFSRModuleDesign
SimulationTestbench
• PseudorandomNumberGenerator• UsingaLinearFeedbackShiftRegister(LFSR)• 8-bit• 4-tap
![Page 13: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/13.jpg)
IntegraRonintoXLR8
xlr8_lfsr.v
alorium_lfsr.v
xlr8_top.v
xlr8_lfsr.v
alorium_lfsr.v
xlr8_d_mem
xlr8_avr_core
xlr8_p_mem
xlr8_gpio
XLR8Wrapper
XLR8Top-LevelVerilog
XLR8CoreComponents
![Page 14: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/14.jpg)
Synthesisxlr8_top.v
xlr8_lfsr.v
alorium_lfsr.v
xlr8_d_mem
xlr8_avr_core
xlr8_p_mem
xlr8_gpio
RPDFPGA
ProgrammingFile
xlr8_top.v
Optional–NotToday…
![Page 15: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/15.jpg)
UploadtoFPGA
XLR8RPD
![Page 16: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/16.jpg)
RunSketch
![Page 17: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/17.jpg)
Let’sDiveIn!
![Page 18: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/18.jpg)
BuildinganLFSRonanFPGA
HDL
![Page 19: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/19.jpg)
LinearFeedbackShiftRegister(LFSR)
D Q D Q D Q D Q D Q D Q D Q D Q0 1 2 3 4 5 6 7
assign feedback = ~(lfsr_data[7] ^ lfsr_data[5] ^ lfsr_data[4] ^ lfsr_data[3]);
XNOR
![Page 20: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/20.jpg)
SoftwareFunctionvsGeneratedAssemblyCode
![Page 21: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/21.jpg)
• RTL=Register-TransferLevel• HDLcode• Verilog/SystemVerilog• VHDL
• TheLFSRmodule,alorium_lfsr.v
RTLfortheLFSR
![Page 22: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/22.jpg)
• Thetestbench,alorium_lfsr_tb.v
Testbench
![Page 23: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/23.jpg)
• StartModelsim• File->New->Library…• Createthedefault“work”libraryinsideofourprojectRTLdirectory
• Compile->Compile…• Selectalorium_lfsr.vandalorium_lfsr_tb.v
• “Compile”andthen“Done”• Openthetestbenchintheworkarea
SimulatingtheTestbench
![Page 24: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/24.jpg)
• Selectourtestbenchsignalsandbringthemintoawaveswindow
• Hitthe“Run–all”button
SimulatingtheTestbenchContinued
![Page 25: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/25.jpg)
• xlr8_lfsr.v• ConnectsthesignalsfromtheXLR8coretotheLFSRmodule
• Instantiatesthealorium_lfsrmodule• Controlsregisteraccess
XLR8Module
![Page 26: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/26.jpg)
LFSRControl Address0xE0
Bit 7 6 5 4 3 2 1 0
Function Unused FreerunningMode
R/W R R R R R R R R/W
Initial 0 0 0 0 0 0 0 0
LFSRSeed Address0xE1
Bit 7 6 5 4 3 2 1 0
Function LFSRSeedData
R/W R/W R/W R/W R/W R/W R/W R/W R/W
Initial 0 0 0 0 0 0 0 0
LFSRData Address0xE2
Bit 7 6 5 4 3 2 1 0
Function LFSRResultData
R/W R R R R R R R R
Initial 0 0 0 0 0 0 0 0
RegisterDefinitions
![Page 27: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/27.jpg)
• xb_adr_pack.vh• Declaretheaddresslocationsofyourregisters
• RefertotheXLR8UserManualtofindopenregisterspace
XBAddresses
![Page 28: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/28.jpg)
IntegrationintoXLR8
xlr8_lfsr.v
alorium_lfsr.v
xlr8_top.v
xlr8_lfsr.v
alorium_lfsr.v
xlr8_d_mem
xlr8_avr_core
xlr8_p_mem
xlr8_gpio
XLR8Wrapper
XLR8Top-LevelVerilog
XLR8CoreComponents
![Page 29: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/29.jpg)
• xlr8_top.v• Instantiatethexlr8_lfsrmodule• Addthecontrolsignalsto“stgi_xf_io_slv_dbusout”and“stgi_xf_io_slv_out_en”
XLR8Top
![Page 30: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/30.jpg)
• xlr8_top.qsfunderthe“quartus”directory
• Addinourmodulefilesandtheregisteraddressfile
ModifytheProjectQSFFile
![Page 31: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/31.jpg)
• GotoSketch->IncludeLibrary->ManageLibraries…
• Searchfor“XLR8”andinstallXLR8CoreandXLR8BuildTemplate
• GotoTools->Board->BoardsManager…• Searchfor“XLR8”andinstallAloriumXLR8Boards
ArduinoIDESetup
![Page 32: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/32.jpg)
Synthesisxlr8_top.v
xlr8_lfsr.v
alorium_lfsr.v
xlr8_d_mem
xlr8_avr_core
xlr8_p_mem
xlr8_gpio
RPDFPGA
ProgrammingFile
xlr8_top.v
Optional–NotToday…
![Page 33: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/33.jpg)
• OpenQuartusandopenourprojectQPFfilewithFile->OpenProject…• BeginthecompilewithProcessing->StartCompilation• Aftercompilationiscompleted,File->ConvertProgrammingFiles…• OpenConversionSetupData,open“openxlr8.cof,”andGenerate
CompiletheProjectinQuartus
![Page 34: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/34.jpg)
UploadtoFPGA
XLR8RPD
![Page 35: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/35.jpg)
• OpentheArduinoIDE• UnderTools->BoardselectOpenXLR8• ConnectyourboardviaUSBandmakesureitisselectedinArduinounderTools->Port
• Tools->BurnBootloader
BurntheFPGAImage
![Page 36: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/36.jpg)
• XLR8_LFSR.h• DefinesthesameregisteraddressesasintheRTL
• SetsandreadstheLFSRregisters
ArduinoLibraryfortheLFSR
![Page 37: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/37.jpg)
• IncludetheXLR8_LFSR.h• Settheseed,enteralooptoprinttheresultoftheLFSRtoserialoutput
• Compileandrunontheboard
ArduinoLFSRExample
![Page 38: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/38.jpg)
AssemblyCode:SoftwarevsFPGA
![Page 39: OpenXLR8: How to Load Custom FPGA Blocks · • Review of Verilog wrapper interface to microcontroller ... • Using a Linear Feedback Shift Register (LFSR) • 8-bit • 4-tap. ...](https://reader031.fdocuments.us/reader031/viewer/2022022512/5ae5dca67f8b9aee078c1f35/html5/thumbnails/39.jpg)
Q&A