📄 pciw_pcir_fifos.v
字号:
////////////////////////////////////////////////////////////////////////// //////// File name "pciv_pcir_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: pciw_pcir_fifos.v,v $// Revision 1.4 2001/06/12 11:15:10 mihad// Changed module parameters////`include "constants.v"`include "fifo_control.v"`include "dp_sram.v"`include "dp_async_ram.v"module PCIW_PCIR_FIFOS( wb_clock_in, pci_clock_in, reset_in, pciw_wenable_in, pciw_addr_data_in, pciw_cbe_in, pciw_control_in, pciw_renable_in, pciw_addr_data_out, pciw_cbe_out, pciw_control_out, pciw_flush_in, pciw_almost_full_out, pciw_full_out, pciw_almost_empty_out, pciw_empty_out, pciw_transaction_ready_out, pcir_wenable_in, pcir_data_in, pcir_be_in, pcir_control_in, pcir_renable_in, pcir_data_out, pcir_be_out, pcir_control_out, pcir_flush_in, pcir_almost_full_out, pcir_full_out, pcir_almost_empty_out, pcir_empty_out, pcir_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 ;/*-----------------------------------------------------------------------------------------------------------PCI WRITE FIFO interface signals prefixed with pciw_ - FIFO is used for posted writes initiated by externalPCI master through PCI target interface, traveling through FIFO and are completed on WISHBONE by WISHBONE master interface write enable signal:pciw_wenable_in = write enable input for PCIW_FIFO - driven by PCI TARGET interfacedata input signals:pciw_addr_data_in = data input - data from PCI bus - first entry of transaction is address others are data entriespciw_cbe_in = bus command/byte enable(~#BE[3:0]) input - first entry of transaction is bus command, other are byte enablespciw_control_in = control input - encoded control bus inputread enable signal:pciw_renable_in = read enable input driven by WISHBONE master interfacedata output signals:pciw_addr_data_out = data output - data from PCI bus - first entry of transaction is address, others are data entriespciw_cbe_out = bus command/byte enable output - first entry of transaction is bus command, others are byte enablespciw_control_out = control input - encoded control bus inputstatus signals - monitored by various resources in the corepciw_flush_in = flush signal input for PCIW_FIFO - when asserted, fifo is flushed(emptied)pciw_almost_full_out = almost full output from PCIW_FIFOpciw_full_out = full output from PCIW_FIFOpciw_almost_empty_out = almost empty output from PCIW_FIFOpciw_empty_out = empty output from PCIW_FIFOpciw_transaction_ready_out = output indicating that one complete transaction is waiting in PCIW_FIFO-----------------------------------------------------------------------------------------------------------*/// input control and datainput pciw_wenable_in ;input [31:0] pciw_addr_data_in ;input [3:0] pciw_cbe_in ;input [3:0] pciw_control_in ;// output control and datainput pciw_renable_in ;output [31:0] pciw_addr_data_out ;output [3:0] pciw_cbe_out ;output [3:0] pciw_control_out ; // flush inputinput pciw_flush_in ; // status outputsoutput pciw_almost_full_out ;output pciw_full_out ;output pciw_almost_empty_out ;output pciw_empty_out ;output pciw_transaction_ready_out ;/*-----------------------------------------------------------------------------------------------------------PCI READ FIFO interface signals prefixed with pcir_ - FIFO is used for holding delayed read completions initiated by master on PCI bus and completed on WISHBONE bus, write enable signal:pcir_wenable_in = write enable input for PCIR_FIFO - driven by WISHBONE master interfacedata input signals:pcir_data_in = data input - data from WISHBONE bus - there is no address entry here, since address is stored in separate registerpcir_be_in = byte enable(~SEL[3:0]) input - byte enables - same through one transactionpcir_control_in = control input - encoded control bus inputread enable signal:pcir_renable_in = read enable input driven by PCI target interfacedata output signals:pcir_data_out = data output - data from WISHBONE buspcir_be_out = byte enable output(~SEL)pcir_control_out = control output - encoded control bus outputstatus signals - monitored by various resources in the corepcir_flush_in = flush signal input for PCIR_FIFO - when asserted, fifo is flushed(emptied)pcir_almost_full_out = almost full output from PCIR_FIFOpcir full_out = full output from PCIR_FIFOpcir_almost_empty_out = almost empty output from PCIR_FIFOpcir_empty_out = empty output from PCIR_FIFOpcir_transaction_ready_out = output indicating that one complete transaction is waiting in PCIR_FIFO-----------------------------------------------------------------------------------------------------------*/// input control and datainput pcir_wenable_in ;input [31:0] pcir_data_in ;input [3:0] pcir_be_in ;input [3:0] pcir_control_in ; // output control and datainput pcir_renable_in ;output [31:0] pcir_data_out ;output [3:0] pcir_be_out ;output [3:0] pcir_control_out ; // flush inputinput pcir_flush_in ; // status outputsoutput pcir_almost_full_out ;output pcir_full_out ;output pcir_almost_empty_out ;output pcir_empty_out ;output pcir_transaction_ready_out ;/*-----------------------------------------------------------------------------------------------------------Address length parameters:PCIW_DEPTH = defines PCIW_FIFO depthPCIR_DEPTH = defines PCIR_FIFO depthPCIW_ADDR_LENGTH = defines PCIW_FIFO's location address length - log2(PCIW_DEPTH)PCIR_ADDR_LENGTH = defines PCIR_FIFO's location address length - log2(PCIR_DEPTH)-----------------------------------------------------------------------------------------------------------*/parameter PCIW_DEPTH = `PCIW_DEPTH ;parameter PCIW_ADDR_LENGTH = `PCIW_ADDR_LENGTH ;parameter PCIR_DEPTH = `PCIR_DEPTH ;parameter PCIR_ADDR_LENGTH = `PCIR_ADDR_LENGTH ;// obviouswire vcc = 1'b1 ;wire gnd = 1'b0 ;/*-----------------------------------------------------------------------------------------------------------pciw_wallow = PCIW_FIFO write allow wire - writes to FIFO are allowed when FIFO isn't full and write enable is 1pciw_rallow = PCIW_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 + -