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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [rtl/] [8051/] [oc8051_wb_iinterface.v] - Diff between revs 2 and 25

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

Rev 2 Rev 25
Line 14... Line 14...
////  Author(s):                                                  ////
////  Author(s):                                                  ////
////      - Simon Teran, simont@opencores.org                     ////
////      - Simon Teran, simont@opencores.org                     ////
////      - Dinesh Annayya, dinesha@opencores.org                 ////
////      - Dinesh Annayya, dinesha@opencores.org                 ////
////                                                              ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
 
////   v0.0 - Dinesh A, 5th Jan 2017
 
////        1. Active edge of reset changed from High to Low
 
//////////////////////////////////////////////////////////////////////
////                                                              ////
////                                                              ////
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
//// Copyright (C) 2000 Authors and 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    ////
Line 62... Line 65...
//
//
//
//
//
//
 
 
 
 
module oc8051_wb_iinterface(rst, clk,
module oc8051_wb_iinterface(resetn, clk,
                  adr_i, dat_o, cyc_i, stb_i, ack_o,
                  adr_i, dat_o, cyc_i, stb_i, ack_o,
                  adr_o, dat_i, cyc_o, stb_o, ack_i
                  adr_o, dat_i, cyc_o, stb_o, ack_i
                  );
                  );
//
//
// rst           (in)  reset - pin
// resetn           (in)  reset - pin
// clk           (in)  clock - pini
// clk           (in)  clock - pini
input rst, clk;
input resetn, clk;
 
 
//
//
// interface to oc8051 cpu
// interface to oc8051 cpu
//
//
// adr_i    (in)  address
// adr_i    (in)  address
Line 111... Line 114...
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_o;
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 negedge resetn)
  if (rst) begin
  if (resetn == 1'b0) begin
    stb_o <= #1 1'b0;
    stb_o <= #1 1'b0;
    adr_o <= #1 16'h0000;
    adr_o <= #1 16'h0000;
  end else if (ack_i) begin
  end else if (ack_i) begin
    stb_o <= #1 stb_i;
    stb_o <= #1 stb_i;
    adr_o <= #1 adr_i;
    adr_o <= #1 adr_i;

powered by: WebSVN 2.1.0

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