差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
start [2016/05/25 12:04] gongyu [Lattice Diamond综合开发环境] |
start [2019/08/09 11:40] (当前版本) xiefan [Media] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | ====数字逻辑、可编程逻辑及FPGA==== | + | #FPGA related resources |
- | ===数字逻辑基础=== | + | |
- | ===可编程逻辑=== | + | ##Vendors |
- | ===FPGA的构成及应用=== | + | |
- | ===[[FPGA设计流程]]=== | + | https://www.altera.com – Altera FPGA supplier site |
- | ====小脚丫FPGA学习平台介绍==== | + | |
- | 小脚丫FPGA学习平台是摩尔吧孵化器专门针对[[FPGA]]初学者打造的一款性价比最高、学习门槛最低的学习模块,它以[[Lattice Semiconductor]]公司[[XO2-4000]]器件为核心,具有开关、按键输入以及单色LED、三色[[LED]]以及2个发光数码馆进行显示。其封装方式兼容标准的[[DIP40]]封装,能够直接插在面包板上或以模块的方式放置在其它电路板上以即插即用的方式,大大简化系统的设计。 | + | https://www.altera.com/events/northamerica/intel-soc-fpga-developer-forum/overview.html - SoC Developers Forum |
- | {{ :step_fpga.jpg?600|}} | + | |
- | {{ :xo2_selection.png |}} | + | https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/tt/tt_my_first_fpga.pdf - First FPGA design tutorial |
- | ===功能介绍=== | + | |
- | - 食指大小——目前最小的FPGA开发板,尺寸52mm*18mm,即插即用; | + | http://www.microsemi.com/products/fpga-soc/fpga-and-soc Microsemi FPGA supplier site |
- | - USB供电,自带板载编程器,无需额外配置FPGA下载线 | + | |
- | - LCMXO2-1200,性价比最高最适合的FPGA芯片 | + | http://www.latticesemi.com/en/Products.aspx - Lattice Semiconductor FPGA supplier site |
- | - 既可作学习数字逻辑的FPGA开饭,也可作核心功能模块使用,适合各种DIY和原型设计 | + | |
- | - 丰富的实例、代码支持 | + | http://www.xilinx.com – Xilinx FPGA supplier Site |
- | ===硬件连接=== | + | |
- | {{ :stepfpga_v1_connection.png |}} | + | http://www.cypress.com/products/programmable-system-chip-psoc - Cypress PSoC supplier site |
- | - FPGA芯片:LCMXO2-1200HC-4MG132 | + | |
- | - USB 5V供电 | + | http://www.quicklogic.com – Quicklogic programmable logic supplier site |
- | - 25MHz时钟 | + | |
- | - 3个LED,一路电源指示,两路用户LED | + | http://www.achronix.com/?url=sourcetech411 – Achronix FPGA supplier site |
- | - 2个按键 | + | |
- | - 2个RGB LED | + | http://www.atmel.com/products/programmable-logic/field-programmable-gate-array/default.aspx - Atmel FPGA supplier site |
- | - 一路I2C接口 | + | |
- | - SPI接口(可设主从模式) | + | http://www.e2v-us.com – e2V site, military FPGAs |
- | - JTAG接口 | + | |
- | - 29个GPIO接口 | + | ##Media |
- | {{ :stepfpga_connection_table.png |}} | + | |
- | {{ :stepfpga_v1_connection_led.png |}} | + | Magazines: [[http://www.edn.com/|EDN]] . [[http://www.electronicdesign.com/|Electronic Design]. [[http://www.eetimes.com/|EETimes]] . [[http://www.circuitcellar.com/|Circuit Cellar Ink]] . [[http://www.popsci.com/|Popular Science]] . [[http://www.ddj.com/|Dr. Dobbs Journal ]]. [[http://www.ieee.org/|IEEE]] |
+ | |||
+ | Magazines: [[http://www.embedded.com/|Embedded Systems Design]]. [[http://www.embedded-control-europe.com/magazine|Embedded Control Europe ]]. [[http://www.embedded-computing.com/|Embedded Computing Design]] . [[http://www.mil-embedded.com/|Military Embedded Systems]] | ||
+ | |||
+ | http://www.eetimes.com/programmable-logic-designline.asp - Programmable Logic Designline | ||
+ | |||
+ | http://www.eetimes.com/soc-designline.asp - SoC Designline | ||
+ | |||
+ | http://www.eetimes.com/document.asp?doc_id=1274593 – how to design an FPGA from scratch | ||
+ | |||
+ | http://www.eetimes.com/author.asp?section_id=216&doc_id=1326502 – FPGAs for MCU designers | ||
+ | |||
+ | |||
+ | ##Design Tools | ||
+ | |||
+ | http://www.mathworks.com/solutions/fpga-design/ - FPGA design with Matlab | ||
+ | |||
+ | http://www.mathworks.com/products/?s_tid=gn_ps – MATLAB/Simulink for FPGA Design | ||
+ | |||
+ | http://www.altium.com/files/training/module5fpgadesign.pdf - Altium Tool for FPGA design | ||
+ | |||
+ | http://www.synopsys.com/tools/implementation/fpgaimplementation/Pages/default.aspx - Synposis Tools for FPGA Design (Synplicity) | ||
+ | |||
+ | http://www.mentor.com/products/fpga/ - Mentor tools for FPGA Design | ||
+ | |||
+ | https://www.cadence.com/rl/resources/white_papers/fpga_wp.pdf - Cadence FPGA design guidance article | ||
+ | |||
+ | https://www.aldec.com/en/solutions/fpga_design - Aldec Tools for FPGA design | ||
+ | |||
+ | http://opencores.org/projects - Open Source IP blocks for FPGAs | ||
+ | |||
+ | ##Tutorials | ||
+ | |||
+ | http://www.design-reuse.com/articles/18067/fpga-system-designs-methodology.html - FPGA design guide | ||
+ | |||
+ | https://embeddedmicro.com/tutorials/mojo/ - FPGA tutorial | ||
+ | |||
+ | www.fpga4fun.com/ and http://www.fpga4fun.com/FPGAsoftware1.html - FPGA HDL tools and code | ||
+ | |||
+ | http://www.fpgadeveloper.com – mostly a consultant site. | ||
+ | |||
+ | http://www.arrow.com/bemicro/ - Arrow FPGA kits | ||
+ | |||
+ | https://www.arrow.com/en/design-center - Arrow Design portal | ||
+ | |||
+ | http://www.siliconexpert.com - component search tool | ||
+ | |||
+ | https://www.sparkfun.com/news/1203 - FPGA Design Tutorial | ||
+ | |||
+ | https://electronics.stackexchange.com/questions/41528/fpga-programming-where-to-begin - FPGA FAQ | ||
+ | |||
+ | ##Embedded | ||
+ | |||
+ | http://www.embedded.com – Essential site for all things embedded | ||
+ | |||
+ | http://www.embedded.com/design/prototyping-and-development/4006429/FPGA-programming-step-by-step - Programming FPGAs | ||
+ | |||
+ | http://www.embedded.com/education-training/courses - free classes to learn more | ||
+ | |||
+ | http://www.embedded.com/magazines - 20 years of industry articles on the best of embedded design | ||
+ | |||
+ | http://www.embedded.com/education-training/tech-papers - embedded papers | ||
+ | |||
+ | http://www.ganssle.com – Jack Ganssle, embedded guru “Perfecting the Art of Building Embedded Systems” | ||
+ | |||
+ | http://www.ganssle.com/bkreviews.htm - best books on embedded | ||
+ | |||
+ | http://www.ganssle.com/tools.htm#texteditor – best tools for embedded | ||
+ | |||
+ | http://www.barrgroup.com/Embedded-Systems/Books - more embedded books | ||
+ | |||
+ | http://www.barrgroup.com/Embedded-Systems/How-To - articles on embedded | ||
+ | |||
+ | http://www.koopman.us/embsys/books/ - even more best books | ||
+ | |||
+ | |||
+ | ##Software Tools | ||
+ | |||
+ | http://mbed.org/ - site for online tools to use with ARM processors | ||
+ | |||
+ | http://freerangefactory.org – open embedded projects site | ||
+ | |||
+ | http://www.freertos.org/ - site for FreeRTOS | ||
+ | |||
+ | http://opensource.org – initiative for open source software | ||
+ | |||
+ | https://www.96boards.org – open source hardware and software together | ||
+ | |||
+ | https://www.linaro.org – ARM ecosystem organizer | ||
+ | |||
+ | http://sourceforge.net – repository of open source software | ||
+ | |||
+ | http://www.fsf.org – Free software foundation | ||
+ | |||
+ | http://www.gnu.org - central site for free software, which is not the same as open see http://www.gnu.org/philosophy/open-source-misses-the-point.en.html | ||
+ | |||
+ | https://gcc.gnu.org – the GNU compiler | ||
+ | |||
+ | http://www.gnu.org/software/gdb/ - the GNU Debugger | ||
+ | |||
+ | https://launchpad.net/gcc-arm-embedded - GCC for ARM embedded | ||
+ | |||
+ | https://www.iar.com - IAR dev tool site | ||
+ | |||
+ | http://www.keil.com - Keil dev tool site | ||
+ | |||
+ | http://www.lauterbach.com/frames.html?home.html - Lauterbach dev tool site | ||
+ | |||
+ | http://www.isystem.com/products/software/winidea - WinIdea IDE site | ||
+ | |||
+ | https://www.eclipse.org - Eclipse IDE site | ||
+ | |||
+ | http://bpmmicro.com/programmers/ BPMicro programmer site | ||
+ | |||
+ | http://www.macraigor.com - MacGreigor programmer site | ||
+ | |||
+ | http://micrium.com - Micrium OS site | ||
+ | |||
+ | http://www.qnx.com - QNX OS site | ||
+ | |||
+ | http://www.windriver.com/products/vxworks/ - VxWorks OS Site | ||
+ | |||
+ | http://www.linux.com – Main Linux OS Site | ||
+ | |||
+ | https://www.yoctoproject.org - Yocto embedded linux package | ||
+ | |||
+ | http://www.angstrom-distribution.org – Angstrom embedded linux distribution | ||
+ | |||
+ | http://elinux.org/Main_Page - Embedded Linux site | ||
+ | |||
+ | http://www.timesys.com – commercial embedded Linux | ||
+ | |||
+ | http://www.uclinux.org – Linux for processors without an MMU | ||
+ | |||
+ | http://www.openembedded.org/wiki/Main_Page - build framework for embedded linux | ||
+ | |||
+ | [[http://cslibrary.stanford.edu/|Essential C (Tutorial/Refresher), Programming Information]] | ||
+ | |||
+ | [[http://publications.gbdirect.co.uk/c_book/|The C Book (free on-line book)]] . [[http://ecee.colorado.edu/~mcclurel/the_c_book.pdf|PDF Version]] | ||
- | ===使用方法=== | ||
- | 上电测试。Step FPGA开发板通过USB供电,采用了常见Micro USB接口。一般的安卓手机USB线均可使用。开发板出厂内置测试程序,上电后: | ||
- | - Step FPGA开发板连接USB电源,电源指示灯点亮。 | ||
- | - 两个用户LED灯交替闪烁,间隔0.5秒。 | ||
- | - RGB LED闪烁分两种模式,上电默认流水灯模式。 | ||
- | - 流水灯:RGB LED交替闪烁红绿蓝。 | ||
- | - 交通灯:两个RGB LED异步闪烁红绿蓝,如同交通信号。 | ||
- | - 按键K2切换RGB LED显示模式。 | ||
- | - 按键K1用于复位功能。 | ||
- | {{ :stepfpga_v1_powerup.jpg |}} | ||
- | ===扩展应用=== | ||
- | ====Lattice Diamond综合开发环境==== | ||
- | - [[软件安装及配置]] | ||
- | - [[设计流程]] | ||
- | - [[综合]] | ||
- | - [[仿真]] | ||
- | - [[资源报告]] | ||
- | ====经典案例==== | ||
- | ===组合逻辑=== | ||
- | - [[点亮LED灯]]:掌握LED的工作原理以及通过PWM控制LED灯的亮度 | ||
- | - [[7段数码管]] | ||
- | ===时序逻辑=== | ||
- | - [[轮流点亮的流水灯]]:掌握时钟分频、时序控制 | ||
- | - [[能够控制亮度的呼吸灯]]:通过PWM来控制LED灯的亮度 | ||
- | - [[旋转编码器控制]]:通过相位检测 | ||
- | ===状态机=== | ||
- | - [[交通灯控制]] | ||
- | - [[简单的电子琴]] | ||
- | - [[LED点阵显示屏]] | ||
- | - [[数字钟]] | ||
- | - [[LCD显示控制]] | ||
- | ===测试测量原理相关=== | ||
- | - [[DAC产生直流电压]]:通过[[SPI]]串行总线的低速数模变换器[[DAC]]得到需要的直流电压,按键更改数字参数能够改变输出直流电压的值 | ||
- | - [[DAC生成正弦波]]:通过[[FPGA]]内部寄存器或调用内部IP核将内嵌的块RAM配置成1024深度,位宽为10位的ROM存储一个周期的正弦波波形信号,逻辑控制将波形表中的每个点通过DAC输出,生成模拟的正弦波信号 | ||
- | - [[任意波形产生]]:通过[[DDS]](直接数字合成的方式)从内建的波形表中按照相位控制字获取相应相位的波形幅度值,再通过DAC得到模拟的任意频率的信号,改变波形表中的信号波形,即可得到不同的模拟波形输出。 | ||
- | - [[直流电压测量]]:通过SPI串行总线的低速模数变换器ADC将被测量的直流电压变换为数字量,在LED(8个)上通过点亮不同的LED显示其电压幅度,也可以通过2个7段发光数码管显示其电压值,或在LCD上以数字量的方式显示实际的电压值,将0-1023的数字量转变为0-3.3V的直流电压值。 | ||
- | - [[简易示波器]] | ||
- | - [[数字频率计]] | ||
- | - [[超声波测距]] | ||
- | - [[通用红外遥控]] | ||
- | ===在FPGA内通过软核构成嵌入式系统=== | ||
- | XO2-4000内部有足够的逻辑功能构成[[MCU]]中的[[ALU]],内部的块RAM可以构成MCU需要的内部存储寄存器,另外XO2系列有硬化的[[SPI]]、[[I2C]]以及[[定时器]]功能,可以构成各种8位、32位的微处理器MCU,[[Lattice Diamond]]系统自带支持Wishbone总线的8位单片机[[MICO8]]内核以及32位的[[MICO32]]内核。据说这两个内核都是来自于著名的开源硬件网站www.opencores.org,在这个网站上可以看到各种经过工程师验证过的内核,比如[[8051]]、[[OpenRisc]]、[[AVR]]、[[MIPS32]],有兴趣的同学可以移植到我们的小脚丫平台上。 | ||
- | - [[MICO8单片机]] | ||
- | - [[MICO32处理器]] |