FPGA pro BFU. Marek Vašut <marex@denx.de> October 10, 2015



Similar documents
Model-based system-on-chip design on Altera and Xilinx platforms

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

The Universal Boot Loader ( Das U-Boot )

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Chapter 7 Memory and Programmable Logic

Altera Error Message Register Unloader IP Core User Guide

LogiCORE IP AXI Performance Monitor v2.00.a

Open Flow Controller and Switch Datasheet

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

9/14/ :38

System on Chip Platform Based on OpenCores for Telecommunication Applications

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

AC : PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)

The Advanced JTAG Bridge. Nathan Yawn 05/12/09

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

FPGA Design From Scratch It all started more than 40 years ago

A Verilog HDL Test Bench Primer Application Note

7a. System-on-chip design and prototyping platforms

Digital Systems Design! Lecture 1 - Introduction!!

Qsys and IP Core Integration

MAX II ISP Update with I/O Control & Register Data Retention

Low Cost System on Chip Design for Audio Processing

All Programmable Logic. Hans-Joachim Gelke Institute of Embedded Systems. Zürcher Fachhochschule

Arbitration and Switching Between Bus Masters

KIP Heidelberg. Norbert Abel. SysCore 1.0. Firmware and Software Aspects

Document ID: FLXN111 PRODUCTS AND LICENSING

The new frontier of the DATA acquisition using 1 and 10 Gb/s Ethernet links. Filippo Costa on behalf of the ALICE DAQ group

Hardware and Software

Qsys System Design Tutorial

Digital Circuit Design Using Xilinx ISE Tools

Kirchhoff Institute for Physics Heidelberg

SPI Flash Programming and Hardware Interfacing Using ispvm System

Introduction. Jim Duckworth ECE Department, WPI. VHDL Short Course - Module 1

NIOS II Based Embedded Web Server Development for Networking Applications

路 論 Chapter 15 System-Level Physical Design

International Journal of Scientific & Engineering Research, Volume 4, Issue 6, June ISSN

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

Chapter 13. PIC Family Microcontroller

Video and Image Processing Design Example

CSE467: Project Phase 1 - Building the Framebuffer, Z-buffer, and Display Interfaces

Altera Advanced SEU Detection IP Core User Guide

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Architekturen und Einsatz von FPGAs mit integrierten Prozessor Kernen. Hans-Joachim Gelke Institute of Embedded Systems Professur für Mikroelektronik

10/100/1000Mbps Ethernet MAC with Protocol Acceleration MAC-NET Core with Avalon Interface

Embedded Linux RADAR device

Introduction to Digital Design Using Digilent FPGA Boards Block Diagram / Verilog Examples

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

ECE 451 Verilog Exercises. Sept 14, James Barnes

FSMD and Gezel. Jan Madsen

White Paper FPGA Performance Benchmarking Methodology

Registers & Counters

Arria V Device Handbook

Building Blocks for PRU Development

Prototyping ARM Cortex -A Processors using FPGA platforms

Vivado Design Suite Tutorial

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Reconfigurable Computing. Reconfigurable Architectures. Chapter 3.2

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus II 12.0

Modeling Registers and Counters

Pre-tested System-on-Chip Design. Accelerates PLD Development

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Lab Experiment 1: The LPC 2148 Education Board

Bus Master Performance Demonstration Reference Design for the Xilinx Endpoint PCI Express Solutions

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

MONOCHROME RGB YCbCr VIDEO DIGITIZER

Embedded Electric Power Network Monitoring System

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

Digital Systems. Role of the Digital Engineer

Eli Levi Eli Levi holds B.Sc.EE from the Technion.Working as field application engineer for Systematics, Specializing in HDL design with MATLAB and

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

ELECTENG702 Advanced Embedded Systems. Improving AES128 software for Altera Nios II processor using custom instructions

AXI Performance Monitor v5.0

EEM870 Embedded System and Experiment Lecture 1: SoC Design Overview

Avalon Interface Specifications

Attention. restricted to Avnet s X-Fest program and Avnet employees. Any use

Design of Digital Circuits (SS16)

BIRD Internet Routing Daemon

Computer Architecture

Arria 10 Avalon-MM DMA Interface for PCIe Solutions

Computer Organization and Components

USB 3.0 Connectivity using the Cypress EZ-USB FX3 Controller

Altera SoC Embedded Design Suite User Guide

SYSTEM-ON-PROGRAMMABLE-CHIP DESIGN USING A UNIFIED DEVELOPMENT ENVIRONMENT. Nicholas Wieder

Hardware Implementations of RSA Using Fast Montgomery Multiplications. ECE 645 Prof. Gaj Mike Koontz and Ryon Sumner

USB-Blaster Download Cable User Guide

USB-Blaster II Download Cable User Guide

SDLC Controller. Documentation. Design File Formats. Verification

