From 103e373e194fa782770cae50573f924b78b0bdf2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 5 Nov 2019 19:03:08 +0100 Subject: netlists: add build2_sresize, simplify code. --- src/synth/netlists-folds.ads | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/synth/netlists-folds.ads') 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; -- cgit v1.2.3