diff options
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/netlists-folds.adb | 14 | ||||
-rw-r--r-- | src/synth/netlists-folds.ads | 14 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/synth/netlists-folds.adb b/src/synth/netlists-folds.adb index e591c35cf..a46aef583 100644 --- a/src/synth/netlists-folds.adb +++ b/src/synth/netlists-folds.adb @@ -270,4 +270,18 @@ package body Netlists.Folds is return Build_Extract (Ctxt, I, Off, W); end if; end Build2_Extract; + + function Build2_Imp (Ctxt : Context_Acc; + A, B : Net; + Loc : Location_Type := No_Location) + return Net + is + N : Net; + begin + N := Build_Monadic (Ctxt, Id_Not, A); + Set_Location (N, Loc); + N := Build_Dyadic (Ctxt, Id_Or, N, B); + Set_Location (N, Loc); + return N; + end Build2_Imp; end Netlists.Folds; diff --git a/src/synth/netlists-folds.ads b/src/synth/netlists-folds.ads index 68c6ba5a4..f00ded470 100644 --- a/src/synth/netlists-folds.ads +++ b/src/synth/netlists-folds.ads @@ -60,13 +60,19 @@ package Netlists.Folds is -- If IS_SIGNED is true, this is Build2_Sresize, otherwise Build2_Uresize. function Build2_Resize (Ctxt : Context_Acc; - I : Net; - W : Width; - Is_Signed : Boolean; - Loc : Location_Type := No_Location) + I : Net; + W : Width; + Is_Signed : Boolean; + Loc : Location_Type := No_Location) return Net; -- Same as Build_Extract, but return I iff extract all the bits. function Build2_Extract (Ctxt : Context_Acc; I : Net; Off, W : Width) return Net; + + -- Return A -> B == !A || B + function Build2_Imp (Ctxt : Context_Acc; + A, B : Net; + Loc : Location_Type := No_Location) + return Net; end Netlists.Folds; |