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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [rtl/] [8051/] [oc8051_ports.v] - Diff between revs 25 and 36

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

Rev 25 Rev 36
Line 16... Line 16...
////      - Dinesh Annayya, simont@opencores.org                  ////
////      - Dinesh Annayya, simont@opencores.org                  ////
////                                                              ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
////   v0.0 - Dinesh A, 5th Jan 2017
////   v0.0 - Dinesh A, 5th Jan 2017
////        1. Active edge of reset changed from High to Low
////        1. Active edge of reset changed from High to Low
 
////   v0.1 - Dinesh A, 19th Jan 2017
 
////        1. Lint Warning fixes
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
////                                                              ////
////                                                              ////
//// 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         ////
Line 153... Line 155...
// case of writing to port
// case of writing to port
always @(posedge clk or negedge resetn)
always @(posedge clk or negedge resetn)
begin
begin
  if (resetn == 1'b0) begin
  if (resetn == 1'b0) begin
`ifdef OC8051_PORT0
`ifdef OC8051_PORT0
    p0_out <= #1 `OC8051_RST_P0;
    p0_out <= `OC8051_RST_P0;
`endif
`endif
 
 
`ifdef OC8051_PORT1
`ifdef OC8051_PORT1
    p1_out <= #1 `OC8051_RST_P1;
    p1_out <= `OC8051_RST_P1;
`endif
`endif
 
 
`ifdef OC8051_PORT2
`ifdef OC8051_PORT2
    p2_out <= #1 `OC8051_RST_P2;
    p2_out <= `OC8051_RST_P2;
`endif
`endif
 
 
`ifdef OC8051_PORT3
`ifdef OC8051_PORT3
    p3_out <= #1 `OC8051_RST_P3;
    p3_out <= `OC8051_RST_P3;
`endif
`endif
  end else if (wr) begin
  end else if (wr) begin
    if (!wr_bit) begin
    if (!wr_bit) begin
      case (wr_addr) /* synopsys full_case parallel_case */
      case (wr_addr) /* synopsys full_case parallel_case */
//
//
// bytaddresable
// bytaddresable
`ifdef OC8051_PORT0
`ifdef OC8051_PORT0
        `OC8051_SFR_P0: begin p0_out <= #1 data_in;
        `OC8051_SFR_P0: begin p0_out <= data_in;
         end
         end
`endif
`endif
 
 
`ifdef OC8051_PORT1
`ifdef OC8051_PORT1
        `OC8051_SFR_P1: p1_out <= #1 data_in;
        `OC8051_SFR_P1: p1_out <= data_in;
`endif
`endif
 
 
`ifdef OC8051_PORT2
`ifdef OC8051_PORT2
        `OC8051_SFR_P2: p2_out <= #1 data_in;
        `OC8051_SFR_P2: p2_out <= data_in;
`endif
`endif
 
 
`ifdef OC8051_PORT3
`ifdef OC8051_PORT3
        `OC8051_SFR_P3: p3_out <= #1 data_in;
        `OC8051_SFR_P3: p3_out <= data_in;
`endif
`endif
      endcase
      endcase
    end else begin
    end else begin
      case (wr_addr[7:3]) /* synopsys full_case parallel_case */
      case (wr_addr[7:3]) /* synopsys full_case parallel_case */
 
 
//
//
// bit addressable
// bit addressable
`ifdef OC8051_PORT0
`ifdef OC8051_PORT0
        `OC8051_SFR_B_P0: p0_out[wr_addr[2:0]] <= #1 bit_in;
        `OC8051_SFR_B_P0: p0_out[wr_addr[2:0]] <= bit_in;
`endif
`endif
 
 
`ifdef OC8051_PORT1
`ifdef OC8051_PORT1
        `OC8051_SFR_B_P1: p1_out[wr_addr[2:0]] <= #1 bit_in;
        `OC8051_SFR_B_P1: p1_out[wr_addr[2:0]] <= bit_in;
`endif
`endif
 
 
`ifdef OC8051_PORT2
`ifdef OC8051_PORT2
        `OC8051_SFR_B_P2: p2_out[wr_addr[2:0]] <= #1 bit_in;
        `OC8051_SFR_B_P2: p2_out[wr_addr[2:0]] <= bit_in;
`endif
`endif
 
 
`ifdef OC8051_PORT3
`ifdef OC8051_PORT3
        `OC8051_SFR_B_P3: p3_out[wr_addr[2:0]] <= #1 bit_in;
        `OC8051_SFR_B_P3: p3_out[wr_addr[2:0]] <= bit_in;
`endif
`endif
 
        default: begin
 
`ifdef OC8051_PORT0
 
    p0_out <= `OC8051_RST_P0;
 
`endif
 
 
 
`ifdef OC8051_PORT1
 
    p1_out <= `OC8051_RST_P1;
 
`endif
 
 
 
`ifdef OC8051_PORT2
 
    p2_out <= `OC8051_RST_P2;
 
`endif
 
 
 
`ifdef OC8051_PORT3
 
    p3_out <= `OC8051_RST_P3;
 
`endif
 
         end
      endcase
      endcase
    end
    end
  end
  end
end
end
 
 

powered by: WebSVN 2.1.0

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