亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dw8051_timer2.v

?? DW8051單片機的設計
?? V
字號:
// $Id: DW8051_timer2.v,v 1.1 1996/07/25 17:43:38 gina Exp $//------------------------------------------------------------------------------////        This confidential and proprietary software may be used only//     as authorized by a licensing agreement from Synopsys Inc.//     In the event of publication, the following notice is applicable:////                    (C) COPYRIGHT 1996   SYNOPSYS INC.//                          ALL RIGHTS RESERVED////        The entire notice above must be reproduced on all authorized//        copies.//// FILE: DW8051_timer2.v//// AUTHOR: Ludwig Rieder//// ABSTRACT: DW8051 timer2 module (Verilog version)//// MODIFICATION HISTORY://      L.Rieder        10.06.96        Verilog version created////	Bala Needamangalam//			May 20,1998	Updated the inline comments//                      July 20,1999    Removed all DesignWare-Foundation //                                      license checkout commands.//------------------------------------------------------------------------------`include "./DW8051/DW8051_package.inc"`include "./DW8051/DW8051_parameter.v"module DW8051_timer2 (clk,                      rst_n,                      // sfr bus:                      sfr_addr,                      timer2_sfr_cs,                      timer2_data_out,                      timer2_data_in,                      sfr_wr,                      // signals from DW8051_cpu:                      cycle,                      t2m,		//timer2 rate control bit from ckcon                      // external inputs:                      t2,		// input pin                      t2ex,		// input pin                      // external outputs:                      t2_out,		// output pin                      // signals to DW8051_serial:                      out_rclk,		// receive  clock select from t2con                      out_tclk,		// transmit clock select from t2con                      out_t2_ofl,	// timer2 overflow flag                      // signals to DW8051_intr:                      out_tf2,		// overflow flag from t2con                      out_exf2  	// external flag from t2con		      );  input clk; input rst_n; input [7:0] sfr_addr; input [7:0] timer2_data_in; input sfr_wr; input [1:0] cycle; input t2m; input t2; input t2ex; output timer2_sfr_cs; output [7:0] timer2_data_out; output t2_out; output out_rclk; output out_tclk; output out_t2_ofl; output out_tf2; output out_exf2;//------------------------------------------------------------------------------wire clk;wire rst_n;wire [7:0] sfr_addr;wire [7:0] timer2_data_in;wire sfr_wr;wire [1:0] cycle;wire t2m;wire t2;wire t2ex;wire timer2_sfr_cs;wire [7:0] timer2_data_out;reg  t2_out;wire out_rclk;wire out_tclk;wire out_t2_ofl;wire out_tf2;wire out_exf2;//---------------// local signals://---------------// timer2_mode types:`define auto_reload  2'b00`define capture      2'b01`define baud_rate    2'b10reg  [7:0] t2con_reg;wire tf2;wire exf2;wire rclk;wire tclk;wire exen2;wire tr2;wire ct2;wire cp2; wire [7:0] tl2_reg;wire [7:0] th2_reg;reg  [7:0] rcap2l_reg;reg  [7:0] rcap2h_reg; wire t2con_cs;			// chip select for t2conwire tl2_cs;			// chip select for tl2wire th2_cs;			// chip select for th2wire rcap2l_cs;			// chip select for rcap2lwire rcap2h_cs;			// chip select for rcap2h wire [1:0] mode;		// of type timer2_mode wire set_tf2;wire e_tl2;			// enable low byte counterwire e_th2;			// enable high byte counter wire ld_tl2_n;			// active low load signal for low byte counterwire ld_th2_n;			// active low load signal for high byte counter wire [7:0] tl2_in;wire [7:0] th2_in; reg  t2_l0;			// latched input t2reg  t2_l1;			// latched t2_l0reg  t2_l2;			// latched t2_l1 reg  t2ex_l0;			// latched input t2exreg  t2ex_l1;			// latched t2ex_l0reg  t2ex_l2;			// latched t2ex_l1 wire t2_event;			// 1-0 transition on t2 inputwire t2ex_event;		// 1-0 transition on t2ex inputwire tl2_sat;			// saturation flag for tl2_regwire th2_sat;			// saturation flag for th2_regwire tl2_wr;			// sfr write to tl2_regwire th2_wr;			// sfr write to th2_regwire t2_ofl;			// timer2 overflow flag wire clk_div2;			// 1/2 clkwire clk_div4;			// 1/4 clkreg  clk_div12;			// 1/12 clkreg  [1:0] count; // dummy signals:wire [7:0] tl2_reg_n;wire [7:0] th2_reg_n;wire tl2_sat5;wire th2_sat5;//------------------------------------------------------------------------------  // decode sfr address  assign t2con_cs  = (sfr_addr == `t2con_addr)  ? 1 : 0;  assign tl2_cs    = (sfr_addr == `tl2_addr)    ? 1 : 0;  assign th2_cs    = (sfr_addr == `th2_addr)    ? 1 : 0;  assign rcap2l_cs = (sfr_addr == `rcap2l_addr) ? 1 : 0;  assign rcap2h_cs = (sfr_addr == `rcap2h_addr) ? 1 : 0;// SFR Write process  always @(posedge clk or negedge rst_n)  begin : sfr_process    if (rst_n == 0)    begin       t2con_reg  <= 'b0;      rcap2l_reg <= 'b0;      rcap2h_reg <= 'b0;    end    else    begin    		// t2con_reg can be updated by software or by hardware.      if ((sfr_wr == 1) & (t2con_cs == 1)) t2con_reg <= timer2_data_in;      else      begin        if (set_tf2    == 1) t2con_reg[7] <= 1;        if (t2ex_event == 1) t2con_reg[6] <= 1;		//set exf2 flag      end 		// rcap2l_reg can be updated by software or by hardware in		// capture mode.      if ((sfr_wr == 1) & (rcap2l_cs == 1)) rcap2l_reg <= timer2_data_in;      else if ((mode == `capture) &               (t2ex_event == 1))           rcap2l_reg <= tl2_reg;		// rcap2h_reg can be updated by software or by hardware in		// capture mode.      if ((sfr_wr == 1) & (rcap2h_cs == 1)) rcap2h_reg <= timer2_data_in;      else if ((mode == `capture) &               (t2ex_event == 1))           rcap2h_reg <= th2_reg;    end   end  //sfr_process  // Aliases for t2con bits  assign  tf2   = t2con_reg[7];  assign  exf2  = t2con_reg[6];  assign  rclk  = t2con_reg[5];  assign  tclk  = t2con_reg[4];  assign  exen2 = t2con_reg[3];  assign  tr2   = t2con_reg[2];  assign  ct2   = t2con_reg[1];  assign  cp2   = t2con_reg[0];  // input flip-flops  always @(posedge clk or negedge rst_n)  begin : inp_latch_process    if (rst_n == 0)    begin       t2_l0   <= 0;      t2_l1   <= 0;      t2_l2   <= 0;      t2ex_l0 <= 0;      t2ex_l1 <= 0;      t2ex_l2 <= 0;    end    else    begin      t2_l0   <= t2;		// Stage 0 synchronizer operates      t2ex_l0 <= t2ex;		// on every clock.      if (cycle == `c1)      begin         t2_l1   <= t2_l0;	// Stage 1 and Stage 2 synchronizers are        t2_l2   <= t2_l1;	// enabled only at the end of phase C1        t2ex_l1 <= t2ex_l0;        t2ex_l2 <= t2ex_l1;      end     end   end  //inp_latch_process  // detect high to low transition on t2 input  assign t2_event  = (cycle != `c2) ? 0 : (t2_l2 & ~t2_l1);  // detect high to low transition on t2ex input and evaluate enable flag  assign t2ex_event  = (cycle != `c2) ? 0 :                       (exen2 == 0)   ? 0 :                                        (t2ex_l2  & ~t2ex_l1);// Divide by 2 clock  assign clk_div2 = cycle[0];// Divide-by-4 clock: high only in phase C2  assign clk_div4 = (cycle == `c2) ? 1 : 0;// Divide by 12 clock process// 		The "count" and the clk_div12 change state only at the end of//		the C1 clock phase (i.e., in the beginning of C2)  always @(posedge clk or negedge rst_n)  begin : clk_div_process    if (rst_n == 0)    begin       count     <= 2'b00;      clk_div12 <= 1;    end    else    begin      if (tr2 == 0)      begin         count     <= 2'b00;        clk_div12 <= 1;      end      else if (cycle == 2'b00)      begin         count[0]  <= ~(count[0] | count[1]);        count[1]  <= count[0];        clk_div12 <= count[1];      end      else clk_div12 <= 0;    end   end  //clk_div_process// Timer2 Mode definitions.  assign mode  = ((rclk == 1) | (tclk == 1)) ? `baud_rate :                 (cp2 == 1)                  ? `capture   :                                               `auto_reload;// Write-enables for TL2/TH2  assign  tl2_wr  = sfr_wr & tl2_cs;  assign  th2_wr  = sfr_wr & th2_cs;// Parallel load control for TL2  assign ld_tl2_n = (tl2_wr == 1)                                ? 0  :                    ((mode == `auto_reload) & (t2ex_event == 1)) ? 0  :                    ((mode == `auto_reload) & (t2_ofl == 1))     ? 0  :                    ((mode == `baud_rate)   & (t2_ofl == 1))     ? 0  :                                                                   1;// Parallel DATA in for TL2  assign tl2_in  = (tl2_wr == 1) ? timer2_data_in : rcap2l_reg;// Count-enable for TL2  assign e_tl2  = (tr2  == 0)          ? 0         :                  (ct2  == 1)          ? t2_event  :                  (mode == `baud_rate) ? clk_div2  :                  (t2m  == 0)          ? clk_div12 :                                         clk_div4;// Parallel load control for TH2  assign ld_th2_n = (th2_wr == 1)                                ? 0  :                    ((mode == `auto_reload) & (t2ex_event == 1)) ? 0  :                    ((mode == `auto_reload) & (t2_ofl == 1))     ? 0  :                    ((mode == `baud_rate)   & (t2_ofl == 1))     ? 0  :                                                                   1;// Parallel DATA in for TH2  assign th2_in  = (th2_wr == 1) ? timer2_data_in : rcap2h_reg;// Count-enable for TH2  assign  e_th2  = tl2_sat;// Timer2 Overflow definition  assign  t2_ofl = th2_sat & tl2_sat;// Hardware update flag for TF2 in T2CON  assign set_tf2 = (mode != `baud_rate) ? t2_ofl : 0;// The count-enables of TL2/TH2 are active only in the C2 clock phase.// Thus the Timer/Ctr modules will update at the end of the C2 clock phase.// This enables the CPU to read these registers in the C3 phase of the same// machine cycle.  DW8051_timer_ctr #(8) i1			// Timer/Ctr for TL2                     (.q         (tl2_reg),                      .q_n       (tl2_reg_n),   //not used                      .ones_all  (tl2_sat),                      .ones_5lsb (tl2_sat5),	//not used                      .clk       (clk),                      .rst_n     (rst_n),                      .ld_n      (ld_tl2_n),                      .data_in   (tl2_in),                      .cnt_en    (e_tl2));  DW8051_timer_ctr #(8) i2			// Timer/Ctr for TH2                     (.q         (th2_reg),                      .q_n       (th2_reg_n),   //not used                      .ones_all  (th2_sat),                      .ones_5lsb (th2_sat5),	//not used                      .clk       (clk),                      .rst_n     (rst_n),                      .ld_n      (ld_th2_n),                      .data_in   (th2_in),                      .cnt_en    (e_th2));  // output signals  assign  out_tf2    = tf2  | set_tf2;  assign  out_exf2   = exf2 | t2ex_event;  assign  out_rclk   = rclk;  assign  out_tclk   = tclk;  assign  out_t2_ofl = t2_ofl;  // t2_out is a 1 clock delayed version of t2_ofl  always @(posedge clk or negedge rst_n)  begin : out_process    if (rst_n == 0)    begin       t2_out <= 0;    end    else      t2_out <= t2_ofl;  end  //out_process  assign timer2_data_out = (t2con_cs  == 1) ? t2con_reg  :                           (tl2_cs    == 1) ? tl2_reg    :                           (th2_cs    == 1) ? th2_reg    :                           (rcap2l_cs == 1) ? rcap2l_reg :                                              rcap2h_reg;  assign  timer2_sfr_cs  = t2con_cs | tl2_cs | th2_cs | rcap2l_cs | rcap2h_cs;endmodule

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久中文综合久久97| 麻豆国产精品一区二区三区 | 一区二区三区欧美激情| 成人av小说网| 国产精品国产自产拍高清av | 欧美猛男gaygay网站| 亚洲丝袜精品丝袜在线| 波多野结衣一区二区三区| 国产亲近乱来精品视频 | 久久综合国产精品| 国产精品一卡二卡| 国产精品少妇自拍| 色综合久久久久久久| 亚洲一区在线免费观看| 91亚洲永久精品| 亚洲精品高清在线| 欧美日韩国产色站一区二区三区| 午夜天堂影视香蕉久久| 99国产欧美另类久久久精品| 亚洲欧美另类久久久精品| 91久久香蕉国产日韩欧美9色| 一区二区成人在线| 欧美专区在线观看一区| 日韩精品每日更新| 久久综合国产精品| 91女神在线视频| 中文字幕在线观看不卡视频| 欧美亚洲动漫精品| 麻豆91免费看| 国产精品欧美综合在线| 91官网在线观看| 美女一区二区三区在线观看| 国产亚洲1区2区3区| 色综合天天在线| 亚洲国产日韩a在线播放性色| 日韩欧美国产一区二区在线播放| 丰满少妇在线播放bd日韩电影| 亚洲老妇xxxxxx| 欧美精品久久一区| 成人午夜av电影| 亚洲一区二区三区中文字幕| 日韩一区二区三区四区| 国产成人免费在线观看| 亚洲动漫第一页| 国产性色一区二区| 欧美日韩精品免费观看视频 | 国产亚洲欧美色| 色视频一区二区| 黄一区二区三区| 亚洲精品一卡二卡| 久久综合999| 欧美日韩中字一区| 成人午夜激情视频| 日韩高清电影一区| 亚洲色图制服丝袜| 久久久久综合网| 欧美人动与zoxxxx乱| av中文字幕不卡| 国内精品写真在线观看| 亚洲一二三四区| 中日韩免费视频中文字幕| 777奇米成人网| 日本韩国精品一区二区在线观看| 国产成人综合在线| 奇米亚洲午夜久久精品| 一区二区三区不卡视频在线观看| 中文av字幕一区| 欧美日韩精品久久久| 99久久精品免费精品国产| 国产精品自拍一区| 蜜桃免费网站一区二区三区| 亚洲欧美电影一区二区| 日本一区二区三区免费乱视频| 欧美精品日韩一本| 欧美日韩一区二区在线观看 | 韩国中文字幕2020精品| 亚洲欧美日韩在线| 国产成人av福利| 国产真实乱偷精品视频免| 精品一区二区三区影院在线午夜| 青青草国产成人av片免费| 日本一道高清亚洲日美韩| 日本不卡在线视频| 韩国欧美一区二区| 国产98色在线|日韩| 91免费看视频| 欧美日韩精品一区二区天天拍小说 | 国产伦理精品不卡| 激情深爱一区二区| 国产大陆亚洲精品国产| www.久久精品| 欧美伊人久久大香线蕉综合69| 欧美自拍丝袜亚洲| 日韩欧美中文字幕一区| 久久精品夜色噜噜亚洲a∨| 亚洲国产精品精华液ab| 一区二区三区免费| 日本不卡一区二区三区高清视频| 国产在线播放一区| 99精品视频在线观看免费| 精品视频在线免费观看| 久久综合九色综合97婷婷| 国产精品成人午夜| 五月天久久比比资源色| 国产裸体歌舞团一区二区| 99久久国产免费看| 91精品一区二区三区久久久久久 | 日韩黄色在线观看| 国产一区二区三区久久久| www.爱久久.com| 3d动漫精品啪啪1区2区免费| 欧美高清在线精品一区| 亚洲444eee在线观看| 国产精品伊人色| 欧日韩精品视频| 欧美va亚洲va| 亚洲综合免费观看高清完整版在线 | 国产色爱av资源综合区| 洋洋av久久久久久久一区| 精品一区二区精品| 色哟哟一区二区| 久久影院午夜论| 午夜免费久久看| av影院午夜一区| 欧美大片在线观看| 亚洲欧美日韩一区二区三区在线观看| 日韩不卡一区二区三区| 91蜜桃网址入口| 国产偷国产偷精品高清尤物 | 国产麻豆午夜三级精品| 日本伦理一区二区| 国产欧美日韩在线| 美女诱惑一区二区| 欧美视频在线播放| 综合电影一区二区三区| 国产麻豆视频精品| 欧美成人福利视频| 午夜激情一区二区三区| 99热国产精品| 久久久91精品国产一区二区精品 | 一卡二卡欧美日韩| 成人综合婷婷国产精品久久| 日韩欧美国产成人一区二区| 亚洲一区二区三区四区五区中文| 成人丝袜高跟foot| 久久夜色精品国产噜噜av| 日本亚洲电影天堂| 欧美日韩国产中文| 亚洲五月六月丁香激情| 一本大道久久a久久综合| 国产精品美女久久久久av爽李琼 | 亚洲人成网站精品片在线观看| 国产一区二区电影| 精品对白一区国产伦| 免费高清成人在线| 日韩一级二级三级| 日韩av电影一区| 日韩三级av在线播放| 男女男精品视频网| 91麻豆精品国产自产在线| 午夜精品久久久久影视| 欧美亚洲高清一区二区三区不卡| 亚洲人成7777| 在线观看一区不卡| 一区二区三区免费网站| 91国产免费看| 亚洲福利电影网| 91精品在线观看入口| 日本中文一区二区三区| 91精品国产乱码久久蜜臀| 午夜精品福利视频网站| 欧美丰满少妇xxxxx高潮对白| 亚洲v中文字幕| 欧美福利视频一区| 美腿丝袜亚洲综合| 国产婷婷色一区二区三区| 成人午夜短视频| 亚洲黄色在线视频| 欧美午夜精品一区二区蜜桃| 亚洲国产cao| 日韩欧美一级在线播放| 国产一区不卡精品| 欧美国产综合一区二区| 91一区二区在线| 亚洲不卡av一区二区三区| 欧美一级二级三级乱码| 国产一区二区三区电影在线观看| 欧美国产视频在线| 色噜噜夜夜夜综合网| 青椒成人免费视频| 久久久久高清精品| 一本大道久久a久久精二百| 午夜精品国产更新| 久久毛片高清国产| 色丁香久综合在线久综合在线观看| 天天综合日日夜夜精品| 精品av综合导航| 9久草视频在线视频精品| 午夜精品123| 国产精品久线观看视频|