AMC13 T1 Rev 2 Preliminary Design Review. E. Hazen Boston University E. Hazen - AMC13 T1 V2 1

Avoiding pitfalls in PROFINET RT and IRT Node Implementation

Example-driven Interconnect Synthesis for Heterogeneous Coarse-Grain Reconfigurable Logic

Systemy wbudowane. Współczesne technologie implementacji mikrokontrolerów i systemów wbudowanych. Copyright 2007 Frank Vahid

Xenomai: integration and qualification of a real time operating system ARMadeus Systems

PMC-XM-DIFF & EADIN/MODBUS Virtex Design

WiSER: Dynamic Spectrum Access Platform and Infrastructure

Transcription:

October 10, 2015

Marek Vašut Custodian at U-Boot bootloader Linux kernel hacker oe-core contributor (Yocto/OE/Poky) FPGA enthusiast

Obsah Co jsou PLD, historie PLD Dostupné vývojové kity Jak programovat PLD a demo

Co je PLD Programovatelný obvod umožnující implementovat uživatelskou logickou funkci Y = f (A 0,..., A n ) A 0,..., A n {0, 1}; Y {0, 1}

Motivace Co lze s PLD dělat? Blikat LED :-) Samplování rychlých dějů (např. z ADC) Generováni rychlých dějů (např. pro DAC) Implementace obskurních sběrnic a protokolů Rychlé paralelní transformace (např. obrazu)... Syntetizovat CPU a nabootovat např. Linux Existuje model ARM (arm7tdmi, arm9,... ) Existuje model SuperH2 (J-core, J2) Existuje model OpenRISC, RISC-V,... Existuje model m68k, Z80, MOS6502 Existuje model i486sx (ao486), Pentium (v586)...

Initializing cgroup subsys cpu Linux version 4.3.0-rc1-next-20150918-dirty (marex@bfu)(gcc version 5.2.0 (GCC) ) #86 Sat Sep... bootconsole [early0] enabled early_console initialized at 0xe8004d50 [...] Memory: 21140K/294912K available (2604K kernel code, 88K rwdata, 496K rodata, 5584K init, 102K... NR_IRQS:64 nr_irqs:64 0 clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns Console: colour dummy device 80x25 Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lp... pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns NET: Registered protocol family 16 clocksource: Switched to clocksource nios2-clksrc [...] Poky (Yocto Project Reference Distro) 1.8+snapshot-20150918 generic-nios2 /dev/ttyj0 generic-nios2 login: root root@generic-nios2:~# cat /proc/cpuinfo CPU: Nios II/fast MMU: present FPU: none Clocking: 50.00 MHz BogoMips: 100.00 Calibration: 50000000 loops HW: MUL: yes MULX: no DIV: yes Icache: 4kB, line length: 32 Dcache: 4kB, line length: 32 TLB: 16 ways, 128 entries, 8 PID bits

Historie PLD Prehistorie Rok 1970 Užití PROM pro implementaci logické funkce PLA: Programmable Logic Array 1970: TMS2000 programování při výrobě pomoci masky Později: PLA s programovatelnou AND a OR maticí

Historie PLD PAL a GAL První polovina 198x PAL Programmable Array of Logic 1978: MMI PAL Programovatelný AND Fixní OR Programoval se pomocí OTP fuses GAL Generic Array of Logic 1985: Lattice GAL Fuses se dají přeprogramovat PLA Ilia Kr. CC BY-SA 3.0: https://creativecommons.org/ licenses/by-sa/3.0/deed.en

Historie PLD CPLD Druha polovina 198x Complex Programmable Logic Device Složeno z Macrocells (architektura podobna GAL) Macrocells propojené přes programmable interconnect CPLD si drží naprogramovanou funkci i po odpojeni energie CPLD funguji okamžitě po připojení napájení Vhodné pro distribuci hodin na desce CPLD obsahuji paměť FLASH Problém Sea of gates

Historie PLD FPGA Druha polovina 197x 197x: Signetics 82S100 1984: Altera EP300 / 1985: Xilinx XC2064 Řeší problém Sea of gates Založeno na LUT tabulkach a SRAM: Nejmenší blok je LE (logic element) Sdruženo do LAB (logic array block) LAB propojeny přes programmable interconnect FPGA obsahuji i speciální bloky paměti, násobičky, PLL,...

Struktura LE Altera Cyclone II LE

Struktura FPGA W.T.Freeman http://www.vision.caltech.edu/cns248/fpga/fpga1a.gif CC BY 2.5: http://creativecommons.org/licenses/by/2.5/

Kity Altera Terasic DE0-Nano Cyclone IV / E Terasic DE0-Nano-SoC Cyclone V / SE WaveShare CoreEP4CE6 Cyclone IV / E Pozor, Cyclone III a starší nebrat, novy Quartus II je nepodporuje. DE0-Nano DE0-Nano-SoC CoreEP4CE6

