⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oc8051_sfr.v

📁 verilog code,about oc8051
💻 V
📖 第 1 页 / 共 2 页
字号:
//////////////////////////////////////////////////////////////////////////                                                              ////////  8051 cores sfr top level module                             ////////                                                              ////////  This file is part of the 8051 cores project                 ////////  http://www.opencores.org/cores/8051/                        ////////                                                              ////////  Description                                                 ////////   special function registers for oc8051                      ////////                                                              ////////  To Do:                                                      ////////    nothing                                                   ////////                                                              ////////  Author(s):                                                  ////////      - Simon Teran, simont@opencores.org                     ////////                                                              //////////////////////////////////////////////////////////////////////////////                                                              //////// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////////                                                              //////// This source file may be used and distributed without         //////// restriction provided that this copyright statement is not    //////// removed from the file and that any derivative work contains  //////// the original copyright notice and the associated disclaimer. ////////                                                              //////// This source file is free software; you can redistribute it   //////// and/or modify it under the terms of the GNU Lesser General   //////// Public License as published by the Free Software Foundation; //////// either version 2.1 of the License, or (at your option) any   //////// later version.                                               ////////                                                              //////// This source is distributed in the hope that it will be       //////// useful, but WITHOUT ANY WARRANTY; without even the implied   //////// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //////// PURPOSE.  See the GNU Lesser General Public License for more //////// details.                                                     ////////                                                              //////// You should have received a copy of the GNU Lesser General    //////// Public License along with this source; if not, download it   //////// from http://www.opencores.org/lgpl.shtml                     ////////                                                              ////////////////////////////////////////////////////////////////////////////// CVS Revision History//// $Log: oc8051_sfr.v,v $// Revision 1.15  2003/07/01 20:47:39  simont// add /* synopsys xx_case */ to case statments.//// Revision 1.14  2003/05/07 12:39:20  simont// fix bug in case of sequence of inc dptr instrucitons.//// Revision 1.13  2003/05/05 15:46:37  simont// add aditional alu destination to solve critical path.//// Revision 1.12  2003/04/29 11:24:31  simont// fix bug in case execution of two data dependent instructions.//// Revision 1.11  2003/04/25 17:15:51  simont// change branch instruction execution (reduse needed clock periods).//// Revision 1.10  2003/04/10 12:43:19  simont// defines for pherypherals added//// Revision 1.9  2003/04/09 16:24:03  simont// change wr_sft to 2 bit wire.//// Revision 1.8  2003/04/09 15:49:42  simont// Register oc8051_sfr dato output, add signal wait_data.//// Revision 1.7  2003/04/07 14:58:02  simont// change sfr's interface.//// Revision 1.6  2003/04/07 13:29:16  simont// change uart to meet timing.//// Revision 1.5  2003/04/04 10:35:07  simont// signal prsc_ow added.//// Revision 1.4  2003/03/28 17:45:57  simont// change module name.//// Revision 1.3  2003/01/21 13:51:30  simont// add include oc8051_defines.v//// Revision 1.2  2003/01/13 14:14:41  simont// replace some modules//// Revision 1.1  2002/11/05 17:22:27  simont// initial import////// synopsys translate_off`include "oc8051_timescale.v"// synopsys translate_on`include "oc8051_defines.v"module oc8051_sfr (rst, clk,       adr0, adr1, dat0,        dat1, dat2, bit_in,       des_acc,       we, wr_bit,       bit_out,       wr_sfr, acc,        ram_wr_sel, ram_rd_sel,        sp, sp_w,        bank_sel,        desAc, desOv,       srcAc, cy,       psw_set, rmw,       comp_sel,       comp_wait,`ifdef OC8051_PORTS  `ifdef OC8051_PORT0       p0_out,       p0_in,  `endif  `ifdef OC8051_PORT1       p1_out,       p1_in,  `endif  `ifdef OC8051_PORT2       p2_out,       p2_in,  `endif  `ifdef OC8051_PORT3       p3_out,       p3_in,  `endif`endif  `ifdef OC8051_UART       rxd, txd,  `endif       int_ack, intr,       int0, int1,       int_src,       reti,  `ifdef OC8051_TC01       t0, t1,  `endif  `ifdef OC8051_TC2       t2, t2ex,  `endif       dptr_hi, dptr_lo,       wait_data);input       rst,	// reset - pin	    clk,	// clock - pin            we,		// write enable	    bit_in,	    desAc,	    desOv,	    rmw;input       int_ack,            int0,	    int1,            reti,	    wr_bit;input [1:0] psw_set,            wr_sfr,	    comp_sel;input [2:0] ram_rd_sel,            ram_wr_sel;input [7:0] adr0, 	//address 0 input            adr1, 	//address 1 input	    des_acc,	    dat1,	//data 1 input (des1)            dat2;	//data 2 input (des2)output       bit_out,             intr,             srcAc,	     cy,	     wait_data,	     comp_wait;output [1:0] bank_sel;output [7:0] dat0,	//data output	     int_src,	     dptr_hi,	     dptr_lo,	     acc;output [7:0] sp,             sp_w;// ports`ifdef OC8051_PORTS`ifdef OC8051_PORT0input  [7:0] p0_in;output [7:0] p0_out;wire   [7:0] p0_data;`endif`ifdef OC8051_PORT1input  [7:0] p1_in;output [7:0] p1_out;wire   [7:0] p1_data;`endif`ifdef OC8051_PORT2input  [7:0] p2_in;output [7:0] p2_out;wire   [7:0] p2_data;`endif`ifdef OC8051_PORT3input  [7:0] p3_in;output [7:0] p3_out;wire   [7:0] p3_data;`endif`endif// serial interface`ifdef OC8051_UARTinput        rxd;output       txd;`endif// timer/counter 0,1`ifdef OC8051_TC01input	     t0, t1;`endif// timer/counter 2`ifdef OC8051_TC2input	     t2, t2ex;`endifreg        bit_out,            wait_data;reg [7:0]  dat0,           adr0_r;reg        wr_bit_r;reg [2:0]  ram_wr_sel_r;wire       p,           uart_int,	   tf0,	   tf1,	   tr0,	   tr1,           rclk,           tclk,	   brate2,	   tc2_int;wire [7:0] b_reg,            psw,`ifdef OC8051_TC2  // t/c 2	   t2con, 	   tl2, 	   th2, 	   rcap2l, 	   rcap2h,`endif`ifdef OC8051_TC01  // t/c 0,1	   tmod, 	   tl0, 	   th0, 	   tl1,	   th1,`endif  // serial interface`ifdef OC8051_UART           scon, 	   pcon, 	   sbuf,`endif  //interrupt control	   ie, 	   tcon, 	   ip;reg        pres_ow;reg [3:0]  prescaler;assign cy = psw[7];assign srcAc = psw [6];//// accumulator// ACCoc8051_acc oc8051_acc1(.clk(clk),                        .rst(rst), 		       .bit_in(bit_in), 		       .data_in(des_acc),		       .data2_in(dat2),		       .wr(we),		       .wr_bit(wr_bit_r),		       .wr_sfr(wr_sfr),		       .wr_addr(adr1),		       .data_out(acc),		       .p(p));//// b register// Boc8051_b_register oc8051_b_register (.clk(clk),                                     .rst(rst),				     .bit_in(bit_in),				     .data_in(des_acc),				     .wr(we), 				     .wr_bit(wr_bit_r), 				     .wr_addr(adr1),				     .data_out(b_reg));////stack pointer// SPoc8051_sp oc8051_sp1(.clk(clk),                      .rst(rst), 		     .ram_rd_sel(ram_rd_sel), 		     .ram_wr_sel(ram_wr_sel), 		     .wr_addr(adr1), 		     .wr(we), 		     .wr_bit(wr_bit_r), 		     .data_in(dat1), 		     .sp_out(sp), 		     .sp_w(sp_w));////data pointer// DPTR, DPH, DPLoc8051_dptr oc8051_dptr1(.clk(clk),                          .rst(rst), 			 .addr(adr1), 			 .data_in(des_acc),			 .data2_in(dat2), 			 .wr(we), 			 .wr_bit(wr_bit_r),			 .data_hi(dptr_hi),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -