default values of wire and reg

Status
Not open for further replies.
There is no default value... you have initialized the value of the "reg" ..it is just like a variable in any programming language. On the other hand wire is a connector you don't have do anything with this. It will take the value of output to which it is connected.
 

I think you meant to ask what are the default initial values of wire and reg. The answer is simple for reg: the X state.

The answer is not so simple for wires, because wires do not store a value. Wires are the resolution of driver values. See my blog https://go.mentor.com/wire-vs-reg.

If a wire has no drivers, it resolves to the Z state. However, the initial resolution of wires at time zero is not defined in the LRM. Some simulators have chosen to make all resolve to X initially, and then move to whatever resolved value to that the wire always creates an event.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…