ieee754.fpmul package

Submodules

ieee754.fpmul.align module

class ieee754.fpmul.align.FPAlignModSingle(pspec, e_extra=False)

Bases: nmutil.pipemodbase.PipeModBase

elaborate(platform)
ispec()
ospec()

ieee754.fpmul.datastructs module

IEEE754 Floating Point Multiplier Pipeline

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

class ieee754.fpmul.datastructs.FPMulStage0Data(pspec)

Bases: object

eq(i)

ieee754.fpmul.fmul module

ieee754.fpmul.mul0 module

IEEE754 Floating Point Multiplier Pipeline

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

class ieee754.fpmul.mul0.FPMulStage0Mod(pspec)

Bases: nmutil.pipemodbase.PipeModBase

elaborate(platform)
ispec()
ospec()

ieee754.fpmul.mul1 module

IEEE754 Floating Point Multiplier Pipeline

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

class ieee754.fpmul.mul1.FPMulStage1Mod(pspec)

Bases: nmutil.pipemodbase.PipeModBase

Second stage of mul: preparation for normalisation.

elaborate(platform)
ispec()
ospec()

ieee754.fpmul.mulstages module

class ieee754.fpmul.mulstages.FPMulStages(pspec)

Bases: nmutil.pipemodbase.PipeModBaseChain

get_chain()

ieee754.fpmul.pipeline module

IEEE754 Floating Point Multiplier Pipeline

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

Relevant bugreport: http://bugs.libre-riscv.org/show_bug.cgi?id=77

Stack looks like this:

  • scnorm - FPMulSpecialCasesDeNorm
  • mulstages - FPMulstages
  • normpack - FPNormToPack

scnorm - FPDIVSpecialCasesDeNorm ispec FPBaseData —— ospec FPSCData

StageChain: FPMULSpecialCasesMod,
FPAddDeNormMod FPAlignModSingle

mulstages - FPMulStages ispec FPSCData ——— ospec FPPostCalcData

StageChain: FPMulStage0Mod
FPMulStage1Mod

normpack - FPNormToPack ispec FPPostCalcData ——– ospec FPPackData

StageChain: Norm1ModSingle,
RoundMod, CorrectionsMod, PackMod

This is the current stack. FPMulStage0Mod is where the actual mantissa multiply takes place, which in the case of FP64 is a single (massive) combinatorial block. This can be fixed by using a multi-stage fixed-point multiplier pipeline, which was implemented in #60: http://bugs.libre-riscv.org/show_bug.cgi?id=60

class ieee754.fpmul.pipeline.FPMULBasePipe(pspec)

Bases: nmutil.singlepipe.ControlBase

elaborate(platform)

handles case where stage has dynamic ready/valid functions

class ieee754.fpmul.pipeline.FPMULMuxInOut(width, num_rows, op_wid=0)

Bases: nmutil.concurrentunit.ReservationStations

Reservation-Station version of FPMUL 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.

ieee754.fpmul.specialcases module

IEEE754 Floating Point Multiplier

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

class ieee754.fpmul.specialcases.FPMulSpecialCasesDeNorm(pspec)

Bases: nmutil.pipemodbase.PipeModBaseChain

special cases: NaNs, infs, zeros, denormalised

get_chain()

gets chain of modules

class ieee754.fpmul.specialcases.FPMulSpecialCasesMod(pspec)

Bases: nmutil.pipemodbase.PipeModBase

special cases: NaNs, infs, zeros, denormalised see “Special Operations” https://steve.hollasch.net/cgindex/coding/ieeefloat.html

elaborate(platform)
ispec()
ospec()

Module contents