NumberConfig#

class NumberConfig#

A class to define the configuration of a number when represented in memory.

static bit() pyhelayers.NumberConfig#

Builds a configuration describing a 1-bit number.

static fixed_point(size: pyhelayers.NumberSize, sign: pyhelayers.NumberSigned, fractional_part_bits: int) pyhelayers.NumberConfig#

Builds a configuration describing a fraction represented by fixed point.

Parameters:
  • size – The size of the number.

  • sign – Whether the number is signed or not.

  • fractional_part_bits – The number of bits allocated to the fractional part of the number.

static floating_point(size: pyhelayers.NumberSize) pyhelayers.NumberConfig#

Builds a configuration describing a fraction represented by floating point.

Parameters:

size – The size of the number.

static integer(size: pyhelayers.NumberSize, sign: pyhelayers.NumberSigned) pyhelayers.NumberConfig#

Builds a configuration describing an integer.

Parameters:
  • size – The size of the number.

  • sign – Whether the number is signed or not.