ieee754.fcvt package

Submodules

ieee754.fcvt.downsize module

class ieee754.fcvt.downsize.FPCVTDownConvertMod(in_pspec, out_pspec)

Bases: nmutil.pipemodbase.PipeModBase

FP down-conversion (higher to lower bitwidth)

elaborate(platform)
ispec()
ospec()

ieee754.fcvt.float2int module

IEEE754 Floating Point Converter

Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>

Relevant bugreports: * http://bugs.libre-riscv.org/show_bug.cgi?id=112 * http://bugs.libre-riscv.org/show_bug.cgi?id=113

class ieee754.fcvt.float2int.FPCVTFloatToIntMod(in_pspec, out_pspec)

Bases: nmutil.pipemodbase.PipeModBase

integer to FP conversion: copes with 16/32/64 fp to 16/32/64 int/uint

self.ctx.i.op & 0x1 == 0x1 : SIGNED int self.ctx.i.op & 0x1 == 0x0 : UNSIGNED int

Note: this is a single-stage conversion that goes direct to FPPackData

elaborate(platform)
ispec()
ospec()

ieee754.fcvt.int2float module

class ieee754.fcvt.int2float.FPCVTIntToFloatMod(in_pspec, out_pspec)

Bases: nmutil.pipemodbase.PipeModBase

FP integer conversion: copes with 16/32/64 int to 16/32/64 fp.

self.ctx.i.op & 0x1 == 0x1 : SIGNED int self.ctx.i.op & 0x1 == 0x0 : UNSIGNED int

elaborate(platform)
ispec()
ospec()

ieee754.fcvt.pipeline module

IEEE754 Floating Point Conversion

Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>

class ieee754.fcvt.pipeline.FPCVTBasePipe(modkls, e_extra, in_pspec, out_pspec)

Bases: nmutil.singlepipe.ControlBase

elaborate(platform)

handles case where stage has dynamic ready/valid functions

class ieee754.fcvt.pipeline.FPCVTConvertDeNorm(in_pspec, out_pspec, modkls)

Bases: nmutil.dynamicpipe.DynamicPipe

FPConversion and De-norm

class ieee754.fcvt.pipeline.FPCVTF2IntMuxInOut(in_width, out_width, num_rows, op_wid=0)

Bases: ieee754.fcvt.pipeline.FPCVTMuxInOutBase

Reservation-Station version of FPCVT pipeline.

  • fan-in on inputs (an array of FPBaseData: a,b,mid)
  • 2-stage multiplier pipeline
  • fan-out on outputs (an array of FPPackData: z,mid)

Fan-in and Fan-out are combinatorial.

class ieee754.fcvt.pipeline.FPCVTFtoIntBasePipe(modkls, e_extra, in_pspec, out_pspec)

Bases: nmutil.singlepipe.ControlBase

elaborate(platform)

handles case where stage has dynamic ready/valid functions

class ieee754.fcvt.pipeline.FPCVTMuxInOutBase(modkls, e_extra, in_width, out_width, num_rows, op_wid=0, pkls=<class 'ieee754.fcvt.pipeline.FPCVTBasePipe'>)

Bases: nmutil.concurrentunit.ReservationStations

Reservation-Station version of FPCVT pipeline.

  • fan-in on inputs (an array of FPBaseData: a,b,mid)
  • converter pipeline (alu)
  • fan-out on outputs (an array of FPPackData: z,mid)

Fan-in and Fan-out are combinatorial.

class ieee754.fcvt.pipeline.SignedOp

Bases: object

eq(i)
ieee754.fcvt.pipeline.getkls(*args, **kwargs)

ieee754.fcvt.upsize module

class ieee754.fcvt.upsize.FPCVTUpConvertMod(in_pspec, out_pspec)

Bases: nmutil.pipemodbase.PipeModBase

FP up-conversion (lower to higher bitwidth)

elaborate(platform)
ispec()
ospec()

Module contents