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

Subversion Repositories 8051

[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_sfr.v] - Diff between revs 90 and 113

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

Rev 90 Rev 113
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.4  2003/03/28 17:45:57  simont
 
// change module name.
 
//
// Revision 1.3  2003/01/21 13:51:30  simont
// Revision 1.3  2003/01/21 13:51:30  simont
// add include oc8051_defines.v
// add include oc8051_defines.v
//
//
// 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 156... Line 159...
wire acc_bit, b_bit, psw_bit, port_bit, uart_bit, int_bit, tc2_bit, pca_bit;
wire acc_bit, b_bit, psw_bit, port_bit, uart_bit, int_bit, tc2_bit, pca_bit;
wire p, int_uart, tf0, tf1, tr0, tr1;
wire p, int_uart, tf0, tf1, tr0, tr1;
wire dps, rclk, tclk, brate2, tc2_int;
wire dps, rclk, tclk, brate2, tc2_int;
wire [7:0] b_reg, psw, ports, uart, int_out, tc_out, tc2, sp_out;
wire [7:0] b_reg, psw, ports, uart, int_out, tc_out, tc2, sp_out;
 
 
 
wire pres_ow;
 
 
assign cy = psw[7];
assign cy = psw[7];
assign srcAc = psw [6];
assign srcAc = psw [6];
 
 
 
 
Line 233... Line 237...
//
//
// timer/counter control
// timer/counter control
// TH0, TH1, TL0, TH1, TMOD
// TH0, TH1, TL0, TH1, TMOD
oc8051_tc oc8051_tc1(.clk(clk), .rst(rst), .wr_addr(adr1), .rd_addr(adr0),
oc8051_tc oc8051_tc1(.clk(clk), .rst(rst), .wr_addr(adr1), .rd_addr(adr0),
                .data_in(dat1), .wr(we), .wr_bit(wr_bit_r), .ie0(int0), .ie1(int1), .tr0(tr0),
                .data_in(dat1), .wr(we), .wr_bit(wr_bit_r), .ie0(int0), .ie1(int1), .tr0(tr0),
                .tr1(tr1), .t0(t0), .t1(t1), .data_out(tc_out), .tf0(tf0), .tf1(tf1));
                .tr1(tr1), .t0(t0), .t1(t1), .data_out(tc_out), .tf0(tf0), .tf1(tf1), .pres_ow(pres_ow));
 
 
//
//
// timer/counter 2
// timer/counter 2
// TH2, TH2, RCAPL2L, RCAPL2H, T2CON, T2MOD
// TH2, TH2, RCAPL2L, RCAPL2H, T2CON
oc8051_tc2 oc8051_tc21(.clk(clk), .rst(rst), .wr_addr(adr1), .rd_addr(adr0_r), .data_in(dat1), .wr(we),
oc8051_tc2 oc8051_tc21(.clk(clk), .rst(rst), .wr_addr(adr1), .rd_addr(adr0_r), .data_in(dat1), .wr(we),
           .wr_bit(wr_bit_r), .bit_in(bit_in), .t2(t2), .t2ex(t2ex), .data_out(tc2), .bit_out(tc2_bit),
           .wr_bit(wr_bit_r), .bit_in(bit_in), .t2(t2), .t2ex(t2ex), .data_out(tc2), .bit_out(tc2_bit),
           .rclk(rclk), .tclk(tclk), .brate2(brate2), .tc2_int(tc2_int));
           .rclk(rclk), .tclk(tclk), .brate2(brate2), .tc2_int(tc2_int), .pres_ow(pres_ow));
 
 
 
 
 
 
always @(posedge clk or posedge rst)
always @(posedge clk or posedge rst)
  if (rst) begin
  if (rst) begin
Line 286... Line 290...
      `OC8051_SFR_TCON: dat0 = int_out;
      `OC8051_SFR_TCON: dat0 = int_out;
      `OC8051_SFR_RCAP2H: dat0 = tc2;
      `OC8051_SFR_RCAP2H: dat0 = tc2;
      `OC8051_SFR_RCAP2L: dat0 = tc2;
      `OC8051_SFR_RCAP2L: dat0 = tc2;
      `OC8051_SFR_TH2:    dat0 = tc2;
      `OC8051_SFR_TH2:    dat0 = tc2;
      `OC8051_SFR_TL2:    dat0 = tc2;
      `OC8051_SFR_TL2:    dat0 = tc2;
      `OC8051_SFR_T2MOD:  dat0 = tc2;
 
      `OC8051_SFR_T2CON:  dat0 = tc2;
      `OC8051_SFR_T2CON:  dat0 = tc2;
 
 
      default: dat0 = 8'h00;
      default: dat0 = 8'h00;
    endcase
    endcase
end
end
 
 
 
 

powered by: WebSVN 2.1.0

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