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

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

 产品
   Quartus II
      SOPC Builder
      MAX+PLUS II
      ModelSim-Altera
  
 资源中心
      简介
      安装&许可
      脚本
       电路板设计& I/O
      网表阅读器 & 综合
      编译增强特性
      优化
      功耗管理
   TimeQuest时序分析器
      标准时序分析器
      仿真 & 确认
      片内调试
      HardCopy设计
  
 软件资源
      操作系统支持
      驱动安装
  
 下载与许可
      下载
   许可
  
 Quartus II EDA 支持
      Quartus II 接口
   综合工具
          Design Compiler
          DC FPGA
          FPGA Compiler II
          LeonardoSpectrum
          Precision RTL Synthesis
          Synplify
   仿真工具
   验证工具
   时序分析工具
   再综合工具
   电路板级工具
  
 老版软件EDA支持
      供应商类
      工具类
      功能类
  

Example of a VHDL Design File with LPM Function Instantiation

For any parameterized function, you must declare all parameters used in the function, their types, and their values. The following example shows a VHDL design file that instantiates the lpm_ram_dq function. Attribute Declarations are used to declare the syn_black_box attribute and the name and type of each parameter. The syn_black_box attribute has the boolean type; refer to Quartus II Help for information on whether a parameter is of integer or string type. Attribute Specifications are then used assign values to each parameter.

The following example shows a direct instantiation of an library of parameterized modules (LPM) function. To use the MegaWizard Plug-In Manager to create the function, and then instantiate it in a design, refer to the Creating a Design for Use with the Synplify Software topic.

 

entity myram is port (clock, we: in bit; data : in bit_vector (3 downto 0);
address: in bit_vector (1 downto 0);
q: out bit_vector (3 downto 0));
end myram;

architecture arch1 of myram is
-- Declare the component myram_4x4 port (data: in bit_vector (3 downto 0);
address: in bit_vector (1 downto 0);
inclock, outclock, we: in bit;
q: out bit_vector (3 downto 0) );
end component;

-- Declare the syn_black_box and parameters and their types attribute syn_black_box: boolean;
attribute LPM_WIDTH: integer;
attribute LPM_WIDTHAD: integer;
attribute LPM_TYPE: string;

-- Assign values to each attribute attribute syn_black_box of myram_4x4: component is true;
attribute LPM_WIDTH of myram_4x4: component is 4;
attribute LPM_WIDTHAD of myram_4x4: component is 2;

-- Specify the name of the LPM function as the value of the -- LPM_TYPE attribute LPM_TYPE of myram_4x4: component is "LPM_RAM_DQ";
begin
-- Instantiate the LPM component u1: myram_4x4 port map(data, address, clock, clock, we, q);
end arch1;

 

 

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