学习FPGA过程中遇到的问题:QuartusII
来源:互联网 发布:小明发布永久域名台湾 编辑:程序博客网 时间:2024/06/05 12:01
在做包文练习时遇到的错误:
Error (10200): Verilog HDL Conditional Statement error at baowen3.v(130): cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct
错误的代码段出现在
//dout_err always @(posedge clk or negedge rst_n)begin if(rst_n==1'b0)begin dout_err <= 0; end if(din_vld == 1'b1)begin//错误出现在这里 if(flag==1 && din_sop==1 && din_eop==1)begin dout_err <= 1; end else if(flag==0 && din_sop==0 /*&& din_vld==1*/ && din_eop==1)begin dout_err <= 1; end else if(din_err==1 && din_eop)begin dout_err <= 1; end else if(flag_err==1 && din_eop==1)begin dout_err <= 1; end else dout_err <= 0; end else begin dout_err <= 0; end end
Altera官方给出的解释
Error: Verilog HDL Conditional Statement error at : If-Else Statement does not match any sensitivity list edge
Description
This error may occur if you are trying to model a DFF with multiple control signals. The Quartus® II software will only infer a secondary signal from a single secondary signal in an IF condition. For example, you may have written the following sample structure to model a DFF primitive that can be reset by two signals, rst1 or rst2:
always @ (posedge clk or posedge rst1 or posedge rst2)
begin
if (rst1 == 1\’b1 || rst2 == 1\’b1)
q <= 1\'b0;
else
q <= d;
end
To correct this, edit the design to specify only one edge per if condition. For example, if you were to edit the previous example to specify only one edge per if condition, the Quartus II software would then succesfully recognize the DFF primitive. The sample code would then appear as follows:
always @ (posedge clk or posedge rst1 or posedge rst2)
begin
if (rst1 == 1\’b1)
q <= 1\'b0;
else if (rst2 == 1\’b1)
q <= 1\'b0;
else
q <= d;
end
Alternatively, you could generate the OR of rst1 and rst2 outside the Always construct.
This limitation will be addressed in a future version of the Quartus II software.
于是将
if(din_vld == 1’b1)begin
改成
else if(din_vld == 1’b1)begin
错误解决。
- 学习FPGA过程中遇到的问题:QuartusII
- C#学习过程中遇到的问题
- 在学习过程中遇到的问题
- Makefile学习过程中遇到的问题
- allegro 学习过程中遇到的问题
- thinkphp学习过程中遇到的问题
- 线程学习过程中遇到的问题
- JavaEE 学习过程中遇到的问题
- 学习loadrunner过程中遇到的问题
- HBuilder学习过程中遇到的问题
- 学习过程中遇到的问题
- Fragment的使用与学习过程中遇到的问题
- 学习Flex的过程中遇到的问题
- 学习Spring Security的过程中遇到的问题汇总
- 五大框架的学习过程中遇到的问题
- ABAQUS学习过程中遇到的问题积累
- hibernate 开发学习过程中遇到的问题:
- WTL学习过程中遇到的一些问题总结
- 版本更新 配置 value—String文件内容
- Eclipse插件推荐安装列表
- 汇编语言第一个程序
- Leetcode:正则表达式.
- 欢迎使用CSDN-markdown编辑器
- 学习FPGA过程中遇到的问题:QuartusII
- 最简单的ImageLoader工具类
- backbone(4) 事件 model 事件
- 浅谈我对产品需求与软件需求的理解——来源于我的求职面试经历
- HDU 2084 数塔 DP .
- http://www.cnblogs.com/bastard/archive/2013/01/28/2879884.html
- JSON数据格式和serialize数据格式的异同和使用
- Android中BaseAdapter在ListView中的应用与优化
- it's a test page