Altera Home Page
文档资料 许可
在线购买 下载

  主页   |   产品   |   支持   |   最终市场   |   技术中心   |   教育与活动   |   公司介绍   |   在线购买  
  mySupport   |   器件   |   软件   |   IP   |   设计范例   |   参考设计  

 产品
      MAX/MAX II
      Stratix/Stratix GX
      Nios II
  
 功能
      算法
      存储器
      总线及I/O
      逻辑
      接口与外设
      DSP
      通信
      PLL & Clocking
  
 设计输入方法
      Quartus II软件工程
      Tcl
      VHDL
      Verilog HDL
      C Code 范例
      DSP Builder
      TimeQuest
   片内调试
  
 仿真工具
      Mentor Graphics ModelSim
      Cadence NCsim
      Synopsys VCS
  
 旧范例
      图形编辑器
      AHDL
  

AHDL: Cycle-Shared FIFO (csfifo)

This example implements a cycle-shared FIFO with 256 8-bit words. The size of the FIFO is defined with the parameters LPM_WIDTH and LPM_WIDTHAD. This example uses an Include Statement (shown in blue text) to import the contents of the Include File containing the Function Prototype for the csfifo function. An Instance Declaration (shown in red text) implements an instance of the function.

If you are using this function in a FLEX 10K design, MAX+PLUS II will implement the FIFO in embedded array blocks (EABs).

For more information on using this example in your project, go to:

fifo.tdf


INCLUDE "csfifo.inc";
 
SUBDESIGN fifo
(
   dataf[7..0]       : INPUT;
   qf[7..0]          : OUTPUT;
      
   wreq              : INPUT;
   rreq              : INPUT;
     
   clk               : INPUT;
   clk2              : INPUT;
   clr               : INPUT;
     
   threshlevel[7..0] : INPUT;
   empty             : OUTPUT;
   full              : OUTPUT;
   threshold         : OUTPUT;
)
     
VARIABLE

   vxififo           : csfifo  
      WITH (LPM_WIDTH = 8, LPM_NUMWORDS = 256);
     
BEGIN
   -- Input definition for VXI FIFO
     
   vxififo.clock = clk;
   vxififo.clockx2 = clk2;
   vxififo.clr = clr;
     
   vxififo.data[7..0] = dataf[7..0];
     
   vxififo.threshlevel[7..0] = threshlevel[7..0];
   vxififo.wreq = wreq;
   vxififo.rreq = rreq;
   
   qf[7..0] = vxififo.q[7..0];
   
   threshold = vxififo.threshold;
   empty = vxififo.empty;
   full = vxififo.full;
      
END;

Feedback

Did this information help you?

If not, please log onto mySupport to file a technical request or enhancement.


Altera does not warrant that this solution will work for the customer's intended purpose and disclaims all liability for use of or reliance on the solution.

  请填写反馈意见
  注册索取最新邮件通知