From 4c3d7e01912d87b152dd7ef20bfdbf3b1946348a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 19 Jul 2019 11:29:25 +0100 Subject: [PATCH] add an operator class for signed/unsigned --- src/ieee754/fcvt/pipeline.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ieee754/fcvt/pipeline.py b/src/ieee754/fcvt/pipeline.py index 5487aa65..c22f9fbf 100644 --- a/src/ieee754/fcvt/pipeline.py +++ b/src/ieee754/fcvt/pipeline.py @@ -28,6 +28,13 @@ from nmutil.singlepipe import SimpleHandshake, StageChain from ieee754.fpcommon.fpbase import FPState from ieee754.pipeline import PipelineSpec +class SignedOp: + def __init__(self): + self.signed = Signal(reset_less=True) + + def eq(self, i): + return [self.signed.eq(i)] + class FPCVTIntToFloatMod(Elaboratable): """ FP integer conversion: copes with 16/32/64 int to 16/32/64 fp. -- 2.30.2