//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// File name "delayed_write_reg.v" ////
|
//// File name "delayed_write_reg.v" ////
|
//// ////
|
//// ////
|
//// This file is part of the "PCI bridge" project ////
|
//// This file is part of the "PCI bridge" project ////
|
//// http://www.opencores.org/cores/pci/ ////
|
//// http://www.opencores.org/cores/pci/ ////
|
//// ////
|
//// ////
|
//// Author(s): ////
|
//// Author(s): ////
|
//// - Miha Dolenc (mihad@opencores.org) ////
|
//// - Miha Dolenc (mihad@opencores.org) ////
|
//// ////
|
//// ////
|
//// All additional information is avaliable in the README ////
|
//// All additional information is avaliable in the README ////
|
//// file. ////
|
//// file. ////
|
//// ////
|
//// ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// Copyright (C) 2001 Miha Dolenc, mihad@opencores.org ////
|
//// Copyright (C) 2001 Miha Dolenc, mihad@opencores.org ////
|
//// ////
|
//// ////
|
//// This source file may be used and distributed without ////
|
//// This source file may be used and distributed without ////
|
//// restriction provided that this copyright statement is not ////
|
//// restriction provided that this copyright statement is not ////
|
//// removed from the file and that any derivative work contains ////
|
//// removed from the file and that any derivative work contains ////
|
//// the original copyright notice and the associated disclaimer. ////
|
//// the original copyright notice and the associated disclaimer. ////
|
//// ////
|
//// ////
|
//// This source file is free software; you can redistribute it ////
|
//// This source file is free software; you can redistribute it ////
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
//// Public License as published by the Free Software Foundation; ////
|
//// Public License as published by the Free Software Foundation; ////
|
//// either version 2.1 of the License, or (at your option) any ////
|
//// either version 2.1 of the License, or (at your option) any ////
|
//// later version. ////
|
//// later version. ////
|
//// ////
|
//// ////
|
//// This source is distributed in the hope that it will be ////
|
//// This source is distributed in the hope that it will be ////
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
//// details. ////
|
//// details. ////
|
//// ////
|
//// ////
|
//// You should have received a copy of the GNU Lesser General ////
|
//// You should have received a copy of the GNU Lesser General ////
|
//// Public License along with this source; if not, download it ////
|
//// Public License along with this source; if not, download it ////
|
//// from http://www.opencores.org/lgpl.shtml ////
|
//// from http://www.opencores.org/lgpl.shtml ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
// Revision 1.2 2001/10/05 08:14:28 mihad
|
// Revision 1.2 2001/10/05 08:14:28 mihad
|
// Updated all files with inclusion of timescale file for simulation purposes.
|
// Updated all files with inclusion of timescale file for simulation purposes.
|
//
|
//
|
// Revision 1.1.1.1 2001/10/02 15:33:46 mihad
|
// Revision 1.1.1.1 2001/10/02 15:33:46 mihad
|
// New project directory structure
|
// New project directory structure
|
//
|
//
|
//
|
//
|
|
|
`include "pci_constants.v"
|
`include "pci_constants.v"
|
|
|
// synopsys translate_off
|
// synopsys translate_off
|
`include "timescale.v"
|
`include "timescale.v"
|
// synopsys translate_on
|
// synopsys translate_on
|
|
|
module DELAYED_WRITE_REG
|
module DELAYED_WRITE_REG
|
(
|
(
|
reset_in,
|
reset_in,
|
req_clk_in,
|
req_clk_in,
|
comp_wdata_out,
|
comp_wdata_out,
|
req_we_in,
|
req_we_in,
|
req_wdata_in
|
req_wdata_in
|
);
|
);
|
|
|
// system inputs
|
// system inputs
|
input reset_in,
|
input reset_in,
|
req_clk_in ; // request clock input
|
req_clk_in ; // request clock input
|
|
|
output [31:0] comp_wdata_out ; // data output
|
output [31:0] comp_wdata_out ; // data output
|
|
|
input req_we_in ; // write enable input
|
input req_we_in ; // write enable input
|
input [31:0] req_wdata_in ; // data input - latched with posedge of req_clk_in when req_we_in is high
|
input [31:0] req_wdata_in ; // data input - latched with posedge of req_clk_in when req_we_in is high
|
|
|
reg [31:0] comp_wdata_out ;
|
reg [31:0] comp_wdata_out ;
|
|
|
// write request operation
|
// write request operation
|
always@(posedge req_clk_in or posedge reset_in)
|
always@(posedge req_clk_in or posedge reset_in)
|
begin
|
begin
|
if (reset_in)
|
if (reset_in)
|
comp_wdata_out <= #`FF_DELAY 32'h0000_0000 ;
|
comp_wdata_out <= #`FF_DELAY 32'h0000_0000 ;
|
else
|
else
|
if (req_we_in)
|
if (req_we_in)
|
comp_wdata_out <= #`FF_DELAY req_wdata_in ;
|
comp_wdata_out <= #`FF_DELAY req_wdata_in ;
|
end
|
end
|
|
|
endmodule // DELAYED_WRITE_REG
|
endmodule // DELAYED_WRITE_REG
|
|
|