永发信息网

verilog语法求助

答案:1  悬赏:50  手机版
解决时间 2021-11-28 14:31
verilog语法求助
最佳答案
你是不是错误提示:Error(10200):VerilogHDLConditionalStatementerrorat……:cannotmatchoperand(s)intheconditiontothecorrespondingedgesintheenclosingeventcontrolofthealwaysconstruct这是因为,你的“always@(posedgeclkornegedger_est)”表明在clk上升沿或r_est下降沿这两个敏感事件发生时always语句块得以触发;而always中的if条件语句必须至少有一个条件指向其中一个敏感事件(边界标识符);所以写成“if(r_est)else”就会出错。你可以把“always@(posedgeclkornegedger_est)”改为“always@(posedgeclkorposedger_est)”再编译试试,应该就没问题了。你右键该错误点击“Help”里是这么说的:CAUSE:InaconditionalstatementatthespecifiedlocationinaVerilogDesignFile(.v),youspecifiedaconditionthatQuartusIIIntegratedSynthesiscannotusetoclassifytheedgesintheenclosingalwaysconstruct'seventcontrol.Whenaneventcontrolcontainsmultipleedges,QuartusIIIntegratedSynthesisdistinguishestheasynchronouscontrolsignalsfromtheclockbyanalyzingtheconditionalstatementsinthealwaysconstruct.Forexample,thefollowingcodefragmentcontainsanalwaysconstructwhoseeventcontrolcontainsthreeedges---twoasynchronousresetsandaclock.always@(posedgeclkorposedgerst1orposedgerst2)beginif(rst1||rst2)q<=1'b0;elseq<=d;endQuartusIIIntegratedSynthesisusestheifconditiontoidentifythetwoasynchronousresetsand,byimplication,theclock.Foredgeclassification,QuartusIIIntegratedSynthesisrequiresthataconditionfallintooneoftwocategories.Itcanrefertoasingleedgeidentifier(tomatchposedgeevents)oritscomplement(tomatchnegedgeevents),forexample,rst1,!rst1,rst1==1'b1,rst1==1'b0.ItcanalsoORtwoormoreexpressionsthateachrefertoasingleedgeidentifieroritscomplement,forexample,(rst1||rst2),(!rst1||!rst2).Youcanreceivethiserrorifyourconditiontestsforthewrongpolarity,orifittestsforthevalueofavariablethatisnotanedgeintheeventcontrol.Forexample,tomatchaposedgerstevent,theconditionmustberstorrst=1'b1.Finally,youcanreceivethiserrorifyouareattemptingtouseasingleconditionexpressiontotestforbothanasynchronousreset/setandasynchronousreset/setcondition.Thefollowingcodefragmentcontainsanexampleofanillegalconditionexpression:always@(posedgeclkorposedgerst)beginif(rst||sync_rst)q<=1'b0;elseq<=d;endQuartusIIIntegratedSynthesisgeneratesthiserrormessagewhencompilingthisdesignbecauseitcannotmatchsync_rsttoanedgeonthesensitivitylist.其中关键的语句我摘译一下,不一定译得准确,不过大体意思我想你应该可以了解了:原因:……指定了一个条件,QuartusII综合器不能够将该条件用于在封闭的always结构的事件控制中对边界进行区分。当一个事件控制中包含多重边界,QuartusII综合器通过分析always结构中的条件语句来对时钟和异步控制信号加以区分。……QuartusII综合器采用if条件来鉴别两个异步reset信号,并隐含地鉴别了clock信号。为了分类的需要,QuartusII综合器需要有一个条件落入两个类别之一。它可以指向一个单独的边界标识符(以匹配posedge事件)或它的补语(以匹配negedge事件),例如,rst1,!rst1,rst1==1'b1,rst1==1'b0。它也可以是OR两个或的表达式,其中每一个指向一个单独的边界标识符或它的补语……当你的条件测试发现错误极性,或者它测试变量的值,但该值在事件控制中并不是一个边界时,你会接到这个错误。例如,为了匹配一个posedgerst事件,条件必须是rst或rst=1'b1。编译错误时多看看Help,讲得很详细~
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
泉州市通政中心小学的学校介绍
梦幻5D动感体验馆地址在什么地方,想过去办事
工伤烧伤评级是不是越久对瘢痕越不利于评级
一道超级难的平面几何题!
成语:卓有成-
有一台3千瓦空调机配多大铜线和断路器
如何利用儿童游乐设备搭建室内儿童游乐场
怎么样利用VBA对同一个文件夹下所有EXCEL文件
双流和温江成都市区哪个近点
LC妈咪听说过吗?在这里可以获得什么帮助?
因防排烟设置的火灾探测器需要整个防火分区设
各位前辈,男号好还是女号好
天猫和购家具好吗
如果陪唱女真心喜欢客人的话,就会和客人单独
炒土豆丝有先用水煮的吗?饭店里的大厨都是先
推荐资讯
我看上去有40岁吗
中脉拉卡内衣真的好吗?是不是真的有效?
VB中Randomize函数该怎么使用啊?给举个例子
单选题生活中的下列做法错误的是A.用肥皂水鉴
解答题请你运用学过的光学知识解释电影银幕和
按键精灵 找两个颜色满足其中一个颜色条件
5.6:2.8求比值
这个图片上边的虎头是什么弄的啊,,什么软件
日本内阁首相伊藤博文,当他把这幅上联拿给
在吴江,老公月收入多少,你才敢辞职做全职太
谁做过开单员,这个工作怎么样?会不会经常加
刚开淘宝店只有5个柜台
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?