OpenCores
URL https://opencores.org/ocsvn/8051/8051/trunk

Subversion Repositories 8051

[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_wb_iinterface.v] - Diff between revs 127 and 136

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 127 Rev 136
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2003/04/16 10:02:45  simont
 
// fix bug (cyc_o and stb_o)
 
//
// Revision 1.3  2003/04/03 19:19:02  simont
// Revision 1.3  2003/04/03 19:19:02  simont
// change adr_i and adr_o length.
// change adr_i and adr_o length.
//
//
// Revision 1.2  2003/01/13 14:14:41  simont
// Revision 1.2  2003/01/13 14:14:41  simont
// replace some modules
// replace some modules
Line 59... Line 62...
// synopsys translate_off
// synopsys translate_off
`include "oc8051_timescale.v"
`include "oc8051_timescale.v"
// synopsys translate_on
// synopsys translate_on
 
 
 
 
module oc8051_wb_iinterface(rst, clk, adr_i, dat_o,stb_i, ack_o, cyc_i,
module oc8051_wb_iinterface(rst, clk,
        dat_i, cyc_o, adr_o, ack_i, stb_o);
                  adr_i, dat_o, cyc_i, stb_i, ack_o,
 
                  adr_o, dat_i, cyc_o, stb_o, ack_i
 
                  );
//
//
// rst           (in)  reset - pin
// rst           (in)  reset - pin
// clk           (in)  clock - pini
// clk           (in)  clock - pini
input rst, clk;
input rst, clk;
 
 
Line 74... Line 79...
// adr_i    (in)  address
// adr_i    (in)  address
// dat_o    (out) data output
// dat_o    (out) data output
// stb_i    (in)  strobe
// stb_i    (in)  strobe
// ack_o    (out) acknowledge
// ack_o    (out) acknowledge
// cyc_i    (in)  cycle
// cyc_i    (in)  cycle
input stb_i, cyc_i;
input         stb_i,
 
              cyc_i;
input [15:0] adr_i;
input [15:0] adr_i;
output ack_o;
output ack_o;
output [31:0] dat_o;
output [31:0] dat_o;
 
 
//
//
Line 89... Line 95...
// stb_o    (out) strobe
// stb_o    (out) strobe
// ack_i    (in) acknowledge
// ack_i    (in) acknowledge
// cyc_o    (out)  cycle
// cyc_o    (out)  cycle
input ack_i;
input ack_i;
input [31:0] dat_i;
input [31:0] dat_i;
output stb_o, cyc_o;
output        stb_o,
 
              cyc_o;
output [15:0] adr_o;
output [15:0] adr_o;
 
 
//
//
// internal bufers and wires
// internal bufers and wires
//
//
reg [15:0] adr;
reg [15:0] adr_o;
//reg stb;
reg        stb_o;
 
 
assign ack_o = ack_i;
assign ack_o = ack_i;
assign dat_o = dat_i;
assign dat_o = dat_i;
assign stb_o = stb_i || ack_i;
//assign stb_o = stb_i || ack_i;
assign cyc_o = stb_i || ack_i;
assign cyc_o = stb_o;
assign adr_o = ack_i ? adr : adr_i;
//assign adr_o = ack_i ? adr : adr_i;
 
 
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
  if (rst) begin
  if (rst) begin
//    stb <= #1 1'b0;
    stb_o <= #1 1'b0;
    adr <= #1 16'h0000;
    adr_o <= #1 16'h0000;
  end else begin
  end else if (ack_i) begin
//    stb <= #1 stb_i;
    stb_o <= #1 1'b0;
    adr <= #1 adr_i;
  end else if (!stb_o & stb_i) begin
 
    stb_o <= #1 1'b1;
 
    adr_o <= #1 adr_i;
  end
  end
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.