📄 input_fifo_rev0.2.v
字号:
////////////////////////////////////////////////////
//
// Module Name: input_fifo
// Descr: Input FIFO Control
// Author: James Rosenthal
// Date: 10/25/04
//
//
// Version Date Modifications
// ---------------------------------
// 0.0 10/28/04 Initial
// 0.1 11/8/04 Modular Sections
// 0.2 11/12/04 FIFO Control as Top Level
// Write State Machines
// Error Output Added
//
//
// Notes
// -----
// Input FIFO
// ||
// |-------------------|
// Write SM Low Level FIFO
// |
// |---------------|---------------|
// Flags BRAM Addr Ptrs
//
// - Hierarchy in this FIFO is modularize the FIFO
// control and functionality.
//
// - Write Enable for the FIFO is driven by the state machine.
// - Read Enable is driven externally by a state machine.
// + That SM may be better instantiated in this module
//
////////////////////////////////////////////////////
`timescale 1ns / 10ps
module input_fifo( // Higher Level FIFO Control Module
sysclk, // System Clock From FPGA
extclk, // External Clock from DSP
rd_en, // Read Enable
wr_en, // Write Enable
din, // 13-bit Data Input
dout, // 13-bit Data Output
full, // Full Flag
empty, // Empty Flag
rst, // Active Low Reset
error // Error on Read or Write
);
//
// Inputs & Outputs
//
input [12:0] din; // Data Input
input wr_en; // Write Enable
input rd_en; // Read Enable
input sysclk; // System Clock (25MHz)
input extclk; // External Clock
input rst; // Active Low Reset
output [12:0] dout; // 13-bit Data Output
output empty; // Empty Flag
output full; // Full Flag
output error; // Invalid Write Occurred
//
// Wires & Registers
//
wire [12:0] fifo_din;
//
// Behavioral Description
//
// Instantiate Write State Machine
// Write to FIFO
write_sm write_sm(
.din(din),
.sysclk(sysclk),
.rst(rst),
.en(wr_en),
.dout(fifo_din),
.doe(fifo_wr_en),
.error(error)
);
// Instantiate FIFO
fifo ififo(
.clk(sysclk),
.din(dinfifo),
.wr_en(fifo_wr_en),
.rd_en(rd_en),
.rst(rst),
.dout(dout),
.full(full),
.empty(empty)
);
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -