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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? 可綜合的fifo.txt

?? verilog語(yǔ)言編寫可綜合FIFO。簡(jiǎn)單實(shí)用
?? TXT
字號(hào):
可綜合的Verilog FIFO存儲(chǔ)器

This example describes a synthesizable implementation of a FIFO. The FIFO depth and FIFO width in bits can be modified by simply changing the value of two parameters, `FWIDTH and `FDEPTH. For this example, the FIFO depth is 4 and the FIFO width is 32 bits. The input/output ports of the FIFO are shown in Figure F-1.
Figure F-1. FIFO Input/Output Ports
 
Input ports
All ports with a suffix "N" are low-asserted.
Clk— Clock signal
RstN— Reset signal
Data_In— 32-bit data into the FIFO
FInN— Write into FIFO signal
FClrN— Clear signal to FIFO
FOutN— Read from FIFO signal

Output ports
F_Data— 32-bit output data from FIFO
F_FullN— Signal indicating that FIFO is full
F_EmptyN— Signal indicating that FIFO is empty
F_LastN— Signal indicating that FIFO has space for one data value
F_SLastN— Signal indicating that FIFO has space for two data values
F_FirstN— Signal indicating that there is only one data value in FIFO

The Verilog HDL code for the FIFO implementation is shown in Example F-1.
Example F-1 Synthesizable FIFO Model

////////////////////////////////////////////////////////////////////
// FileName:  "Fifo.v"
// Author  :  Venkata Ramana Kalapatapu
// Company :  Sand Microelectronics Inc.
//           (now a part of Synopsys, Inc.),
// Profile :  Sand develops Simulation Models, Synthesizable Cores and
//           Performance Analysis Tools for Processors, buses and
//           memory products.  Sand's products include models for
//           industry-standard components and custom-developed models
//           for specific simulation environments.
//
////////////////////////////////////////////////////////////////////


`define  FWIDTH     32           // Width of the FIFO.
`define  FDEPTH     4            // Depth of the FIFO.
`define  FCWIDTH    2            // Counter Width of the FIFO 2 to power
                                 // FCWIDTH = FDEPTH.
module FIFO(  Clk,
              RstN,
              Data_In,
              FClrN,
              FInN,
              FOutN,

              F_Data,
              F_FullN,
              F_LastN,
              F_SLastN,
              F_FirstN,
              F_EmptyN
           );

 

input                       Clk;      // CLK signal.
input                       RstN;     // Low Asserted Reset signal.
input [(`FWIDTH-1):0]       Data_In;  // Data into FIFO.
input                       FInN;     // Write into FIFO Signal.
input                       FClrN;    // Clear signal to FIFO.
input                       FOutN;    // Read from FIFO signal.

output [(`FWIDTH-1):0]      F_Data;   // FIFO data out.
output                      F_FullN;  // FIFO full indicating signal.
output                      F_EmptyN; // FIFO empty indicating signal.
output                      F_LastN;  // FIFO Last but one signal.
output                      F_SLastN; // FIFO SLast but one signal.
output                      F_FirstN; // Signal indicating only one
                                      // word in FIFO.


reg                F_FullN;
reg                F_EmptyN;
reg                F_LastN;
reg                F_SLastN;
reg                F_FirstN;

reg    [`FCWIDTH:0]      fcounter; //counter indicates num of data in FIFO
reg    [(`FCWIDTH-1):0]   rd_ptr;      // Current read pointer.
reg    [(`FCWIDTH-1):0]   wr_ptr;      // Current write pointer.
wire   [(`FWIDTH-1):0]    FIFODataOut; // Data out from FIFO MemBlk
wire   [(`FWIDTH-1):0]    FIFODataIn;  // Data into FIFO MemBlk

wire   ReadN  = FOutN;
wire   WriteN = FInN;

assign F_Data     = FIFODataOut;
assign FIFODataIn = Data_In;


    FIFO_MEM_BLK memblk(.clk(Clk),
                        .writeN(WriteN),
                        .rd_addr(rd_ptr),
                        .wr_addr(wr_ptr),
                        .data_in(FIFODataIn),
                        .data_out(FIFODataOut)
                       );

    // Control circuitry for FIFO. If reset or clr signal is asserted,
    // all the counters are set to 0. If write only the write counter
    // is incremented else if read only read counter is incremented
    // else if both, read and write counters are incremented.
    // fcounter indicates the num of items in the FIFO. Write only
    // increments the fcounter, read only decrements the counter, and
    // read && write doesn't change the counter value.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN) begin
           fcounter    <= 0;
           rd_ptr      <= 0;
           wr_ptr      <= 0;
       end
       else begin

           if(!FClrN ) begin
               fcounter    <= 0;
               rd_ptr      <= 0;
               wr_ptr      <= 0;
           end
           else begin

               if(!WriteN && F_FullN)
                   wr_ptr <= wr_ptr + 1;

               if(!ReadN && F_EmptyN)
                   rd_ptr <= rd_ptr + 1;

               if(!WriteN && ReadN && F_FullN)
                   fcounter <= fcounter + 1;

               else if(WriteN && !ReadN && F_EmptyN)
                   fcounter <= fcounter - 1;
          end
       end
    end

    // All the FIFO status signals depends on the value of fcounter.
    // If the fcounter is equal to fdepth, indicates FIFO is full.
    // If the fcounter is equal to zero, indicates the FIFO is empty.

    // F_EmptyN signal indicates FIFO Empty Status. By default it is
    // asserted, indicating the FIFO is empty. After the First Data is
    // put into the FIFO the signal is deasserted.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN)
          F_EmptyN <= 1'b0;

       else begin
          if(FClrN==1'b1) begin

             if(F_EmptyN==1'b0 && WriteN==1'b0)

                 F_EmptyN <= 1'b1;

             else if(F_FirstN==1'b0 && ReadN==1'b0 && WriteN==1'b1)

                 F_EmptyN <= 1'b0;
          end
          else
             F_EmptyN <= 1'b0;
       end
    end

    // F_FirstN signal indicates that there is only one datum sitting
    // in the FIFO. When the FIFO is empty and a write to FIFO occurs,
    // this signal gets asserted.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN)

          F_FirstN <= 1'b1;

       else begin
          if(FClrN==1'b1) begin

             if((F_EmptyN==1'b0 && WriteN==1'b0) ||
                (fcounter==2 && ReadN==1'b0 && WriteN==1'b1))

                 F_FirstN <= 1'b0;

             else if (F_FirstN==1'b0 && (WriteN ^ ReadN))
                 F_FirstN <= 1'b1;
          end
          else begin

             F_FirstN <= 1'b1;
          end
       end
    end


    // F_SLastN indicates that there is space for only two data words
    //in the FIFO.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN)

          F_SLastN <= 1'b1;

       else begin

          if(FClrN==1'b1) begin

             if( (F_LastN==1'b0 && ReadN==1'b0 && WriteN==1'b1) ||
                 (fcounter == (`FDEPTH-3) && WriteN==1'b0 && ReadN==1'b1))

                 F_SLastN <= 1'b0;


             else if(F_SLastN==1'b0 && (ReadN ^ WriteN) )
                 F_SLastN <= 1'b1;

          end
          else
             F_SLastN <= 1'b1;

       end
    end

    // F_LastN indicates that there is one space for only one data
    // word in the FIFO.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN)

          F_LastN <= 1'b1;

       else begin
          if(FClrN==1'b1) begin

             if ((F_FullN==1'b0 && ReadN==1'b0)  ||
                 (fcounter == (`FDEPTH-2) && WriteN==1'b0 && ReadN==1'b1))

                 F_LastN <= 1'b0;

             else if(F_LastN==1'b0 && (ReadN ^ WriteN) )
                 F_LastN <= 1'b1;
          end
          else
             F_LastN <= 1'b1;
       end
    end


    // F_FullN indicates that the FIFO is full.
    always @(posedge Clk or negedge RstN)
    begin

       if(!RstN)

           F_FullN <= 1'b1;

       else begin
           if(FClrN==1'b1)  begin

               if (F_LastN==1'b0 && WriteN==1'b0 && ReadN==1'b1)

                    F_FullN <= 1'b0;

               else if(F_FullN==1'b0 && ReadN==1'b0)

                    F_FullN <= 1'b1;
           end
           else
               F_FullN <= 1'b1;

       end
    end

endmodule

///////////////////////////////////////////////////////////////////
//
//
//   Configurable memory block for fifo. The width of the mem
//   block is configured via FWIDTH. All the data into fifo is done
//   synchronous to block.
//
//   Author : Venkata Ramana Kalapatapu
//
///////////////////////////////////////////////////////////////////

module FIFO_MEM_BLK( clk,
                     writeN,
                     wr_addr,
                     rd_addr,
                     data_in,
                     data_out
                   );


input                    clk;       // input clk.
input  writeN;  // Write Signal to put data into fifo.
input  [(`FCWIDTH-1):0]  wr_addr;   // Write Address.
input  [(`FCWIDTH-1):0]  rd_addr;   // Read Address.
input  [(`FWIDTH-1):0]   data_in;   // DataIn in to Memory Block

output [(`FWIDTH-1):0]   data_out;  // Data Out from the Memory
                                    // Block(FIFO)

wire   [(`FWIDTH-1):0] data_out;

reg    [(`FWIDTH-1):0] FIFO[0:(`FDEPTH-1)];

assign data_out  = FIFO[rd_addr];

always @(posedge clk)
begin

   if(writeN==1'b0)
      FIFO[wr_addr] <= data_in;
end

endmodule



?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本vs亚洲vs韩国一区三区二区 | 久久精品免费在线观看| 国产成人精品综合在线观看| 亚洲综合一区在线| 欧美激情艳妇裸体舞| 在线播放一区二区三区| av在线不卡观看免费观看| 九九精品一区二区| 五月婷婷激情综合| 一区二区三区美女| 亚洲国产精品成人久久综合一区| 91精品国产综合久久久蜜臀粉嫩| 99re热视频这里只精品| 国产黄人亚洲片| 九九九久久久精品| 青青青伊人色综合久久| 亚洲香肠在线观看| 亚洲欧美成人一区二区三区| 久久综合精品国产一区二区三区| 欧美精品123区| 欧美在线观看视频一区二区| 99久久久久久| 成人性生交大片免费看中文| 韩国精品免费视频| 蜜臂av日日欢夜夜爽一区| 亚洲成av人片在线观看| 亚洲精品视频免费看| 中文字幕亚洲成人| 中文字幕在线观看不卡| 中文字幕一区三区| 国产精品亲子伦对白| 欧美激情一二三区| 国产女主播在线一区二区| 久久嫩草精品久久久精品| 久久综合九色综合97婷婷女人 | 国产成人a级片| 国产专区综合网| 国产精品一二二区| 懂色av中文一区二区三区| 极品瑜伽女神91| 激情欧美日韩一区二区| 国产真实乱偷精品视频免| 国产精品资源在线| 成人黄色在线看| 91影院在线观看| 日本精品一区二区三区高清| 欧美在线啊v一区| 欧美欧美欧美欧美| 日韩一区二区精品在线观看| 精品国产免费一区二区三区香蕉| 精品国产一区二区国模嫣然| 欧美精品一区二区三区蜜桃视频| 久久综合网色—综合色88| 日本一区二区高清| 亚洲人成网站影音先锋播放| 亚洲精品中文字幕乱码三区 | 秋霞午夜av一区二区三区| 久久精品国产在热久久| 久草热8精品视频在线观看| 国产夫妻精品视频| 色诱亚洲精品久久久久久| 欧美在线综合视频| 日韩视频中午一区| 国产欧美久久久精品影院| 亚洲欧洲日产国产综合网| 亚洲国产毛片aaaaa无费看 | 伊人色综合久久天天人手人婷| 亚洲一区二区在线免费观看视频| 日韩不卡一区二区三区| 国产一区二区福利| 97成人超碰视| 欧美电影一区二区| 久久精品网站免费观看| 亚洲日本成人在线观看| 日韩国产在线观看一区| 国产乱码一区二区三区| 一本大道久久精品懂色aⅴ | 亚洲日本成人在线观看| 视频一区视频二区中文字幕| 国产成人精品www牛牛影视| 日本高清成人免费播放| 精品国产a毛片| 亚洲美女偷拍久久| 国内成人自拍视频| 欧美体内she精高潮| 久久综合999| 亚洲图片有声小说| 国产精品一二二区| 在线电影一区二区三区| 国产精品亲子乱子伦xxxx裸| 日本成人在线一区| 91麻豆国产精品久久| 精品国产自在久精品国产| 亚洲一区视频在线观看视频| 国产在线视频不卡二| 欧美日韩一区二区三区四区| 中文字幕久久午夜不卡| 免费成人在线观看| 精品国产精品网麻豆系列 | 国产精品久久久久久久久免费桃花 | 欧美人狂配大交3d怪物一区| 国产欧美日韩综合精品一区二区| 亚洲国产精品欧美一二99| 成人福利电影精品一区二区在线观看| 欧美日韩国产一区二区三区地区| 中文字幕电影一区| 日本aⅴ精品一区二区三区| 色综合天天做天天爱| 久久久久久久久蜜桃| 免费av网站大全久久| 日本韩国欧美一区| 亚洲三级理论片| 丁香一区二区三区| 久久亚洲精品国产精品紫薇| 日韩福利视频导航| 欧美三级视频在线观看| 亚洲欧美日韩在线播放| 成人福利视频在线看| 国产日韩影视精品| 国产精品99久久久久久有的能看| 日韩欧美亚洲国产另类| 亚洲成人免费在线观看| 欧美艳星brazzers| 亚洲日本va在线观看| 成人黄色电影在线 | 欧洲一区二区三区在线| 亚洲欧美日韩国产成人精品影院| 春色校园综合激情亚洲| 国产欧美视频一区二区| 韩国v欧美v日本v亚洲v| 91精品国产综合久久福利软件| 亚洲国产精品一区二区www| 色哦色哦哦色天天综合| 亚洲视频在线一区观看| 99久久er热在这里只有精品66| 国产精品污网站| 高清在线成人网| 国产精品久久久久久久久图文区 | 久久久综合视频| 国产精品一级二级三级| 日本一区二区成人在线| 成人av先锋影音| 成人免费在线播放视频| 色综合久久中文综合久久97 | 国产美女av一区二区三区| 欧美精品一区二区三区视频| 国产乱人伦精品一区二区在线观看| 久久精品亚洲国产奇米99| 国产成人综合在线播放| 国产精品久久久久久久浪潮网站| 99久久久久久| 丝袜亚洲另类丝袜在线| 欧美成人精品二区三区99精品| 国产一区视频在线看| 亚洲国产激情av| 色女孩综合影院| 午夜不卡av免费| 久久蜜桃香蕉精品一区二区三区| 成人激情视频网站| 亚洲一卡二卡三卡四卡五卡| 欧美一级欧美一级在线播放| 国产一区二区三区精品视频| 国产精品嫩草99a| 欧美性一级生活| 久久成人免费电影| 综合久久一区二区三区| 欧美三级视频在线观看| 久久精品国产一区二区| 国产精品高清亚洲| 欧美日韩国产精品成人| 国产一区二区三区四区五区入口| 中文字幕一区二区三| 91麻豆精品国产91久久久更新时间| 精品一区中文字幕| 亚洲日本在线a| 精品久久久久久久一区二区蜜臀| 成人app在线| 日本va欧美va精品发布| 国产精品看片你懂得| 91精品国产色综合久久ai换脸| 成人综合婷婷国产精品久久蜜臀| 亚洲国产精品一区二区尤物区| 精品久久久久久久久久久院品网| 91日韩精品一区| 久久精品国产精品亚洲精品| 亚洲欧美一区二区三区久本道91 | 精品中文字幕一区二区| 亚洲少妇30p| 欧美变态tickle挠乳网站| 在线一区二区三区四区| 极品少妇一区二区| 午夜伊人狠狠久久| 国产精品美女久久久久久久网站| 欧美一级xxx| 在线精品视频小说1| 国产精品一线二线三线| 五月天一区二区| 一区二区三区日韩在线观看| 国产欧美日韩久久| 日韩免费性生活视频播放|