【E2348】SPI方式STM32与FPGA单向通信

2021-11-24 08:49:14      索炜达电子      613     

项目编号:E2348

文件大小:5.8M

源码说明:带中文注释

开发环境:Verilog

简要概述

本项目只做了FPGA向STM32发送数据,属于单向通信,另外,为了产生数据发送到STM32,FPGA程序中写了一个计数器,实际工程中根据自己的需求删除即可,FPGA中的SPI模块中有完整的发送接收程序,因为本次不需要FPGA接收数据,所以接收部分写出来了,但未例化到顶层文件。

使用平台:FPGA板+STM32板(我使用的是正点原子战舰板,根据自己的STM32板子,修改TFT驱动程序,SPI使用的是SPI2,可自行修改)

连接方式:查看目录下 IO分配.txt

【E2348】SPI方式STM32与FPGA单向通信

【E2348】SPI方式STM32与FPGA单向通信

目录│文件列表:

 └ STM32与FPGA通信_SPI方式

    └ STM32与FPGA通信

       │ IO分配.txt

       │ 读我.txt

       ├ fpga_spi

       │  │ dchufa.v

       │  │ spi.qpf

       │  │ spi.qsf

       │  │ spi.qws

       │  │ spi.v

       │  │ spi.v.bak

       │  │ spi_top.v

       │  │ spi_top.v.bak

       │  ├ db

       │  │  │ logic_util_heursitic.dat

       │  │  │ prev_cmp_spi.qmsg

       │  │  │ spi.(0).cnf.cdb

       │  │  │ spi.(0).cnf.hdb

       │  │  │ spi.(1).cnf.cdb

       │  │  │ spi.(1).cnf.hdb

       │  │  │ spi.(2).cnf.cdb

       │  │  │ spi.(2).cnf.hdb

       │  │  │ spi.asm.qmsg

       │  │  │ spi.asm.rdb

       │  │  │ spi.asm_labs.ddb

       │  │  │ spi.cbx.xml

       │  │  │ spi.cmp.bpm

       │  │  │ spi.cmp.cdb

       │  │  │ spi.cmp.hdb

       │  │  │ spi.cmp.idb

       │  │  │ spi.cmp.kpt

       │  │  │ spi.cmp.logdb

       │  │  │ spi.cmp.rdb

       │  │  │ spi.cmp_merge.kpt

       │  │  │ spi.cycloneive_io_sim_cache.45um_ff_1200mv_0c_fast.hsd

       │  │  │ spi.cycloneive_io_sim_cache.45um_ss_1200mv_0c_slow.hsd

       │  │  │ spi.cycloneive_io_sim_cache.45um_ss_1200mv_85c_slow.hsd

       │  │  │ spi.db_info

       │  │  │ spi.eda.qmsg

       │  │  │ spi.fit.qmsg

       │  │  │ spi.hier_info

       │  │  │ spi.hif

       │  │  │ spi.ipinfo

       │  │  │ spi.lpc.html

       │  │  │ spi.lpc.rdb

       │  │  │ spi.lpc.txt

       │  │  │ spi.map.ammdb

       │  │  │ spi.map.bpm

       │  │  │ spi.map.cdb

       │  │  │ spi.map.hdb

       │  │  │ spi.map.kpt

       │  │  │ spi.map.logdb

       │  │  │ spi.map.qmsg

       │  │  │ spi.map.rdb

       │  │  │ spi.map_bb.cdb

       │  │  │ spi.map_bb.hdb

       │  │  │ spi.map_bb.logdb

       │  │  │ spi.pplq.rdb

       │  │  │ spi.pre_map.hdb

       │  │  │ spi.pti_db_list.ddb

       │  │  │ spi.root_partition.map.reg_db.cdb

       │  │  │ spi.routing.rdb

       │  │  │ spi.rpp.qmsg

       │  │  │ spi.rtlv.hdb

       │  │  │ spi.rtlv_sg.cdb

       │  │  │ spi.rtlv_sg_swap.cdb

       │  │  │ spi.sgate.rvd

       │  │  │ spi.sgate_sm.rvd

       │  │  │ spi.sgdiff.cdb

       │  │  │ spi.sgdiff.hdb

       │  │  │ spi.sld_design_entry.sci

       │  │  │ spi.sld_design_entry_dsc.sci

       │  │  │ spi.smart_action.txt

       │  │  │ spi.sta.qmsg

       │  │  │ spi.sta.rdb

       │  │  │ spi.sta_cmp.8_slow_1200mv_85c.tdb

       │  │  │ spi.syn_hier_info

       │  │  │ spi.tiscmp.fastest_slow_1200mv_0c.ddb

       │  │  │ spi.tiscmp.fastest_slow_1200mv_85c.ddb

       │  │  │ spi.tiscmp.fast_1200mv_0c.ddb

       │  │  │ spi.tiscmp.slow_1200mv_0c.ddb

       │  │  │ spi.tiscmp.slow_1200mv_85c.ddb

       │  │  │ spi.tis_db_list.ddb

       │  │  └ spi.vpr.ammdb

       │  ├ incremental_db

       │  │  │ README

       │  │  └ compiled_partitions

       │  │     │ spi.db_info

       │  │     │ spi.root_partition.cmp.ammdb

       │  │     │ spi.root_partition.cmp.cdb

       │  │     │ spi.root_partition.cmp.dfp

       │  │     │ spi.root_partition.cmp.hdb

       │  │     │ spi.root_partition.cmp.kpt

       │  │     │ spi.root_partition.cmp.logdb

       │  │     │ spi.root_partition.cmp.rcfdb

       │  │     │ spi.root_partition.map.cdb

       │  │     │ spi.root_partition.map.dpi

       │  │     │ spi.root_partition.map.hbdb.cdb

       │  │     │ spi.root_partition.map.hbdb.hb_info

       │  │     │ spi.root_partition.map.hbdb.hdb

       │  │     │ spi.root_partition.map.hbdb.sig

       │  │     │ spi.root_partition.map.hdb

       │  │     └ spi.root_partition.map.kpt

       │  ├ output_files

       │  │  │ output_file.jic

       │  │  │ output_file.map

       │  │  │ spi.asm.rpt

       │  │  │ spi.cdf

       │  │  │ spi.done

       │  │  │ spi.eda.rpt

       │  │  │ spi.fit.rpt

       │  │  │ spi.fit.smsg

       │  │  │ spi.fit.summary

       │  │  │ spi.flow.rpt

       │  │  │ spi.jdi

       │  │  │ spi.map.rpt

       │  │  │ spi.map.smsg

       │  │  │ spi.map.summary

       │  │  │ spi.pin

       │  │  │ spi.sof

       │  │  │ spi.sta.rpt

       │  │  └ spi.sta.summary

       │  └ simulation

       │     └ modelsim

       │        │ spi.sft

       │        │ spi.vo

       │        │ spi_8_1200mv_0c_slow.vo

       │        │ spi_8_1200mv_0c_v_slow.sdo

       │        │ spi_8_1200mv_85c_slow.vo

       │        │ spi_8_1200mv_85c_v_slow.sdo

       │        │ spi_min_1200mv_0c_fast.vo

       │        │ spi_min_1200mv_0c_v_fast.sdo

       │        │ spi_modelsim.xrf

       │        └ spi_v.sdo

       └ stm32_spi

          ├ CORE

          │  │ core_cm3.c

          │  │ core_cm3.h

          │  └ startup_stm32f10x_hd.s

          ├ LCD

          │  │ font.h

          │  │ lcd.c

          │  └ lcd.h

          ├ OBJ

          │  │ core_cm3.crf

          │  │ core_cm3.d

          │  │ core_cm3.o

          │  │ delay.crf

          │  │ delay.d

          │  │ delay.o

          │  │ lcd.crf

          │  │ lcd.d

          │  │ lcd.o

          │  │ main.crf

          │  │ main.d

          │  │ main.o

          │  │ misc.crf

          │  │ misc.d

          │  │ misc.o

          │  │ spi.crf

          │  │ spi.d

          │  │ spi.o

          │  │ startup_stm32f10x_hd.d

          │  │ startup_stm32f10x_hd.o

          │  │ stm32f10x_crc.crf

          │  │ stm32f10x_crc.d

          │  │ stm32f10x_crc.o

          │  │ stm32f10x_dbgmcu.crf

          │  │ stm32f10x_dbgmcu.d

          │  │ stm32f10x_dbgmcu.o

          │  │ stm32f10x_fsmc.crf

          │  │ stm32f10x_fsmc.d

          │  │ stm32f10x_fsmc.o

          │  │ stm32f10x_gpio.crf

          │  │ stm32f10x_gpio.d

          │  │ stm32f10x_gpio.o

          │  │ stm32f10x_it.crf

          │  │ stm32f10x_it.d

          │  │ stm32f10x_it.o

          │  │ stm32f10x_rcc.crf

          │  │ stm32f10x_rcc.d

          │  │ stm32f10x_rcc.o

          │  │ stm32f10x_spi.crf

          │  │ stm32f10x_spi.d

          │  │ stm32f10x_spi.o

          │  │ stm32f10x_usart.crf

          │  │ stm32f10x_usart.d

          │  │ stm32f10x_usart.o

          │  │ sys.crf

          │  │ sys.d

          │  │ sys.o

          │  │ system_stm32f10x.crf

          │  │ system_stm32f10x.d

          │  │ system_stm32f10x.o

          │  │ Template.axf

          │  │ Template.build_log.htm

          │  │ Template.hex

          │  │ Template.htm

          │  │ Template.lnp

          │  │ Template_Template.dep

          │  │ usart.crf

          │  │ usart.d

          │  └ usart.o

          ├ STM32F10x_FWLib

          │  ├ inc

          │  │  │ misc.h

          │  │  │ stm32f10x_adc.h

          │  │  │ stm32f10x_bkp.h

          │  │  │ stm32f10x_can.h

          │  │  │ stm32f10x_cec.h

          │  │  │ stm32f10x_crc.h

          │  │  │ stm32f10x_dac.h

          │  │  │ stm32f10x_dbgmcu.h

          │  │  │ stm32f10x_dma.h

          │  │  │ stm32f10x_exti.h

          │  │  │ stm32f10x_flash.h

          │  │  │ stm32f10x_fsmc.h

          │  │  │ stm32f10x_gpio.h

          │  │  │ stm32f10x_i2c.h

          │  │  │ stm32f10x_iwdg.h

          │  │  │ stm32f10x_pwr.h

          │  │  │ stm32f10x_rcc.h

          │  │  │ stm32f10x_rtc.h

          │  │  │ stm32f10x_sdio.h

          │  │  │ stm32f10x_spi.h

          │  │  │ stm32f10x_tim.h

          │  │  │ stm32f10x_usart.h

          │  │  └ stm32f10x_wwdg.h

          │  └ src

          │     │ misc.c

          │     │ stm32f10x_adc.c

          │     │ stm32f10x_bkp.c

          │     │ stm32f10x_can.c

          │     │ stm32f10x_cec.c

          │     │ stm32f10x_crc.c

          │     │ stm32f10x_dac.c

          │     │ stm32f10x_dbgmcu.c

          │     │ stm32f10x_dma.c

          │     │ stm32f10x_exti.c

          │     │ stm32f10x_flash.c

          │     │ stm32f10x_fsmc.c

          │     │ stm32f10x_gpio.c

          │     │ stm32f10x_i2c.c

          │     │ stm32f10x_iwdg.c

          │     │ stm32f10x_pwr.c

          │     │ stm32f10x_rcc.c

          │     │ stm32f10x_rtc.c

          │     │ stm32f10x_sdio.c

          │     │ stm32f10x_spi.c

          │     │ stm32f10x_tim.c

          │     │ stm32f10x_usart.c

          │     └ stm32f10x_wwdg.c

          ├ SYSTEM

          │  ├ delay

          │  │  │ delay.c

          │  │  └ delay.h

          │  ├ sys

          │  │  │ sys.c

          │  │  └ sys.h

          │  └ usart

          │     │ usart.c

          │     └ usart.h

          └ USER

             │ JLinkSettings.ini

             │ main.c

             │ spi.c

             │ spi.h

             │ stm32f10x.h

             │ stm32f10x_conf.h

             │ stm32f10x_it.c

             │ stm32f10x_it.h

             │ system_stm32f10x.c

             │ system_stm32f10x.h

             │ Template.uvguix.Administrator

             │ Template.uvguix.fu

             │ Template.uvoptx

             │ Template.uvprojx

             ├ Listings

             │  │ startup_stm32f10x_hd.lst

             │  └ Template.map

TAGSPI
  • 7 次
  • 5 分