Kity Xilinx I Avnet Microboard Spartan 6 I Papilio Duo Pro Spartan 6 I Numato Mimas V2 Spartan 6 Microboard Papilio Duo Marek Vas ut <marex@denx.de> Mimas V2

Kity Lattice ice40 IceStick Open-Source toolchain Project IceStorm

Nastroje pro práci s FPGA Kazdy výrobce má vlastni nastroje: Xilinx Vivado / Xilinx ISE Altera Quartus II Nastroje jsou obecně closed-source :-( Formát souboru s obsahem FPGA je proprietární :-( Základní nastroje jsou dostupné zdarma i pro Linux Obsahuji dostatek funkcionality

HDL Obsah FPGA se modeluje v HDL HDL Hardware Description Language Dnes dva hlavni HDL Verilog a VHDL Nastroje umožňují HDL v projektech kombinovat Repositáře projektu se svobodnou licenci: OpenCores http://opencores.org/ OpenCores projects http://opencores.org/projects CERN Open HW Repo http://www.ohwr.org/

Modelování chování Modelování v HDL vs. psaní kódu pro CPU: Velmi odlišné a matoucí pro programátory :-) CPU: Programátor implementuje sekvenci popis algoritmu FPGA: Programátor implementuje hardware který vykonává funkci

Kombinatorická vs. Sekvenční logika Kombinatorická Vystup je okamžitý produkt vstupu assign Z = X ^ Y; Sekvenční logika Vystup je synchronizován hodinami always @(posedge clk) Z <= DAT;

Implicitní paralelismus Vše se spouští paralelně DEMO: podmíněný vyraz s přiřazením: 1 if (foo && bar) quux <= 2 b00; 2 else if (foo &&!bar) quux <= 2 b10; 3 else quux <= 2 b01;

Demo Verilog I DEMO: Blikání LED 1 module blink ( 2 input clk, 3 input reset, 4 5 output reg [7:0] led 6 ); 7 8 always @(posedge clk) begin 9 if (reset) 10 led <= 8 h00; 11 else 12 led <= led + 1; 13 end 14 15 endmodule

Demo Verilog II Instanciace modulu 1 module top ( 2 input CLOCK50, /* 50 MHz clock */ 3 input [7:0] KEY, 4 output [7:0] LED 5 ); 6 7 blink b ( 8.clk(CLOCK50), 9.reset(KEY[0]), /* Debouncing problem */ 10.led(LED) 11 ); 12 13 endmodule

Asynchronní signály FPGA je synchronní chip Lze mít vice hodinových domén Lze samplovat externí signály Přechod mezi doménami je potřeba ošetřit Existuje vice možností: Jeden signál Rada registru Citace Aplikace Grayových kódu Rychlá data Dual-port RAM jako FIFO

Demo Verilog III Synchronizace tlačítka 1 module top ( 2 input CLOCK50, /* 50 MHz clock */ 3 input [7:0] KEY 4 ); 5 6 reg [2:0] sync; 7 always @(posedge CLOCK50) 8 sync <= { sync[1:0], KEY[0] }; 9 wire risingedge = (sync[2:1] == 2 b01); 10 11... 12 13 endmodule

Vývoj a ladění Simulace (na počítači) Probing (na FPGA)

Simulace Simulační nastroje: Icarus Verilog http://iverilog.icarus.com/ ghdl http://home.gna.org/ghdl/ ModelSim http://en.wikipedia.org/wiki/modelsim/ Implementuje se testcase v rozšířeném HDL Po spuštění testcase lze studovat výsledek Zobrazit waveformy různých signálu Dekódovat a analyzovat sběrnice Provádět triggerovani na komplexních podmínkách...

Probing Používá se ke sledování chování FPGA Lze si představit jako bus analyzer v FPGA Nastroje pro probing jsou např. Altera SignalTap FPGA design se rozšíří o IP core pro probing Probing core se řídí pomoci debugovaci sondy (např. přes JTAG) Pozor, probe core ukládá data do FPGA a FPGA má omezené množství interní paměti

Strukturovaní designu HDL soubory základní stavební kamen IP block kolekce HDL souboru FPGA design kolekce IP bloku Pro usnadnění práce s komplexními designy dodávají výrobci FPGA high-level tooly, např. Altera QSys.

Další odkazy Srozumitelný článek o FPGA (CZ) FPGA4FUN: Vysvětlení detailu FPGA (EN) ASIC-WORLD: Verilog detailně (EN) Exploring Arrow SoCkit (EN) OpenCores:IP cores se svobodnou licenci (EN) CERN OHWR (EN) Icarus: Překladač HDL Verilog (EN)

Konec Děkuji za pozornost! Kontakt: