FPGA控制双口RAM cy7c025,写数据0x5555,单片机读数据不是0x5555. 请熟悉的兄弟看看,我的程序可有错误?
RAM_WRITE:process(RAM_CURRENT_STATE,address_cnt) --DRAM写入控制状态机时序进程 begin case RAM_CURRENT_STATE is when START_WRITE => --DRAM初始化 ram_cs <= '1'; ram_wr <= '1'; ram_rd <= '1'; address_plus <= '0'; RAM_NEXT_STATE <= WRITE1; when WRITE1 => ram_cs <= '0'; ram_wr <= '1'; codeaddress <= address_cnt; RAM_NEXT_STATE <= WRITE2; when WRITE2 => --ad1数据写向DRAN ram_cs <= '0'; ram_wr <= '0'; ram_data <= X"5555"; --addata1; ram_rd <= '1'; RAM_NEXT_STATE <= WRITE3;
when WRITE3 => ram_cs <= '0'; ram_wr <= '1'; ram_rd <= '1'; address_plus <= '1'; RAM_NEXT_STATE <= WRITE_END;
when WRITE_END => ram_cs <= '1'; ram_wr <= '1'; ram_rd <= '1'; address_plus <= '0'; RAM_NEXT_STATE <=START_WRITE; when others => --所有闲置状态导入初始态 RAM_NEXT_STATE <=START_WRITE; end case; end process;
|