差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
fpga项目_使用arduino玩转fpga [2019/10/03 22:40] gongyu |
fpga项目_使用arduino玩转fpga [2019/10/03 22:46] (当前版本) gongyu [步骤5:定制自己的硬件外设] |
||
---|---|---|---|
行 105: | 行 105: | ||
* 36个用户可扩展I/O,这36个可扩展I/O可以与底板外设连接 | * 36个用户可扩展I/O,这36个可扩展I/O可以与底板外设连接 | ||
底板外设模块如下图所示: \\ | 底板外设模块如下图所示: \\ | ||
+ | |||
{{:: 底板外设接口图.png?360 |底板外设接口}} | {{:: 底板外设接口图.png?360 |底板外设接口}} | ||
{{:db.png?650|}} | {{:db.png?650|}} | ||
- | <WRAP centeralign>**step_base_board_demo模块划分**</WRAP> | + | |
+ | <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芯片。 \\ | ||
{{ ::stepmax10编译结果.png?440 |}} | {{ ::stepmax10编译结果.png?440 |}} | ||
行 180: | 行 183: | ||
\\ | \\ | ||
**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** \\ | 3. 更改 **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\peripherals\peripherals.sv** \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
把新外设增加到**Peripheral bus** 上. 由于新的外设增加了新的管脚, 所以除了**peripherals.sv** 之外, \\ | 把新外设增加到**Peripheral bus** 上. 由于新的外设增加了新的管脚, 所以除了**peripherals.sv** 之外, \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
**GitHub\step_fpga\submodules\PulseRain_FP51_MCU\source\PulseRain_FP51_MCU.sv** 和 \\ | **GitHub\step_fpga\submodules\PulseRain_FP51_MCU\source\PulseRain_FP51_MCU.sv** 和 \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
**GitHub\step_fpga\source\Mustang_fast.sv** 也要相应修改, 在**port list** 中增加管脚. 比如 \\ | **GitHub\step_fpga\source\Mustang_fast.sv** 也要相应修改, 在**port list** 中增加管脚. 比如 \\ | ||
+ | |||
\\ | \\ | ||
**output wire LCD_BL,** \\ | **output wire LCD_BL,** \\ | ||
- | **output wire LCD_DAT_CMD,** \\ | + | |
+ | **output wire LCD_DAT_CMD,** \\ | ||
**output wire LCD_RES,** \\ | **output wire LCD_RES,** \\ | ||
+ | |||
**inout wire LCD_SDA,** \\ | **inout wire LCD_SDA,** \\ | ||
+ | |||
**inout wire LCD_SCL,** \\ | **inout wire LCD_SCL,** \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
4. 对新增的管脚做**Constrain**, 比如**Pin assignment**, **voltage level** 等 \\ | 4. 对新增的管脚做**Constrain**, 比如**Pin assignment**, **voltage level** 等 \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
5. 由于新增加了**SFR**, **Arduino** 编译器的SFR定义也要相应修改. 编译器的SFR头文件通常被安装在 \\ | 5. 由于新增加了**SFR**, **Arduino** 编译器的SFR定义也要相应修改. 编译器的SFR头文件通常被安装在 \\ | ||
+ | |||
\\ | \\ | ||
+ | |||
**C:\Users\...\AppData\Local\Arduino15\packages\StepFPGA_M10\tools\M10_compiler\...\SDCC\include\mcs51\8051.h** \\ | **C:\Users\...\AppData\Local\Arduino15\packages\StepFPGA_M10\tools\M10_compiler\...\SDCC\include\mcs51\8051.h** \\ | ||
- | \\ | ||
- | ====相关设计资源==== | + | |
- | **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]] |