差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
|
fpga项目_使用arduino玩转fpga [2019/04/04 14:34] group003 |
fpga项目_使用arduino玩转fpga [2019/04/04 15:05] (当前版本) group003 [步骤5:定制自己的硬件外设] |
||
|---|---|---|---|
| 行 102: | 行 102: | ||
| {{:: 底板外设接口图.png?360 |底板外设接口}} | {{:: 底板外设接口图.png?360 |底板外设接口}} | ||
| {{:db.png?650|}} | {{:db.png?650|}} | ||
| - | <WRAP centeralign>**step_base_board_demo模块划分**</WRAP> | ||
| \\ | \\ | ||
| 直接从GitHub上clone的项目已默认编译,使用Micro USB数据线连接PC和开发板后,使用Quartus Prime软件可以直接下载到STEP-MAX10芯片。 \\ | 直接从GitHub上clone的项目已默认编译,使用Micro USB数据线连接PC和开发板后,使用Quartus Prime软件可以直接下载到STEP-MAX10芯片。 \\ | ||
| 行 181: | 行 180: | ||
| 如果用户需要增加新的外设的话, 具体步骤如下(以LCD为例) \\ | 如果用户需要增加新的外设的话, 具体步骤如下(以LCD为例) \\ | ||
| 1. 编写RTL模块, 并且simulate, 比如 \\ | 1. 编写RTL模块, 并且simulate, 比如 \\ | ||
| - | \\ | + | GitHub\step_fpga\submodules\PulseRain_FP51_MCU\submodules\PulseRain_rtl_lib\LCD下面的那些文件 \\ |
| - | **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\submodules\PulseRain_rtl_lib\LCD** 下面的那些文件 \\ | + | |
| - | \\ | + | |
| 2. 给新增加的外设分配SFR 地址, 地址分配见 \\ | 2. 给新增加的外设分配SFR 地址, 地址分配见 \\ | ||
| - | \\ | + | GitHub\step_fpga\submodules\PulseRain_FP51_MCU\common\SFR.svh \\ |
| - | **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\common\SFR.svh** \\ | + | parameter unsigned [DATA_WIDTH - 1 : 0] LCD_CSR_ADDR = 8'hC1; \\ |
| - | **parameter unsigned [DATA_WIDTH - 1 : 0] LCD_CSR_ADDR = 8'hC1;** \\ | + | parameter unsigned [DATA_WIDTH - 1 : 0] LCD_DATA_ADDR = 8'hC2; \\ |
| - | **parameter unsigned [DATA_WIDTH - 1 : 0] LCD_DATA_ADDR = 8'hC2;** \\ | + | 3. 更改 GitHub\step_fpga\submodules\PulseRain_FP51_MCU\peripherals\peripherals.sv \\ |
| - | \\ | + | 把新外设增加到Peripheral bus上. 由于新的外设增加了新的管脚, 所以除了peripherals.sv 之外, \\ |
| - | 3. 更改 **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\peripherals\peripherals.sv** \\ | + | GitHub\step_fpga\submodules\PulseRain_FP51_MCU\source\PulseRain_FP51_MCU.sv 和 \\ |
| - | \\ | + | GitHub\step_fpga\source\Mustang_fast.sv 也要相应修改, 在port list 中增加管脚. 比如 \\ |
| - | 把新外设增加到**Peripheral bus** 上. 由于新的外设增加了新的管脚, 所以除了**peripherals.sv** 之外, \\ | + | output wire LCD_BL, \\ |
| - | \\ | + | output wire LCD_DAT_CMD, \\ |
| - | **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\source\PulseRain_FP51_MCU.sv** 和 \\ | + | output wire LCD_RES, \\ |
| - | \\ | + | inout wire LCD_SDA, \\ |
| - | **GitHub\step_fpga\source\Mustang_fast.sv** 也要相应修改, 在**port list** 中增加管脚. 比如 \\ | + | inout wire LCD_SCL, \\ |
| - | \\ | + | 4. 对新增的管脚做Constrain, 比如Pin assignment, voltage level 等 \\ |
| - | **output wire LCD_BL,** \\ | + | 5. 由于新增加了SFR, Arduino 编译器的SFR定义也要相应修改. 编译器的SFR头文件通常被安装在 \\ |
| - | **output wire LCD_DAT_CMD,** \\ | + | C:\Users\...\AppData\Local\Arduino15\packages\StepFPGA_M10\tools\M10_compiler\...\SDCC\include\mcs51\8051.h \\ |
| - | **output wire LCD_RES,** \\ | + | |
| - | **inout wire LCD_SDA,** \\ | + | |
| - | **inout wire LCD_SCL,** \\ | + | |
| - | \\ | + | |
| - | 4. 对新增的管脚做**Constrain**, 比如**Pin assignment**, **voltage level** 等 \\ | + | |
| - | \\ | + | |
| - | 5. 由于新增加了**SFR**, **Arduino** 编译器的SFR定义也要相应修改. 编译器的SFR头文件通常被安装在 \\ | + | |
| - | \\ | + | |
| - | **C:\Users\...\AppData\Local\Arduino15\packages\StepFPGA_M10\tools\M10_compiler\...\SDCC\include\mcs51\8051.h** \\ | + | |
| - | \\ | + | |
| ====相关设计资源==== | ====相关设计资源==== | ||
| - | + | \\ | |
| - | **Copy from PulseRain Technology** | + | Copy from PulseRain Technology \\ |
| - | * {{::step_fpga_m10_user_guide_cn.pdf|STEP FPGA FP51-1T MCU中文用户手册 }} | + | {{::step_fpga_m10_user_guide_cn.pdf|STEP FPGA FP51-1T MCU中文用户手册 }} \\ |
| - | *{{::datasheet_fp8051_1t.pdf|FP51-1T Datasheet}} | + | {{::datasheet_fp8051_1t.pdf|FP51-1T Datasheet}} \\ |
| - | *{{::pulserain_8_bit_mcu_trm.pdf|FP51-1T Technical Reference Manual}} | + | {{::pulserain_8_bit_mcu_trm.pdf|FP51-1T Technical Reference Manual}} \\ |
| - | *[[https://github.com/PulseRain/Mustang/tree/step_fpga|Repository for FPGA]] | + | [[https://github.com/PulseRain/Mustang/tree/step_fpga|Repository for FPGA]] \\ |
| - | *[[https://github.com/PulseRain/Arduino_M10_IDE/tree/step_fpga|Repository for Arduino IDE package]] | + | [[https://github.com/PulseRain/Arduino_M10_IDE/tree/step_fpga|Repository for Arduino IDE package]] \\ |
| - | *[[https://github.com/PulseRain/M10_high_speed_config_rtl|TRM for M10 High Speed Configuration]] | + | [[https://github.com/PulseRain/M10_high_speed_config_rtl|TRM for M10 High Speed Configuration]] \\ |
| - | *[[https://github.com/PulseRain|Repository for Peripherals]] | + | [[https://github.com/PulseRain|Repository for Peripherals]] \\ |