关于casex和casez的问题。求教。

Usage of casex A casex block treats ‘x’ as “don’t cares” if they are in either the case expression or the case item. Problem occurs when an input to a casex expression is initialized to an unknown state. The simulator will treat unknown state as “don’t care” while the synthesizer will propagate the unknown value through the gate-level model.

Usage of casez
Similar to casex, with casez, a problem would occur if an input were initialized to a high impedance state. However, the casez
statement is a short, concise, and tabular method for coding certain useful structures, such as priority encoders, interrupt handlers, and address decoders.

高手能解释下什么意思么?

还有propagate the unknown value through the gate-level model 传递未知数值通过门级 是什么意思?
我也来说两句 查看全部回复

最新回复

  • dio65759465 (2008-11-21 09:20:15)

    简单的说 casex语句就是代表对条件判断的表达式中的x忽略  比如2‘b0x  用casex判断的话 2’b01与2‘b00都符合
    casez中是忽略Z   这两个语句中也可以用?来代表忽略的符号

    那句英文你得结合上下文来看
    是说用casex会出现未知的状态 仿真器对此的处理是忽略而综合器会在门级模型中传递未知的数值(这样会出问题)

    我不知道自己说清楚没 因为感觉有些英文的东西硬用中文表述很需要根底的 我常说不清楚
  • xiaocanmeng (2008-11-21 10:07:01)

    感谢2#。还有推荐使用casez语句而不是casex语句,保证前仿和后仿的匹配是什么道理?
  • dio65759465 (2008-11-21 11:14:14)

    因为在仿真中出现X 会导致产生误导或混乱的结果,特别是后仿里面

    就符号而言x表示的是不定态 Z的是确定的高阻态
  • xiaocanmeng (2008-11-21 11:34:19)

    casez中,z被认为无关位,而casex 中x和z都被认为是无关位。而x会造成前仿和后仿的不匹配。因为仿真器中将x视为unknown而综合时会视为don't care以达到更好的优化。搞明白了。谢谢dio
  • mjchina1224 (2008-11-21 20:52:56)

    受  教了