Math2mat
|
Public Member Functions | |
final NumType | numType () |
boolean | useGenericSize () |
boolean | setSize (int size, int decimals) |
int | getSize () |
int | getDecimals () |
Protected Attributes | |
int | m_size |
int | m_decimals |
Package Functions | |
BuildingBlockFixed () |
This class represents the base class for a building block performing calculation on fixed point numbers. It allows to set the number of bits, as well as the number of decimal bits, in order to generate correct VHDL. By default, the VHDL components are considered to be generic.
Definition at line 12 of file BuildingBlockFixed.java.
m2m.backend.buildingblocks.BuildingBlockFixed.BuildingBlockFixed | ( | ) | [package] |
Default constructor, setting the data size to 16, and the number of decimal bits to 8.
Definition at line 18 of file BuildingBlockFixed.java.
int m2m.backend.buildingblocks.BuildingBlockFixed.getDecimals | ( | ) |
Returns the number of decimal bits used to represent the data.
Definition at line 73 of file BuildingBlockFixed.java.
int m2m.backend.buildingblocks.BuildingBlockFixed.getSize | ( | ) |
Returns the number of bits used to represent the data.
Definition at line 65 of file BuildingBlockFixed.java.
final NumType m2m.backend.buildingblocks.BuildingBlockFixed.numType | ( | ) | [virtual] |
Returns the numbers type (NumType.FIXED).
Implements m2m.backend.buildingblocks.BuildingBlock.
Definition at line 26 of file BuildingBlockFixed.java.
boolean m2m.backend.buildingblocks.BuildingBlockFixed.setSize | ( | int | size, |
int | decimals | ||
) |
Sets the size of the data, as well as the number of decimal bits.
size | Total size of the data |
decimals | number of decimal bits |
Definition at line 49 of file BuildingBlockFixed.java.
boolean m2m.backend.buildingblocks.BuildingBlockFixed.useGenericSize | ( | ) |
Indicates if the operands have a generic size or not. For fixed point data, the default is yes, as generic building blocks should be quite easy to describe.
Reimplemented from m2m.backend.buildingblocks.BuildingBlock.
Definition at line 37 of file BuildingBlockFixed.java.
int m2m.backend.buildingblocks.BuildingBlockFixed.m_decimals [protected] |
Number of decimal bits
Definition at line 85 of file BuildingBlockFixed.java.
int m2m.backend.buildingblocks.BuildingBlockFixed.m_size [protected] |
Data size
Definition at line 80 of file BuildingBlockFixed.java.