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 Creating a VHDL Custom Variation of the altclklock Function

The following example procedure illustrates how to use the MegaWizard Plug-In Manager to create a custom megafunction variation of the altclklock function. You can follow similar steps to create custom megafunction variations of other megafunctions. To create a custom megafunction variation of the altclklock function:

  1. On the Tools menu, click MegaWizard Plug-In Manager.

  2. In the MegaWizard Plug-In Manager, in response to Which action do you want to perform?, select Create a new custom megafunction variation and click Next.

  3. In response to Which type of output file do you want to create?, select VHDL.

  4. In the Available Megafunctions list, expand the I/O folder and select ALTCLKLOCK.

  5. In response to What name do you want for the file?, type the appropriate file name or browse click to select the appropriate location. For this example, the path and file name should be C:\synplify_e_features\vhdl\pll\my_pll.vhd.

  6. Click Next.

  7. To select the device family which your function targets and to specify related options:

    1. For this example, select APEX 20KE in response to Use which device family?

    2. Under Which optional ports are needed?, turn on locked and inclocken.

    3. Under How should the PLL output(s) be generated?, turn on Use the feedback path inside the PLL and specify a value of 0 degrees for with a programmed phase shift of.

  1. Click Next.

Note: The remaining options are family dependent. The MegaWizard Plug-In Manager guides you to choose valid options for the selected device family.

  1. To specify the input clock frequency and the clock output multiplication and division factors:

    1. In response to What is the input clock frequency?, select 40.0 MHz.

    2. In response to Which output clocks would you like to use?, select Clock0 and Clock1, using the clock multiplication and division factors in the table below.

Options:

Clock0

Clock1

Clock multiplication factor

4

2

Clock division factor

1

1

  1. Click Next.

  2. To specify the number of cycles to achieve lock and to lose lock:

    1. In response to How many synchronized clock cycles should pass before PLL is considered locked?, select 2.5 clock cycles.

    2. In response to How many unsynchronized clock cycles should pass before PLL is considered to have lost its lock?, select 2.5 clock cycles.

  1. Click Next.

  2. The Summary page informs you of the files that the MegaWizard Plug-In Manager creates. In this example, it generates the following files:

  1. C:\synplify_e_features\verilog\pll\my_pll.vhd
    C:\synplify_e_features\verilog\pll\my_pll.inc
    C:\synplify_e_features\verilog\pll\my_pll.cmp
    C:\synplify_e_features\verilog\pll\my_pll.bsf
    C:\synplify_e_features\verilog\pll\my_pll_inst.vhd

    The following sample shows the my_pll.vhd file, which can be generated by the MegaWizard Plug-In Manager. The my_pll.vhd file contains an instantiation and parameters of the altclklock function.

  2. -- megafunction wizard: %ALTCLKLOCK%
    -- GENERATION: STANDARD
    -- VERSION: WM1.0
    -- MODULE: altclklock
    -- ============================================================
    -- File Name: my_pll.vhd
    -- Megafunction Name(s):
    --                      altclklock
    -- ============================================================
    -- ************************************************************
    -- THIS IS A WIZARD GENERATED FILE. DO NOT EDIT THIS FILE!
    -- ************************************************************
    LIBRARY ieee;
    USE ieee.std_logic_1164.all;
    LIBRARY altera_mf;
    USE altera_mf.altera_mf_components.all;
    ENTITY my_pll IS
    PORT
    (
    inclock         : IN STD_LOGIC ;
    inclocken               : IN STD_LOGIC ;
    locked          : OUT STD_LOGIC ;
    clock0          : OUT STD_LOGIC ;
    clock1          : OUT STD_LOGIC        );
    END my_pll;
    ARCHITECTURE SYN OF my_pll IS
    SIGNAL sub_wire0        : STD_LOGIC ;
    SIGNAL sub_wire1        : STD_LOGIC ;
    SIGNAL sub_wire2        : STD_LOGIC ;
    COMPONENT altclklock
    GENERIC (
    inclock_period          : NATURAL;
    clock0_boost            : NATURAL;
    clock1_boost            : NATURAL;
    operation_mode          : STRING;
    intended_device_family          : STRING;
    valid_lock_cycles               : NATURAL;
    invalid_lock_cycles             : NATURAL;
    valid_lock_multiplier           : NATURAL;
    invalid_lock_multiplier         : NATURAL;
    clock0_divide           : NATURAL;
    clock1_divide           : NATURAL;
    outclock_phase_shift            : NATURAL
    );
    PORT (
    inclocken       : IN STD_LOGIC ;
    inclock : IN STD_LOGIC ;
    clock0  : OUT STD_LOGIC ;
    clock1  : OUT STD_LOGIC ;
    locked  : OUT STD_LOGIC
    );
    END COMPONENT;
    BEGIN
    clock0    <= sub_wire0;
    clock1    <= sub_wire1;
    locked    <= sub_wire2;
    altclklock_component : altclklock
    GENERIC MAP (
    inclock_period => 25000,
    clock0_boost => 4,
    clock1_boost => 2,
    operation_mode => "NORMAL",
    intended_device_family => "APEX20KE",
    valid_lock_cycles => 5,
    invalid_lock_cycles => 5,
    valid_lock_multiplier => 5,
    invalid_lock_multiplier => 5,
    clock0_divide => 1,
    clock1_divide => 1,
    outclock_phase_shift => 0
    )
    PORT MAP (
    inclocken => inclocken,
    inclock => inclock,
    clock0 => sub_wire0,
    clock1 => sub_wire1,
    locked => sub_wire2        
    );
    END SYN;

  1. To close the MegaWizard Plug-In Manager, click Finish.

 

 

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