How can I assign a “don't care” value to an output in a combinational module in Verilog

后端 未结 2 2027
误落风尘
误落风尘 2020-12-15 06:23

Imagine we want to describe a combinational circuit that satisfy the following truth table:

a b | s0 s1 s2 s3
-----------------
0 0 |  1  d  d  d
0 1 |  0  1         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 07:03

    I would think that supplying x to an output would do the trick -- "unknown" should do exactly what you want. I believe you can wire it directly as an output, but if that's forbidden, you could generate it by wiring both 1 and 0 to the output.

提交回复
热议问题