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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [rtl/] [8051/] [oc8051_ports.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, simont@opencores.org                  ////
////      - Dinesh Annayya, simont@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...
 
 
`include "top_defines.v"
`include "top_defines.v"
 
 
 
 
module oc8051_ports (clk,
module oc8051_ports (clk,
                    rst,
                    resetn,
                    bit_in,
                    bit_in,
                    data_in,
                    data_in,
                    wr,
                    wr,
                    wr_bit,
                    wr_bit,
                    wr_addr,
                    wr_addr,
Line 97... Line 100...
        `endif
        `endif
 
 
                    rmw);
                    rmw);
 
 
input        clk,       //clock
input        clk,       //clock
             rst,       //reset
             resetn,    //reset
             wr,        //write [oc8051_decoder.wr -r]
             wr,        //write [oc8051_decoder.wr -r]
             wr_bit,    //write bit addresable [oc8051_decoder.bit_addr -r]
             wr_bit,    //write bit addresable [oc8051_decoder.bit_addr -r]
             bit_in,    //bit input [oc8051_alu.desCy]
             bit_in,    //bit input [oc8051_alu.desCy]
             rmw;       //read modify write feature [oc8051_decoder.rmw]
             rmw;       //read modify write feature [oc8051_decoder.rmw]
input [7:0]  wr_addr,    //write address [oc8051_ram_wr_sel.out]
input [7:0]  wr_addr,    //write address [oc8051_ram_wr_sel.out]
Line 146... Line 149...
  assign p3_data = rmw ? p3_out : p3_in;
  assign p3_data = rmw ? p3_out : p3_in;
`endif
`endif
 
 
//
//
// case of writing to port
// case of writing to port
always @(posedge clk or posedge rst)
always @(posedge clk or negedge resetn)
begin
begin
  if (rst) begin
  if (resetn == 1'b0) begin
`ifdef OC8051_PORT0
`ifdef OC8051_PORT0
    p0_out <= #1 `OC8051_RST_P0;
    p0_out <= #1 `OC8051_RST_P0;
`endif
`endif
 
 
`ifdef OC8051_PORT1
`ifdef OC8051_PORT1

powered by: WebSVN 2.1.0

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