diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-06 08:20:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-06 08:20:33 +0200 |
commit | 91a8e2335d1f1b3bf3232c60d84aec94fc8f85b9 (patch) | |
tree | 3ab8493102bca154745594468b3458a948b2e460 /src/synth/netlists-folds.ads | |
parent | cb5690c37d52124316603f868fb165d15a5e0c8c (diff) | |
download | ghdl-91a8e2335d1f1b3bf3232c60d84aec94fc8f85b9.tar.gz ghdl-91a8e2335d1f1b3bf3232c60d84aec94fc8f85b9.tar.bz2 ghdl-91a8e2335d1f1b3bf3232c60d84aec94fc8f85b9.zip |
netlists-folds: add Build2_And, remove default location.
Diffstat (limited to 'src/synth/netlists-folds.ads')
-rw-r--r-- | src/synth/netlists-folds.ads | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/synth/netlists-folds.ads b/src/synth/netlists-folds.ads index f00ded470..1aa020df9 100644 --- a/src/synth/netlists-folds.ads +++ b/src/synth/netlists-folds.ads @@ -48,14 +48,14 @@ package Netlists.Folds is function Build2_Uresize (Ctxt : Context_Acc; I : Net; W : Width; - Loc : Location_Type := No_Location) + Loc : Location_Type) return Net; -- Sign extend, noop or truncate I so that its width is W. function Build2_Sresize (Ctxt : Context_Acc; I : Net; W : Width; - Loc : Location_Type := No_Location) + Loc : Location_Type) return Net; -- If IS_SIGNED is true, this is Build2_Sresize, otherwise Build2_Uresize. @@ -63,7 +63,7 @@ package Netlists.Folds is I : Net; W : Width; Is_Signed : Boolean; - Loc : Location_Type := No_Location) + Loc : Location_Type) return Net; -- Same as Build_Extract, but return I iff extract all the bits. @@ -71,8 +71,12 @@ package Netlists.Folds is (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) + function Build2_Imp (Ctxt : Context_Acc; A, B : Net; Loc : Location_Type) + return Net; + + -- Return A & B. + -- If A is No_Net, simply return B so that it is possible to easily build + -- chain of conditions. + function Build2_And (Ctxt : Context_Acc; A, B : Net; Loc : Location_Type) return Net; end Netlists.Folds; |