FPGA片內FIFO讀寫測試Verilog邏輯源碼Quartus工程文件+文檔說明,使用 FPGA 內部的 FIFO 以及程序對該 FIFO 的數據讀寫操作。FPGA型號Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。timescale 1ns / 1ps//////////////////////////////////////////////////////////////////////////////////module fifo_test( input clk, //50MHz時鐘 input rst_n //復位信號,低電平有效 );//-----------------------------------------------------------localparam W_IDLE = 1;localparam W_FIFO = 2; localparam R_IDLE = 1;localparam R_FIFO = 2; reg[2:0] write_state;reg[2:0] next_write_state;reg[2:0] read_state;reg[2:0] next_read_state;reg[15:0] w_data; //FIFO寫數據wire wr_en; //FIFO寫使能wire rd_en; //FIFO讀使能wire[15:0] r_data; //FIFO讀數據wire full; //FIFO滿信號 wire empty; //FIFO空信號 wire[8:0] rd_data_count; wire[8:0] wr_data_count; ///產生FIFO寫入的數據always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) write_state <= W_IDLE; else write_state <= next_write_state;endalways@(*)begin case(write_state) W_IDLE: if(empty == 1'b1) //FIFO空, 開始寫FIFO next_write_state <= W_FIFO; else next_write_state <= W_IDLE; W_FIFO: if(full == 1'b1) //FIFO滿 next_write_state <= W_IDLE; else next_write_state <= W_FIFO; default: next_write_state <= W_IDLE; endcaseendassign wr_en = (next_write_state == W_FIFO) ? 1'b1 : 1'b0; always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) w_data <= 16'd0; else if (wr_en == 1'b1) w_data <= w_data + 1'b1; else w_data <= 16'd0; end///產生FIFO讀的數據always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) read_state <= R_IDLE; else read_state <= next_read_state;endalways@(*)begin case(read_state) R_IDLE: if(full == 1'b1) //FIFO滿, 開始讀FIFO next_read_state <= R_FIFO; else next_read_state <= R_IDLE; R_FIFO: if(empty == 1'b1)
上傳時間: 2021-12-19
上傳用戶:20125101110
電子書-國外電子與通信教材系列@片上系統 可重用設計方法學(第3版
標簽: 片上系統
上傳時間: 2022-03-22
上傳用戶:1208020161
Altium AD設計 全志A33原廠核心板PCB 2片DDR3 4層設計,可作為你產品設計的參考。可作為你產品設計的參考。
上傳時間: 2022-04-08
上傳用戶:20125101110
觸控彈簧 跳線座 冷壓插片 Altium封裝 AD封裝庫 2D+3D PCB封裝庫-4MBAltium Designer設計的PCB封裝庫文件,集成2D和3D封裝,可直接應用的到你的產品設計中。PCB庫封裝列表:PCB Library : 跳線座.PcbLibDate : 2020/6/9Time : 5:43:08Component Count : 48Component Name-----------------------------------------------Wire - 3mmWire - 4mmWire - 5mmWire - 6mmWire - 7mmWire - 8mmWire - 9mmWire - 10mmWire - 11mmWire - 12mmWire - 13mmWire - 14mmWire - 15mmWire - 16mmWire - 17mmWire - 18mmWire - 19mmWire - 20mmWire - 21mmWire - 22mmWire - 23mmWire - 24mmWire - 25mmWire - 26mmWire - 27mmWire - 28mmWire - 29mmWire - 30mmWire - 31mmWire - 32mmWire - 33mmWire - 34mmWire - 35mmWire - 36mmWire - 37mmWire - 38mmWire - 39mmWire - 40mmWire - 41mmWire - 42mmWire - 43mmWire - 44mmWire - 45mmWire - 46mmWire - 47mmWire - 48mmWire - 49mmWire - 50mm
標簽: Altium designer 封裝
上傳時間: 2022-05-04
上傳用戶:
8層板設計 飛思卡爾IMX6 4片DDR3 設計 ORCAD原理圖+ALTIUM PCB文件,可以做為你的設計參考。
上傳時間: 2022-05-06
上傳用戶:aben
DSP28335程序,使用片上SCI口進行串行通訊。包括發送和接受
上傳時間: 2022-06-21
上傳用戶:
電壓極沖片自動疊片硬質合金級進模設計
上傳時間: 2013-07-28
上傳用戶:eeworm
如何入侵一臺Internet上的主機
標簽: Internet
上傳時間: 2013-05-23
上傳用戶:eeworm
新型單片開關電源的設計與應用 沙占友著
上傳時間: 2013-06-28
上傳用戶:eeworm
單片開關電源最新應用技術
上傳時間: 2013-04-15
上傳用戶:eeworm