📄 wbw_wbr_fifos.v
字号:
////////////////////////////////////////////////////////////////////////// //////// File name "wbw_wbr_fifos.v" //////// //////// This file is part of the "PCI bridge" project //////// http://www.opencores.org/cores/pci/ //////// //////// Author(s): //////// - mihad@opencores.org //////// - Miha Dolenc //////// //////// All additional information is avaliable in the README.pdf //////// file. //////// //////// ////////////////////////////////////////////////////////////////////////////// //////// Copyright (C) 2000 Miha Dolenc, mihad@opencores.org //////// //////// This source file may be used and distributed without //////// restriction provided that this copyright statement is not //////// removed from the file and that any derivative work contains //////// the original copyright notice and the associated disclaimer. //////// //////// This source file is free software; you can redistribute it //////// and/or modify it under the terms of the GNU Lesser General //////// Public License as published by the Free Software Foundation; //////// either version 2.1 of the License, or (at your option) any //////// later version. //////// //////// This source is distributed in the hope that it will be //////// useful, but WITHOUT ANY WARRANTY; without even the implied //////// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //////// PURPOSE. See the GNU Lesser General Public License for more //////// details. //////// //////// You should have received a copy of the GNU Lesser General //////// Public License along with this source; if not, download it //////// from http://www.opencores.org/lgpl.shtml //////// ////////////////////////////////////////////////////////////////////////////// CVS Revision History//// $Log: wbw_wbr_fifos.v,v $// Revision 1.4 2001/06/12 11:13:34 mihad// Changed module parameters////`include "constants.v"`include "fifo_control.v"`include "dp_sram.v"`include "dp_async_ram.v"module WBW_WBR_FIFOS( wb_clock_in, pci_clock_in, reset_in, wbw_wenable_in, wbw_addr_data_in, wbw_cbe_in, wbw_control_in, wbw_renable_in, wbw_addr_data_out, wbw_cbe_out, wbw_control_out, wbw_flush_in, wbw_almost_full_out, wbw_full_out, wbw_almost_empty_out, wbw_empty_out, wbw_transaction_ready_out, wbr_wenable_in, wbr_data_in, wbr_be_in, wbr_control_in, wbr_renable_in, wbr_data_out, wbr_be_out, wbr_control_out, wbr_flush_in, wbr_almost_full_out, wbr_full_out, wbr_almost_empty_out, wbr_empty_out, wbr_transaction_ready_out) ;/*-----------------------------------------------------------------------------------------------------------System inputs:wb_clock_in - WISHBONE bus clockpci_clock_in - PCI bus clockreset_in - reset from control logic-------------------------------------------------------------------------------------------------------------*/input wb_clock_in, pci_clock_in, reset_in ;/*-----------------------------------------------------------------------------------------------------------WISHBONE WRITE FIFO interface signals prefixed with wbw_ - FIFO is used for posted writes initiated byWISHBONE master, traveling through FIFO and are completed on PCI by PCI master interface write enable signal:wbw_wenable_in = write enable input for WBW_FIFO - driven by WISHBONE slave interfacedata input signals:wbw_addr_data_in = data input - data from WISHBONE bus - first entry of transaction is address others are data entrieswbw_cbe_in = bus command/byte enable(~SEL[3:0]) input - first entry of transaction is bus command, other are byte enableswbw_control_in = control input - encoded control bus inputread enable signal:wbw_renable_in = read enable input driven by PCI master interfacedata output signals:wbw_addr_data_out = data output - data from WISHBONE bus - first entry of transaction is address, others are data entrieswbw_cbe_out = bus command/byte enable output - first entry of transaction is bus command, others are byte enableswbw_control_out = control input - encoded control bus inputstatus signals - monitored by various resources in the corewbw_flush_in = flush signal input for WBW_FIFO - when asserted, fifo is flushed(emptied)wbw_almost_full_out = almost full output from WBW_FIFOwbw_full_out = full output from WBW_FIFOwbw_almost_empty_out = almost empty output from WBW_FIFOwbw_empty_out = empty output from WBW_FIFOwbw_transaction_ready_out = output indicating that one complete transaction is waiting in WBW_FIFO-----------------------------------------------------------------------------------------------------------*/// input control and datainput wbw_wenable_in ;input [31:0] wbw_addr_data_in ;input [3:0] wbw_cbe_in ;input [3:0] wbw_control_in ;// output control and datainput wbw_renable_in ;output [31:0] wbw_addr_data_out ;output [3:0] wbw_cbe_out ;output [3:0] wbw_control_out ; // flush inputinput wbw_flush_in ; // status outputsoutput wbw_almost_full_out ;output wbw_full_out ;output wbw_almost_empty_out ;output wbw_empty_out ;output wbw_transaction_ready_out ;/*-----------------------------------------------------------------------------------------------------------WISHBONE READ FIFO interface signals prefixed with wbr_ - FIFO is used for holding delayed read completions initiated by master on WISHBONE bus and completed on PCI bus, write enable signal:wbr_wenable_in = write enable input for WBR_FIFO - driven by PCI master interfacedata input signals:wbr_data_in = data input - data from PCI bus - there is no address entry here, since address is stored in separate registerwbr_be_in = byte enable(~BE#[3:0]) input - byte enables - same through one transactionwbr_control_in = control input - encoded control bus inputread enable signal:wbr_renable_in = read enable input driven by WISHBONE slave interfacedata output signals:wbr_data_out = data output - data from PCI buswbr_be_out = byte enable output(~#BE)wbr_control_out = control output - encoded control bus outputstatus signals - monitored by various resources in the corewbr_flush_in = flush signal input for WBR_FIFO - when asserted, fifo is flushed(emptied)wbr_almost_full_out = almost full output from WBR_FIFOwbr full_out = full output from WBR_FIFOwbr_almost_empty_out = almost empty output from WBR_FIFOwbr_empty_out = empty output from WBR_FIFOwbr_transaction_ready_out = output indicating that one complete transaction is waiting in WBR_FIFO-----------------------------------------------------------------------------------------------------------*/// input control and datainput wbr_wenable_in ;input [31:0] wbr_data_in ;input [3:0] wbr_be_in ;input [3:0] wbr_control_in ; // output control and datainput wbr_renable_in ;output [31:0] wbr_data_out ;output [3:0] wbr_be_out ;output [3:0] wbr_control_out ; // flush inputinput wbr_flush_in ; // status outputsoutput wbr_almost_full_out ;output wbr_full_out ;output wbr_almost_empty_out ;output wbr_empty_out ;output wbr_transaction_ready_out ;/*-----------------------------------------------------------------------------------------------------------FIFO depth parameters:WBW_DEPTH = defines WBW_FIFO depthWBR_DEPTH = defines WBR_FIFO depthWBW_ADDR_LENGTH = defines WBW_FIFO's location address length = log2(WBW_DEPTH)WBR_ADDR_LENGTH = defines WBR_FIFO's location address length = log2(WBR_DEPTH)-----------------------------------------------------------------------------------------------------------*/parameter WBW_DEPTH = `WBW_DEPTH ;parameter WBW_ADDR_LENGTH = `WBW_ADDR_LENGTH ;parameter WBR_DEPTH = `WBR_DEPTH ;parameter WBR_ADDR_LENGTH = `WBR_ADDR_LENGTH ;// obviouswire vcc = 1'b1 ;wire gnd = 1'b0 ;/*-----------------------------------------------------------------------------------------------------------wbw_wallow = WBW_FIFO write allow wire - writes to FIFO are allowed when FIFO isn't full and write enable is 1wbw_rallow = WBW_FIFO read allow wire - reads from FIFO are allowed when FIFO isn't empty and read enable is 1-----------------------------------------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -