刚入手开发板7010不久,做到FPGA入门实验CH06程序固化那节。不知道哪里有问题,提示操作FLASH成功,可是LED状态不正常,两个常亮,两个常灭。已经定位到是bit文件的问题,可是我都是按视频里的操作做的,代码也没改,仔细检查了发现自己的DDR型号选错了,然后米连的例程里MIO8那个管脚的勾选的,我改了这两处以后,现在还是不行,想发帖看看,下面是代码
- // Target Devices: XC7Z020-CLG400
- // Tool versions: VIVADO2017.4[img]C:\Users\Administrator\Desktop\si\硬件\ZYNQ配置.jpg[/img]
- // Description: water led
- // Revision: V1.1
- // Additional Comments:
- //1) _i PIN input
- //2) _o PIN output
- //3) _n PIN active low
- //4) _dg debug signal
- //5) _r reg delay
- //6) _s state machine
- //////////////////////////////////////////////////////////////////////////////
- module run_led(
- inout [14:0]DDR_addr,
- inout [2:0]DDR_ba,
- inout DDR_cas_n,
- inout DDR_ck_n,
- inout DDR_ck_p,
- inout DDR_cke,
- inout DDR_cs_n,
- inout [3:0]DDR_dm,
- inout [31:0]DDR_dq,
- inout [3:0]DDR_dqs_n,
- inout [3:0]DDR_dqs_p,
- inout DDR_odt,
- inout DDR_ras_n,
- inout DDR_reset_n,
- inout DDR_we_n,
- inout FIXED_IO_ddr_vrn,
- inout FIXED_IO_ddr_vrp,
- inout [53:0]FIXED_IO_mio,
- inout FIXED_IO_ps_clk,
- inout FIXED_IO_ps_porb,
- inout FIXED_IO_ps_srstb,
-
- input CLK_i,
- input RSTn_i,
- output reg [3:0]LED_o
- );
- reg [31:0]C0;
- always @(posedge CLK_i)
- if(!RSTn_i)
- begin
- LED_o <= 4'b1;
- C0 <= 32'h0;
- end
- else
- begin
- if(C0 == 32'd50_000_000)
- begin
- C0 <= 32'h0;
- if(LED_o == 4'b1000)
- LED_o <= 4'b1;
- else LED_o <= LED_o << 1;
- end
- else
- begin
- C0 <= C0 + 1'b1;
- LED_o <= LED_o;
- end
- end
-
- system system_i
- (.DDR_addr(DDR_addr),
- .DDR_ba(DDR_ba),
- .DDR_cas_n(DDR_cas_n),
- .DDR_ck_n(DDR_ck_n),
- .DDR_ck_p(DDR_ck_p),
- .DDR_cke(DDR_cke),
- .DDR_cs_n(DDR_cs_n),
- .DDR_dm(DDR_dm),
- .DDR_dq(DDR_dq),
- .DDR_dqs_n(DDR_dqs_n),
- .DDR_dqs_p(DDR_dqs_p),
- .DDR_odt(DDR_odt),
- .DDR_ras_n(DDR_ras_n),
- .DDR_reset_n(DDR_reset_n),
- .DDR_we_n(DDR_we_n),
- .FIXED_IO_ddr_vrn(FIXED_IO_ddr_vrn),
- .FIXED_IO_ddr_vrp(FIXED_IO_ddr_vrp),
- .FIXED_IO_mio(FIXED_IO_mio),
- .FIXED_IO_ps_clk(FIXED_IO_ps_clk),
- .FIXED_IO_ps_porb(FIXED_IO_ps_porb),
- .FIXED_IO_ps_srstb(FIXED_IO_ps_srstb));
-
- endmodule
复制代码
遇到过没。 |