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

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

?? avalon_rd_dma_fifo.v

?? Altera的基于NIOS II的LCD控制器源代碼
?? V
字號:
// ================================================================================
// (c) 2004 Altera Corporation. All rights reserved.
// Altera products are protected under numerous U.S. and foreign patents, maskwork
// rights, copyrights and other intellectual property laws.
// 
// This reference design file, and your use thereof, is subject to and governed
// by the terms and conditions of the applicable Altera Reference Design License
// Agreement (either as signed by you, agreed by you upon download or as a
// "click-through" agreement upon installation andor found at www.altera.com).
// By using this reference design file, you indicate your acceptance of such terms
// and conditions between you and Altera Corporation.  In the event that you do
// not agree with such terms and conditions, you may not use the reference design
// file and please promptly destroy any copies you have made.
// 
// This reference design file is being provided on an "as-is" basis and as an
// accommodation and therefore all warranties, representations or guarantees of
// any kind (whether express, implied or statutory) including, without limitation,
// warranties of merchantability, non-infringement, or fitness for a particular
// purpose, are specifically disclaimed.  By making this reference design file
// available, Altera expressly does not recommend, suggest or require that this
// reference design file be used in combination with any other product not
// provided by Altera.
// ================================================================================
// ================================================================================
// This module uses implements a FIFO plus Avalon DMA write master.
// ================================================================================
`timescale 1ns/1ns

module avalon_rd_dma_fifo
  (
   clk_f,
   clk_av,
   reset_n,

   // FIFO read interface
   rd,
   rdata,
   empty,

   // Avalon DMA master
   m_address,
   m_read_n,
   m_readdata,
   m_waitrequest,
   m_readdatavalid,

   // Register interface
   dma_start_addr,
   dma_length,
   dma_layer_on
   );


  // defaults
  parameter DEVICE = "Cyclone";  
  parameter WR_PTR_WIDTH = 7;
  parameter RD_PTR_WIDTH = 8;
  parameter WR_DATA_WIDTH = 32;
  parameter RD_DATA_WIDTH = 16;
  parameter WR_DEPTH = 128;
  parameter RD_DEPTH = 256;
  parameter WRITE_ALMOST_BIT = 6;
  parameter DIFF_RD_WR = 1;


  input clk_f;
  input clk_av;
  input reset_n;

   // FIFO write interface
  input rd;
  output [RD_DATA_WIDTH-1:0] rdata;
  output 	empty;

   // Register Interface
  input [31:0] dma_start_addr;
  input [31:0] dma_length;
  input dma_layer_on;

   // Avalon DMA master
  output [31:0]	m_address;
  output 	m_read_n;
  input [31:0]  m_readdata;
  input 	m_waitrequest;
  input 	m_readdatavalid;
  
  wire almost_full;
  wire cycle_end;

  reg [31:0] 	count;
  reg [4:0] burst;
  reg [31:0] m_address;

  reg 		master_state;
  parameter 	idle	= 1'b0,
		read	= 1'b1;
  
  //---------------------------------------------------------------------------
  // DMA Master
  //
  // When enabled, reads bursts of 32 from Avalon to FIFO
  //---------------------------------------------------------------------------
  always @(posedge clk_av or negedge reset_n)
    if (~reset_n)
      master_state <= idle;
    else
      case (master_state)
	idle:
	  if (dma_layer_on & ~almost_full)
	    master_state <= read;
	  else
	    master_state <= idle;

	read:
	  if (cycle_end & (burst == 5'h0))
	    master_state <= idle;
	  else
	    master_state <= read;

	default: master_state <= idle;
      endcase

  wire m_read_n = ~master_state;

  // detect end of current avalon cycle
  assign cycle_end = ~m_read_n & ~m_waitrequest;

/*
 Support for frame length in linear frame buffer
 not being a multiple of SDRAM burst size, in this case 32
 So the last burst read from the frame buffer is not 32, added.

 - The last burst size should be set by the bottom 5 bits of "frame length"
   when the upper bits are 'b0.


 This assumes that the frame buffer is aligned to 32 word boundaries
 to ensure that efficient SDRAM bursts are performed that do not
 go over the page boundaries.
 Frame buffer is arranged with first pixel at low address and subsequent
 pixels at successively higher addresses.

 Future implementation of windowing will also require the start burst
 to be able to be less than 32words, to enable all subsequent bursts
 to be aligned, again for efficient SDRAM accesses.
*/
  always @(posedge clk_av or negedge reset_n)
    if (~reset_n)
      burst <= 5'b0;
    else if ((master_state == idle) & dma_layer_on & ~almost_full & ((|count[31:5]) == 0))
      burst <= 5'h1f;
    else if ((master_state == idle) & dma_layer_on & ~almost_full)
      burst <= count[4:0];
    else if (cycle_end)
      burst <= burst - (|burst); //subtract 1 from burst length counter

  always @(posedge clk_av or negedge reset_n)
    if (~reset_n)
      m_address <= 32'b0;
    else if (~dma_layer_on)
      //load
      m_address <= dma_start_addr;
    else if (cycle_end & (count == 32'b0))
      // re-load
      m_address <= dma_start_addr;
    else if (cycle_end)
      // increment
      m_address <= m_address + 32'h4;
  
  always @(posedge clk_av or negedge reset_n)
    if (~reset_n)
      count <= 32'b0;
    else if (~dma_layer_on)
      // load
      count <= ((dma_length >> DIFF_RD_WR)-1); //left shift count by the diference in the read and write pointer widths
    else if (cycle_end & (count == 32'b0))
      // re-load
      count <= ((dma_length >> DIFF_RD_WR)-1); //left shift count by the diference in the read and write pointer widths
    else if (cycle_end)
      // decrement
      count <= count - 1;

  //---------------------------------------------------------------------------
  // Instantiate the FIFO
  //---------------------------------------------------------------------------

/*
 FIFO needs modifying for the different output widths
 Layer0 & 1 = 16-bit
 Layer2-4 = 8-bit

 rd_en signal should be conmnected to the act_lX signal
 Check if act_lX signal needs to be generated early to take
 into account the pipeline delay within the FIFO?

 IF act_lX/layer_X_on is de-asserted what value should be output from the FIFO
 since the layer has been turned off. Possible options:
 Force pixel_alpha = 0 or constant_alpha = 0
 
*/

  lcd_dual_port_fifo #(DEVICE, WR_PTR_WIDTH, RD_PTR_WIDTH, WR_DATA_WIDTH, RD_DATA_WIDTH, WR_DEPTH, RD_DEPTH, WRITE_ALMOST_BIT, DIFF_RD_WR) u1_fifo
    (
     .rst_n		(reset_n),
     
     // Write side
     .clk_wr		(clk_av),
     .wr		(m_readdatavalid),
     .wdata		(m_readdata),
     
     .wr_almost_full	(almost_full),
     .wr_full		(),
     
     .reset_fifo_rd	(~dma_layer_on),
     
     // Read side
     .clk_rd		(clk_f),
     .rd_en		(rd),
     
     .rdata		(rdata),
     .rd_empty		(empty),
     .rd_available	(),
     
     .full_error	(),
     .empty_error	()
     );            



endmodule	// avalon_wr_dma_fifo

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频图片小说| 亚洲综合色噜噜狠狠| 5566中文字幕一区二区电影| 欧洲亚洲国产日韩| 91福利社在线观看| 欧美色欧美亚洲另类二区| 欧美日韩午夜影院| 欧美一区二区在线播放| 精品日韩成人av| 久久亚洲综合av| 亚洲国产精品成人综合色在线婷婷| 国产日韩av一区二区| 1000部国产精品成人观看| 亚洲综合色噜噜狠狠| 丝袜美腿亚洲色图| 国产在线国偷精品免费看| 国产精品一卡二卡| 91天堂素人约啪| 在线观看日产精品| 欧美成人精品3d动漫h| 国产欧美一区二区精品忘忧草 | 亚洲三级在线免费观看| 亚洲丝袜精品丝袜在线| 亚洲一本大道在线| 国模套图日韩精品一区二区| a亚洲天堂av| 欧美老年两性高潮| 久久久不卡影院| 亚洲一卡二卡三卡四卡无卡久久| 日本欧美大码aⅴ在线播放| 国产原创一区二区| 91浏览器在线视频| 日韩视频一区二区三区在线播放| 欧美国产国产综合| 日韩电影免费在线看| 国产丶欧美丶日本不卡视频| 欧美色爱综合网| 国产人成亚洲第一网站在线播放 | 欧美性极品少妇| 26uuu欧美| 亚洲乱码精品一二三四区日韩在线| 亚洲成精国产精品女| 国产高清亚洲一区| 欧美理论片在线| 中文字幕中文字幕一区二区| 午夜精品久久久久久久久| 国产成人av电影免费在线观看| 欧美视频一区二区三区在线观看| 亚洲午夜激情网站| 99国产一区二区三精品乱码| 日韩欧美国产精品| 丝袜美腿高跟呻吟高潮一区| 91在线视频免费观看| 久久精品在这里| 日韩精品亚洲一区| 欧美四级电影网| 亚洲欧美色综合| 成人sese在线| 国产精品久久久久久久久动漫 | 久久精品日产第一区二区三区高清版| 伊人开心综合网| 成人sese在线| 国产精品国产三级国产普通话99 | 99精品在线免费| 国产精品久久久久精k8| 国产精品一区二区久久不卡 | 成人免费观看男女羞羞视频| 久久久久亚洲蜜桃| 国产乱色国产精品免费视频| 精品国产成人在线影院| 久久精品国产秦先生| 欧美大片日本大片免费观看| 日韩不卡一二三区| 7777女厕盗摄久久久| 日日噜噜夜夜狠狠视频欧美人| 欧美精品亚洲一区二区在线播放| 亚洲午夜电影在线观看| 欧美日韩免费一区二区三区视频| 亚洲午夜三级在线| 欧美日韩一级视频| 日韩精品一级中文字幕精品视频免费观看| 91福利在线导航| 视频在线在亚洲| 337p日本欧洲亚洲大胆精品| 国产九九视频一区二区三区| 久久蜜桃av一区精品变态类天堂| 国产成人精品免费| 国产精品人妖ts系列视频| av色综合久久天堂av综合| 亚洲欧洲美洲综合色网| 91久久精品国产91性色tv| 亚洲国产综合视频在线观看| 欧美一区二区在线视频| 国产精品夜夜爽| 亚洲人午夜精品天堂一二香蕉| 91片黄在线观看| 免费亚洲电影在线| 久久久久久久网| 色综合天天综合狠狠| 天堂资源在线中文精品| 久久久亚洲欧洲日产国码αv| 99精品欧美一区| 日韩精品亚洲专区| 国产色产综合色产在线视频 | 亚洲成人自拍偷拍| 久久嫩草精品久久久久| 色综合一区二区| 免费欧美高清视频| 中文字幕在线观看一区二区| 欧美视频精品在线观看| 国产专区综合网| 亚洲国产另类av| 亚洲国产经典视频| 91精品国产高清一区二区三区蜜臀| 国产尤物一区二区在线 | 欧美日韩aaa| 风间由美中文字幕在线看视频国产欧美| 一区二区中文字幕在线| 日韩欧美123| 欧洲国产伦久久久久久久| 狠狠色丁香久久婷婷综| 亚洲第一综合色| 国产精品电影院| 精品精品国产高清一毛片一天堂| 色噜噜狠狠一区二区三区果冻| 国产一区二区不卡在线| 视频一区二区三区中文字幕| 国产精品久久午夜| 精品少妇一区二区三区| 欧美色区777第一页| 99riav久久精品riav| 国产成人综合视频| 裸体健美xxxx欧美裸体表演| 亚洲成人综合在线| 一区二区三区在线观看视频| 国产精品网站在线| 国产日韩视频一区二区三区| 欧美一级欧美三级在线观看| 欧美最猛黑人xxxxx猛交| 99久久精品免费看| 国产mv日韩mv欧美| 粉嫩绯色av一区二区在线观看| 美女视频一区二区| 麻豆精品蜜桃视频网站| 青青草精品视频| 麻豆精品在线播放| 久久99久国产精品黄毛片色诱| 日本不卡一区二区| 日韩成人一级片| 三级一区在线视频先锋| 午夜精品久久久久久久99水蜜桃| 亚洲午夜激情网页| 亚洲成av人片在线观看无码| 亚洲国产精品久久人人爱蜜臀| 亚洲精品视频免费观看| 一区二区三区毛片| 亚洲高清视频的网址| 亚洲国产中文字幕在线视频综合| 亚洲成人av一区二区| 丝袜美腿亚洲综合| 紧缚奴在线一区二区三区| 黄色日韩网站视频| 岛国一区二区三区| 色婷婷久久久亚洲一区二区三区 | 国产精品久久久一本精品| 中文字幕第一区| 亚洲视频精选在线| 日韩av不卡一区二区| 久久疯狂做爰流白浆xx| 成人激情开心网| 在线中文字幕不卡| 日韩欧美国产小视频| 中文一区在线播放| 亚洲国产中文字幕| 激情综合网天天干| 成人国产亚洲欧美成人综合网 | 成人一二三区视频| 91在线免费视频观看| 欧美日韩一二三| 欧美xxx久久| 亚洲欧美国产三级| 日韩和的一区二区| 成人天堂资源www在线| 欧美在线视频你懂得| 欧美精品一区二区三区一线天视频 | 成人h版在线观看| 欧美丝袜丝nylons| 久久蜜桃一区二区| 亚洲国产欧美日韩另类综合 | 欧美一区二区人人喊爽| 中文字幕国产一区| 日韩激情av在线| 国产老妇另类xxxxx| 欧美日韩综合不卡| 国产精品网曝门| 六月丁香综合在线视频| 91久久精品国产91性色tv| 久久综合色婷婷| 午夜精品影院在线观看| 成人午夜在线视频|