ug_intro_to_megafunctions(9)

时间:2026-01-20   来源:未知    
字号:

UG-01056-3.0May2013

ExampleMegafunctionInference9

ExampleMegafunctionInference

TheQuartusIIsoftwareinfersfollowingthefollowingVerilogHDLcodeastheLPM_MULTor

ALTMULT_ADDmegafunctionsforanunsignedandasignedmultiplier.EachexamplefitsintooneDSPblock9-bitelement.Inaddition,whenregisterpackingoccurs,noextralogiccellsforregistersarerequired.moduleunsigned_mult(out,a,b);

output[15:0]out;input[7:0]a;input[7:0]b;

assignout=a*b;endmodule

modulesigned_mult(out,clk,a,b);

output[15:0]out;inputclk;

inputsigned[7:0]a;inputsigned[7:0]b;regsigned[7:0]a_reg;regsigned[7:0]b_reg;regsigned[15:0]out;

wiresigned[15:0]mult_out;

assignmult_out=a_reg*b_reg;always@(posedgeclk)begin

a_reg<=a;b_reg<=b;

out<=mult_out;endendmodule

RelatedInformation

RecommendedHDLCodingStylesQuartusIIIntegratedSynthesis

UsingqmegawizCommand-LineExecutable

Youcanuseqmegawizcommand-lineversionoftheMegaWizardPlug-InManagerthatallowsyoutomodify,update,orcreatevariationfileswithoutusingaGUI.ThefollowingtablelistscommonqmegawizsyntaxoptionsandargumentsTouseqmegawiz,usethefollowingsyntax:

qmegawiz[options][module=<modulename>]|wizard=<wizardname>][<param>=<value>...<port>=<used>|<unused>...]<variationfilename>

Options/Arguments

Description

-silent

-f:<parameterfile>

RunstheMegaWizardPlug-InManagerin

command-linemode,withoutdisplayingtheGUI.Specifiesa.txtnamethatcontainsalltheparameterandportvalues.

AlteraCorporation

IntroductiontoMegafunctionIPCores

UG-01056-3.0

May2013

10UsingIP-generateCommand-LineExecutable

Options/ArgumentsDescription

-p:<workingdirectory>module=<modulename>wizard=<wizardname>

Specifiesthedefaultworkingdirectorythatqmegawizuseswhenitgeneratesfiles.

Specifiesthemoduleorwizardname.Whentherearemultiplewizardnamesthatcorrespondtoonemodulename,usethewizardoptiontospecifyonewizard.Whentherearemultiplemodulenamesthatcorrespondtoonewizardname,usethemoduleoptiontospecifyonemodule.

Specifiestheparametervalues.Specifieswhethertheportsareused.

Specifiesavariationfilename.Validextensionsare.v,.vhd,or.tdf.

<param>=<value><port>=<used>|<unused><variationfilename>

Forexample,

qmegawiz-silentmodule=altlvds_rxwizard=altlvds

common_rx_tx_pll=ONtx_coreclock=usedlvds_sample.v

RelatedInformation

Command-LineScripting

UsingIP-generateCommand-LineExecutable

Youcanuseip-generatetocreateormodifycustommegafunctionvariations.Toruntheip-generatecommand,followthesesteps:

1.Typethefollowingcommandatthecommandpromptofyouroperatingsystem:<ACDSinstallationdirectory>\quartus\sopc_builder\bin\2.Toruntheexecutabletypeip-generate.

3.Toinstantiatethemegafunctionusingtheexecutablefile,typethefollowingsyntax:ip-generate--component-name=altdq_dqs2

-–component-system-param=DEVICE_FAMILY=”StratixV”

-–file-set=QUARTUS_SYNTH--output-name[=<file_name>]–-component-param[=<parameter_name>][=<parameter_value>]

RelatedInformation

Command-LineScripting

IP-GenerateArguments

IP-generateacceptsthesecommonarguments.

AlteraCorporation

IntroductiontoMegafunctionIPCores

…… 此处隐藏:884字,全部文档内容请下载后查看。喜欢就下载吧 ……
ug_intro_to_megafunctions(9).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:19 元/月 原价:99元
低至 0.1 元/份 每月下载300
全站内容免费自由复制
VIP包月下载
特价:19 元/月 原价:99元
低至 0.1 元/份 每月下载300
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)