I was tying a port to zero in my design. What is the difference between 2'b0 and 2'd0 in Verilog?
What does b and d actually mean?
I was tying a port to zero in my design. What is the difference between 2'b0 and 2'd0 in Verilog?
What does b and d actually mean?
Copyright © 2021 Jogjafile Inc.
banddare the base radix of the numeric literal; binary and decimial respectively. They are equivalent values in your case. In both literals, you are specifying 2-bit width values, with both bits having a '0' value.2'b11and2'd3would also be equivalent, with both bits having a '1' value.Note that you can also write
'0which is a fill literal that expands to the width of the port.