altera ip 核小究
用quartus的MegaWizard工具生成一个乘法器multiplier,会在工程目录下产生
multiplier.qip (可选)
multiplier_bb.v (可选)
multiplier.v
文件。
Multiplier.v 文件的内容
// megafunction wizard: %LPM_MULT%
// GENERATION: STANDARD
// VERSION: WM1.0
// MODULE: lpm_mult
// ============================================================
// File Name: multiplier.v
// Megafunction Name(s):
// lpm_mult
//
// Simulation Library Files(s):
// lpm
// ============================================================
// ************************************************************
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
//
// 10.0 Build 262 08/18/2010 SP 1 SJ Full Version
// ************************************************************
//Copyright (C) 1991-2010 Altera Corporation
//Your use of Altera Corporation's design tools, logic functions
//and other software and tools, and its AMPP partner logic
//functions, and any output files from any of the foregoing
//(including device programming or simulation files), and any
//associated documentation or information are expressly subject
//to the terms and conditions of the Altera Program License
//Subscription Agreement, Altera MegaCore Function License
//Agreement, or other applicable license agreement, including,
//without limitation, that your use is for the sole purpose of
//programming logic devices manufactured by Altera and sold by
//Altera or its authorized distributors. Please refer to the
//applicable agreement for further details.
// synopsys translate_off
`timescale 1 ps / 1 ps
// synopsys translate_on
module multiplier (
clock,
dataa,
datab,
result);
input clock;
input [7:0] dataa;
input [7:0] datab;
output [15:0] result;
wire [15:0] sub_wire0;
wire [15:0] result = sub_wire0[15:0];
lpm_mult lpm_mult_component (
.clock (clock),
.dataa (dataa),
.datab (datab),
.result (sub_wire0),
.aclr (1'b0),
.clken (1'b1),
.sum (1'b0));
defparam
lpm_mult_component.lpm_hint = "MAXIMIZE_SPEED=5",
lpm_mult_component.lpm_pipeline = 2,
lpm_mult_component.lpm_representation = "UNSIGNED",
lpm_mult_component.lpm_type = "LPM_MULT",
lpm_mult_component.lpm_widtha = 8,
lpm_mult_component.lpm_widthb = 8,
lpm_mult_component.lpm_widthp = 16;
endmodule
生成的模块multiplier 只是在实例化lpm_mult模块的基础上,根据MegaWizard的配置结果,用defparam对该模块内部的对应的参数进行了更改。因此,如果对要使用的模块比较熟练的话,更方便一点的做法是不用MegaWizard进行配置,而是直接按照这种方法用hdl语言来对乘法模块进行调用。
最新文章
- 开源WinForms界面开发框架Management Studio 选项卡文档 插件 Office 2007蓝色风格 后台线程
- LESS 学习记录(简单入门)
- xcrun: error: active developer path (";/Volumes/Xcode/Xcode-beta.app/Contents/Developer";) does not exist, use `xcode-select --swi
- ASP.NET Session的七点认识
- 三,对于printf函数和C语言编程的初步拓展
- jQuery 定位锚点
- bzoj1812 [Ioi2005]riv
- selenium基本操作
- MySQL Block Nested Loop and Batched Key Access Joins(块嵌套循环和批量Key访问连接)
- typedef和#define的简单比较
- JavaOOP-集合框架
- centos7搭建gitlab服务器、汉化
- shell编程学习笔记(八):Shell中的if条件判断
- 解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
- Python3学习之路~5.12 hashlib &; hmac &; md5 &; sha模块
- 如何发布自己的node模块
- 源码管理工具Git-客户端GitBash常用命令
- ubuntu compile openjdk87
- 用COS实现文件上传
- Docker数据管理(四)