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 Verilog HDL 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 for the altclklock function:

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

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

  3. When you are asked Which type of output file do you want to create?, select Verilog HDL.

  4. In the Available Megafunctions list, click on the + icon to expand the I/O folder and select ALTCLKLOCK.

  5. When you are asked What name do you want for the file?, type or browse to locate the appropriate file name or location. For this example, the path and file name should be C:\synplify_e_features\verilog\pll\my_pll.v.

  6. Click Next.

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

    1. For this example, select APEX 20KE when you are asked 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.

    4. Under Place a higher priority on matching the phase shift of, select The external clock [Normal Mode].

    5. Click Next.

    6.  

      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. When you are asked What is the input clock frequency?, select 40.0 MHz.

      2. When you are asked Which output clocks would you like to use?, select Clock0 and Clock1, using the following clock multiplication and division factors:

    2. Option:

      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. When you are asked How many synchronized clock cycles should pass before PLL is considered locked?, select 2.5 clock cycles.

    2. When you are asked 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 will create. In this example, it generates the following files:

C:\synplify_e_features\verilog\pll\my_pll.v
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_bb.v

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

// megafunction wizard: %ALTCLKLOCK%
// GENERATION: STANDARD
// VERSION: WM1.0
// MODULE: altclklock
// ============================================================
// File Name: my_pll.v
// Megafunction Name(s):
//                      altclklock
// ============================================================
// ************************************************************
// THIS IS A WIZARD GENERATED FILE. DO NOT EDIT THIS FILE!
// ************************************************************
module my_pll (
inclock,
inclocken,
locked,
clock0,
clock1);
input     inclock;
input     inclocken;
output    locked;
output    clock0;
output    clock1;
wire  sub_wire0;
wire  sub_wire1;
wire  sub_wire2;
wire  clock0 = sub_wire0;
wire  clock1 = sub_wire1;
wire  locked = sub_wire2;
altclklock      altclklock_component (
.inclocken (inclocken),
.inclock (inclock),
.clock0 (sub_wire0),
.clock1 (sub_wire1),
.locked (sub_wire2));
defparam
altclklock_component.inclock_period = 25000,
altclklock_component.clock0_boost = 4,
altclklock_component.clock1_boost = 2,
altclklock_component.operation_mode = "NORMAL",
altclklock_component.intended_device_family = "APEX20KE",
altclklock_component.valid_lock_cycles = 5,
altclklock_component.invalid_lock_cycles = 5,
altclklock_component.valid_lock_multiplier = 5,
altclklock_component.invalid_lock_multiplier = 5,
altclklock_component.clock0_divide = 1,
altclklock_component.clock1_divide = 1,
altclklock_component.outclock_phase_shift = 0;
endmodule

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

 

 

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