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

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

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

MAX+PLUS II Architecture Control Logic Function Instantiation Example for Verilog HDL

You can instantiate Altera®-provided logic functions from the alt_mf library, which includes the a_8fadd, a_8mcomp, a_8count, and a_81mux functions, in Verilog HDL designs. Altera provides behavioral Verilog HDL descriptions of these functions.

Figure 1 shows an example of an 8-bit counter that is instantiated using the a_8count function. Because Verilog HDL is case-sensitive, be sure to use uppercase letters for all of the macrofunction's module names and port names.

Figure 1. Sample Verilog HDL File with Logic Function Instantiation (counter.v)

module counter (clock, ena, load, dnup, set, clear, i, q, cout);
output          cout;
output[7:0]     q;
input[7:0]      i;
input           clock, ena, load, dnup, set, clear;
A_8COUNT u1    (.A(i[0]), .B(i[1]), .C(i[2]), .D(i[3]),
                .E(i[4]), .F(i[5]), .G(i[6]), .H(i[7]),
                .LDN(load), .GN(ena), .DNUP(dnup), .SETN(set), 
                .CLRN(clear), .CLK(clock), .QA(q[0]), .QB(q[1]),
                .QC(q[2]), .QD(q[3]), .QE(q[4]), .QF(q[5]),
                .QG(q[6]), .QH(q[7]), .COUT(cout) );
endmodule

The sample file shown in Figure 1 can be synthesized with the Design Compiler or FPGA Compiler. You can also simulate it with the Cadence Verilog-XL Simulator by typing the following command at the dc_shell prompt:

verilog counter.v /usr/maxplus2/synopsys/library/alt_mf/src/mf.v Enter


Feedback

Did this information help you?

If no, 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.

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