我写了一段代码,主要实现的是状态机各个状态之间的相互转化
这段代码在quartusII5.0下编译成功且下载到板子了后用signaTapII调试的结果完全正确
可是用QuartusII6.0编译后出现Warning:case item is ignored......blala......
网上给出来的信息说:
CAUSE: In a Case Statement at the specified location in a Verilog Design File (.v), you specified a case item expression that has more significant bits than the number of bits in the case expression that it is being compared against. As a result, the case item expression can never apply, and is ignored by the Quartus II software
仔细思考后觉得应该是我的状态机中的状态编码有问题:
我原来用的是自然数编码,
也IDLE=0,STATE1=1,STATE2=2,STATE3=3,STATE4=4....
然后把状态编码改写成:
IDLE=0,STATE1=1,STATE2=2,STATE3=4,STATE4=8.....
编译的结果显示这个Warning消失了。
以后对状态机的编码要小心了
文章评论(0条评论)
登录后参与讨论