ug_intro_to_megafunctions(9)
时间:2026-01-19
时间:2026-01-19
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字,全部文档内容请下载后查看。喜欢就下载吧 ……下一篇:什么是周长