aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-folds.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-05 19:03:08 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-05 19:03:08 +0100
commit103e373e194fa782770cae50573f924b78b0bdf2 (patch)
tree08136be7ca856569fe5b739037dbc1e7f7de3c1f /src/synth/netlists-folds.ads
parent448fc4b63b3ffcb8d64b2ef1ff52ae2f800ea494 (diff)
downloadghdl-103e373e194fa782770cae50573f924b78b0bdf2.tar.gz
ghdl-103e373e194fa782770cae50573f924b78b0bdf2.tar.bz2
ghdl-103e373e194fa782770cae50573f924b78b0bdf2.zip
netlists: add build2_sresize, simplify code.
Diffstat (limited to 'src/synth/netlists-folds.ads')
-rw-r--r--src/synth/netlists-folds.ads10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/synth/netlists-folds.ads b/src/synth/netlists-folds.ads
index bd417162f..22ab60949 100644
--- a/src/synth/netlists-folds.ads
+++ b/src/synth/netlists-folds.ads
@@ -42,7 +42,15 @@ package Netlists.Folds is
W : Width;
Loc : Location_Type := No_Location)
return Net;
- -- Same as Build_Extract, but return I iff extract all the bits.
+
+ -- 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)
+ 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;
end Netlists.Folds;