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

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

?? read_ch_arbiter.v

?? 如何使用ISE和FPGA使用指南
?? V
字號:

//_____________________________________________________________________________________
// read_ch_arbiter.v
//_____________________________________________________________________________________
// This arbiter, arbitrates the next channel to read from.  Each channel that has a pn_lock
// will increment by 1 for each read cycle which it is not the channel read from.  If it is
// the channel that is read it will be reset to 0.  Whichever channel has the highest count
// and maintains a pn_lock will be the next channel to be read.  In this way, at the most, 
// each channel will be read every 4th read cycle.  Channel A has the highest priority, then B, 
// then C, and finally channel D.  If a channel loses lock, its count will be reset to 0. 
//_____________________________________________________________________________________


module read_ch_arbiter(input clk, 
		       input reset, 
		       input waiting_cntr_en, 
		       input next_ch_en, 
		       input [3:0] pn_lock_rd_clk, 
		       input [3:0] almost_full, 
		       input [3:0] almost_empty, 
		       input [3:0] empty, 
		       input [3:0] full, 
		       output [3:0] next_ch);
    
    reg       next_cha, next_chb, next_chc, next_chd;
    reg [2:0] cha_waiting_cntr, chb_waiting_cntr, chc_waiting_cntr, chd_waiting_cntr; // counts the number of cycles between being read.
    reg [3:0] priority, priority_v; // assigns priority to those channels that are almost_full.  Otherwise, 
    // if there are no almost_full channels priority is given to the channels that are not almost_empty.
    wire [2:0] cha_weight, chb_weight, chc_weight, chd_weight; // priority * waiting time
    
    assign next_ch = {next_chd, next_chc, next_chb, next_cha};
    //_____________________________________________________________________________________
    // Counts the number of cycles that each channel has been locked and waiting to output data.
    //_____________________________________________________________________________________
    always @ (posedge clk)
    begin: locked_ch_wait_cntr
	if (reset)
	begin
	    cha_waiting_cntr <= 0;
	    chb_waiting_cntr <= 0;
	    chc_waiting_cntr <= 0;
	    chd_waiting_cntr <= 0;
	end // if (reset)
	else
	begin
	      if (~pn_lock_rd_clk[0] | next_cha)
		cha_waiting_cntr <= 0;
	      else if (waiting_cntr_en & pn_lock_rd_clk[0])// clock enable waiting_cntr_en => Only enabled every 8 clock cycles
		cha_waiting_cntr <= cha_waiting_cntr + 1;
	    
	      if (~pn_lock_rd_clk[1] | next_chb)
		chb_waiting_cntr <= 0;
	      else if (waiting_cntr_en & pn_lock_rd_clk[1])// clock enable waiting_cntr_en => Only enabled every 8 clock cycles
		chb_waiting_cntr <= chb_waiting_cntr + 1;
	    
	    if (~pn_lock_rd_clk[2] | next_chc)
		chc_waiting_cntr <= 0;
	      else if (waiting_cntr_en & pn_lock_rd_clk[2])// clock enable waiting_cntr_en => Only enabled every 8 clock cycles
		chc_waiting_cntr <= chc_waiting_cntr + 1;

	      if (~pn_lock_rd_clk[3] | next_chd)
		chd_waiting_cntr <= 0;
	      else if (waiting_cntr_en & pn_lock_rd_clk[3])// clock enable waiting_cntr_en => Only enabled every 8 clock cycles
		chd_waiting_cntr <= chd_waiting_cntr + 1;
	end // else: !if(reset)
    end // block: locked_ch_wait_cntr

    //_____________________________________________________________________________________
    // Assigns priority to those channels that are almost_full.  If no channel is almost_full,
    // priority is assigned to those channels that are NOT almost_empty.  Finally, if there
    // is no priority, then the read is based on the waiting counters.
    //_____________________________________________________________________________________
    always @ (posedge clk)
    begin
	if (reset)
	  priority <= 0;
	else
	  begin
	      // default
	      priority_v = 0;
	      
	      if (|full) // highest priority given to those channels that are full
		priority_v = full;
	      else if (|almost_full) // priority is given to those channels that are almost_full
		priority_v = almost_full;
	      else // if no channels are almost full, priority is given to the channels that are not almost_empty
		if (|almost_empty) // if locked channels are the same as the almost_empty channelss
		  priority_v = ~almost_empty; 

	      if (|priority_v == 0 | ((priority_v & pn_lock_rd_clk) == 4'b0000))  // if there isn't any priority, the priority 
	        // will go to the highest waiting period
		priority_v = pn_lock_rd_clk;
	      else
		priority_v = priority_v & pn_lock_rd_clk;

	      priority <= priority_v & ~empty;// give the highest priority to those channels that are NOT empty
	  end // else: !if(reset)
	
    end // always @ (posedge clk or posedge reset)
    

    assign cha_weight = (priority[0]) ? cha_waiting_cntr + 1 : 0;
    assign chb_weight = (priority[1]) ? chb_waiting_cntr + 1 : 0;
    assign chc_weight = (priority[2]) ? chc_waiting_cntr + 1 : 0;
    assign chd_weight = (priority[3]) ? chd_waiting_cntr + 1 : 0;
    
    //_____________________________________________________________________________________
    // Read channel Arbiter.  Which ever channel is locked and has the highest "weight"
    // will be the next channel that is read.  
    //_____________________________________________________________________________________
    always @ (posedge clk)
    begin: next_ch_read_arbiter
	if (reset)
	begin
	    next_cha <= 0;
	    next_chb <= 0;
	    next_chc <= 0;
	    next_chd <= 0;
	end // if (reset)
	else
	begin
	    if (next_ch_en)
	    begin
		// defaults
		next_cha <= 0;
		next_chb <= 0;
		next_chc <= 0;
		next_chd <= 0;
		
		case (priority)
		    4'b0000:
		    begin
			next_cha <= 0;
			next_chb <= 0;
			next_chc <= 0;
			next_chd <= 0;
		    end
		    default:
		      begin
			  next_cha <= ((cha_weight >= chb_weight) & 
				       (cha_weight >= chc_weight) & (cha_weight >= chd_weight));
			  next_chb <= ((chb_weight > cha_weight) & 
				       (chb_weight >= chc_weight) & (chb_weight >= chd_weight));
			  next_chc <= ((chc_weight > cha_weight) & 
				       (chc_weight > chb_weight) & (chc_weight >= chd_weight));
			  next_chd <= ((chd_weight > cha_weight) & 
				       (chd_weight > chb_weight) & (chd_weight > chc_weight));
		      end // case: default
		endcase // case(priority)
 	    end // if (next_ch_en)
	end // else: !if(reset)
    end // block: next_ch_read_arbiter


endmodule // read_ch_arbiter

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线日韩一区二区| 午夜一区二区三区在线观看| 狠狠色狠狠色合久久伊人| 91精品国产综合久久蜜臀| 亚洲成人av中文| 日韩欧美国产综合| 国产在线精品一区二区夜色 | 日韩经典中文字幕一区| 欧美亚洲一区二区在线观看| 亚洲mv在线观看| 又紧又大又爽精品一区二区| av不卡免费电影| 一区二区在线观看不卡| 欧美性猛交xxxxxx富婆| 视频一区欧美日韩| 精品盗摄一区二区三区| 国产成人av一区二区三区在线观看| 国产欧美日韩在线观看| 99国产精品国产精品毛片| 亚洲最大成人综合| 日韩午夜激情免费电影| 国产在线国偷精品产拍免费yy| 国产精品久久久久永久免费观看| 色综合久久综合中文综合网| 婷婷国产在线综合| 国产欧美一区二区三区在线老狼| 91福利社在线观看| 麻豆freexxxx性91精品| 国产精品毛片大码女人| 欧洲av一区二区嗯嗯嗯啊| 男女男精品视频网| 中文字幕在线播放不卡一区| 欧美日韩亚州综合| 国产成人综合在线观看| 亚洲国产色一区| 久久久一区二区三区捆绑**| 91久久国产综合久久| 捆绑变态av一区二区三区 | 国产精品短视频| 欧美一区二区三区在线视频| 国产a久久麻豆| 日本在线观看不卡视频| 亚洲天堂成人在线观看| 日韩一区二区视频| www.久久精品| 麻豆一区二区三| 一区二区欧美精品| 久久久精品免费免费| 欧美日韩aaaaa| 不卡的电视剧免费网站有什么| 日韩国产欧美三级| 亚洲欧美日韩国产另类专区| 日韩精品综合一本久道在线视频| 色吊一区二区三区| 成人中文字幕在线| 精品一区二区在线播放| 亚洲成人精品在线观看| 国产精品三级久久久久三级| 精品国产一区二区三区不卡| 欧美婷婷六月丁香综合色| 91在线观看地址| jvid福利写真一区二区三区| 国产曰批免费观看久久久| 亚洲va韩国va欧美va精品| 自拍av一区二区三区| 国产日韩一级二级三级| 欧美不卡视频一区| 777色狠狠一区二区三区| 在线观看成人小视频| 99久久夜色精品国产网站| 韩国在线一区二区| 麻豆视频一区二区| 热久久国产精品| 五月婷婷欧美视频| 五月天视频一区| 亚洲一区二区四区蜜桃| 一区二区成人在线视频| 亚洲靠逼com| 亚洲图片欧美激情| 亚洲少妇屁股交4| 一区视频在线播放| 亚洲欧美在线高清| 亚洲人成网站精品片在线观看| 国产精品美女久久久久高潮| 国产日韩精品久久久| 久久丝袜美腿综合| 久久久亚洲精品一区二区三区| 精品国产一区二区三区久久影院 | 欧美精品一区二区三区一线天视频| 欧美美女喷水视频| 91精品国产欧美一区二区18| 3atv在线一区二区三区| 日韩亚洲欧美综合| 久久人人爽人人爽| 国产精品午夜电影| 一区二区三区四区亚洲| 亚洲国产欧美一区二区三区丁香婷| 亚洲午夜电影网| 日韩av不卡在线观看| 六月婷婷色综合| 国产999精品久久久久久绿帽| 成人综合在线网站| 欧美色图激情小说| 日韩欧美中文一区| 国产精品色噜噜| 亚洲一区二区三区自拍| 久久精品二区亚洲w码| 成人综合在线视频| 欧美日韩大陆在线| 久久免费的精品国产v∧| 亚洲天堂2016| 蜜臀久久99精品久久久久久9| 国产麻豆9l精品三级站| 91免费观看国产| 欧美一区二区日韩| 欧美国产精品v| 天堂影院一区二区| 国产美女视频91| 在线中文字幕不卡| 欧美精品一区二区三区在线播放 | 日本精品免费观看高清观看| 欧美电视剧在线观看完整版| 国产精品区一区二区三| 午夜电影网一区| 波多野结衣中文字幕一区| 欧美久久久久久久久| 国产欧美一区二区精品秋霞影院 | 欧美猛男gaygay网站| 亚洲国产精品t66y| 日本成人中文字幕在线视频| 成人av综合一区| 日韩欧美黄色影院| 亚洲成av人片| 成人18精品视频| 精品久久久三级丝袜| 亚洲国产欧美在线人成| 成人免费黄色大片| 欧美刺激午夜性久久久久久久| 亚洲少妇最新在线视频| 国产成人aaa| 日韩视频一区在线观看| 亚洲一区二区在线观看视频| 成人午夜电影久久影院| 精品久久人人做人人爽| 午夜精品在线视频一区| 色综合天天性综合| 欧美国产乱子伦| 国产美女精品一区二区三区| 欧美区在线观看| 亚洲永久免费视频| 94色蜜桃网一区二区三区| 国产日韩在线不卡| 国产自产高清不卡| 久久亚洲一区二区三区明星换脸| 视频一区二区三区中文字幕| 91福利在线免费观看| 亚洲欧美福利一区二区| 成人一级黄色片| 国产欧美日韩视频在线观看| 久久av中文字幕片| 欧美电影免费观看高清完整版在线 | 91麻豆精品国产91久久久| 亚洲一区二区三区视频在线播放 | 狠狠色丁香婷综合久久| 欧美一区二区三区系列电影| 亚洲国产精品麻豆| 欧美三级视频在线| 亚洲狠狠爱一区二区三区| 在线视频一区二区三区| 亚洲欧美激情小说另类| 91久久精品网| 香蕉久久一区二区不卡无毒影院 | 成人97人人超碰人人99| 国产精品热久久久久夜色精品三区| 高清免费成人av| 中文字幕第一区| 北条麻妃一区二区三区| 日韩一区在线免费观看| av综合在线播放| 亚洲美女区一区| 欧美三级蜜桃2在线观看| 午夜久久久久久久久| 日韩亚洲欧美一区| 国内成+人亚洲+欧美+综合在线| 26uuu欧美| 成人黄色777网| 亚洲欧洲在线观看av| 色狠狠一区二区| 日韩成人免费在线| 久久综合九色欧美综合狠狠| 国产黄色成人av| 亚洲女人小视频在线观看| 97精品电影院| 视频在线观看一区| 久久无码av三级| 91麻豆国产香蕉久久精品| 午夜精品在线视频一区| 久久久亚洲午夜电影| 色系网站成人免费| 麻豆国产欧美一区二区三区|