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
#1349 will add the way to judge define's exclusivity.
So the way to express exclusivity becomes important.
For example, the following code is multi-drive error, because FEATURE_A, FEATURE_B and FEATURE_C are not exclusive.
#[ifdef(FEATURE_A)]
assign a =1;
#[ifdef(FEATURE_B)]
assign a =2;
#[ifdef(FEATURE_C)]
assign a =3;
The following code can express exclusivity.
In this case, each assign 's define context is exclusive, and not multi-drive error.
But this is too complicated.
#[ifdef(FEATURE_A)]
assign a =1;
#[ifndef(FEATURE_A)]
#[ifdef(FEATURE_B)]
assign a =2;
#[ifndef(FEATURE_A)]
#[ifndef(FEATURE_B)]
#[ifdef(FEATURE_C)]
assign a =3;
So elsif and else is useful like below:
#[ifdef(FEATURE_A)]
assign a =1;
#[elsif(FEATURE_B)]
assign a =2;
#[elsif(FEATURE_C)]
assign a =3;
elsif and else have some ambiguity.
#[ifdef(FEATURE_A)]
assign a =1;
let x: logic=1; // this statement is not in both `ifdef` and `elsif`.#[elsif(FEATURE_B)]
assign a =2;
Such case should be treated as error.
The text was updated successfully, but these errors were encountered:
#1349 will add the way to judge define's exclusivity.
So the way to express exclusivity becomes important.
For example, the following code is multi-drive error, because
FEATURE_A
,FEATURE_B
andFEATURE_C
are not exclusive.The following code can express exclusivity.
In this case, each
assign
's define context is exclusive, and not multi-drive error.But this is too complicated.
So
elsif
andelse
is useful like below:elsif
andelse
have some ambiguity.Such case should be treated as error.
The text was updated successfully, but these errors were encountered: