coreblocks.func_blocks.fu.fpu package

Submodules

coreblocks.func_blocks.fu.fpu.fpu_common module

class coreblocks.func_blocks.fu.fpu.fpu_common.Errors

Bases: IntFlag

DIVISION_BY_ZERO = 2
INEXACT = 16
INVALID_OPERATION = 1
OVERFLOW = 4
UNDERFLOW = 8
__new__(value)
class coreblocks.func_blocks.fu.fpu.fpu_common.FPUParams

Bases: object

FPU parameters

Parameters
sig_width: int

Width of significand, including implicit bit

exp_width: int

Width of exponent

__init__(*, sig_width: int = 24, exp_width: int = 8)
class coreblocks.func_blocks.fu.fpu.fpu_common.RoundingModes

Bases: Enum

ROUND_DOWN = 2
ROUND_NEAREST_AWAY = 4
ROUND_NEAREST_EVEN = 0
ROUND_UP = 3
ROUND_ZERO = 1

coreblocks.func_blocks.fu.fpu.fpu_error_module module

class coreblocks.func_blocks.fu.fpu.fpu_error_module.FPUErrorMethodLayout

Bases: object

FPU error checking module layouts for methods

Parameters
fpu_params: FPUParams

FPU parameters

__init__(*, fpu_params: FPUParams)

input_inf is a flag that comes from previous stage. Its purpose is to indicate that the infinity on input is a result of infinity arithmetic and not a result of overflow

class coreblocks.func_blocks.fu.fpu.fpu_error_module.FPUErrorModule

Bases: Elaboratable

FPU error checking module

Parameters
fpu_params: FPUParams

FPU rounding module parameters

Attributes
error_checking_request: Method

Transactional method for initiating error checking of a floating point number. Takes ‘error_in_layout’ as argument Returns final number and errors as ‘error_out_layout’

__init__(*, fpu_params: FPUParams)

coreblocks.func_blocks.fu.fpu.fpu_rounding_module module

class coreblocks.func_blocks.fu.fpu.fpu_rounding_module.FPURoudningMethodLayout

Bases: object

FPU Rounding module layouts for methods

Parameters
fpu_params: FPUParams

FPU parameters

__init__(*, fpu_params: FPUParams)
class coreblocks.func_blocks.fu.fpu.fpu_rounding_module.FPURounding

Bases: Elaboratable

FPU Rounding module

Parameters
fpu_params: FPUParams

FPU parameters

Attributes
rounding_request: Method

Transactional method for initiating rounding of a floating point number. Takes ‘rounding_in_layout’ as argument Returns rounded number and errors as ‘rounding_out_layout’

__init__(*, fpu_params: FPUParams)

Module contents