You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unsure if this is a bug report or a feature request. The warnings that check for reading unassigned variables has a small gap if that variable is a member of a struct, but this might be intentional.
In the following example, only member 's.a' is driven and 's.b' is undriven.
Top level design units:
top
Build succeeded:0 errors, 0 warnings
typedef struct{ logic a;
logic b;
}s_t;
moduletop(
outputlogic x, y, z
);
s_t s;
always_comb s.a =1'b1;
always_combbeginif (s.b) begin
x =1'b1;
endelsebegin
x =1'b0;
endendalways_comb y = s.b;
always_combbegin
z = s.b ?1'b1:1'b0;
endendmodule
The text was updated successfully, but these errors were encountered:
I'm assuming that a full struct initialization would count as all members having a driver (s = '0). Most code is written this way, it's just the occasional one-off module where the designer uses individual assign statements for each struct member that I've hit a few cases of missed drivers. A new warning here would be great to help push finding the issue to earlier in the process.
Unsure if this is a bug report or a feature request. The warnings that check for reading unassigned variables has a small gap if that variable is a member of a struct, but this might be intentional.
In the following example, only member 's.a' is driven and 's.b' is undriven.
The text was updated successfully, but these errors were encountered: