CG_Gen::ArithmeticGenerator class

Base classes

class SimpleGenerator

Constructors, destructors, conversion operators

ArithmeticGenerator()
ArithmeticGenerator(uint_fast32_t i_seed)
ArithmeticGenerator(const GenerationParameters& i_param)

Public functions

auto generatorSummator(uint32_t i_bits, bool i_overflowIn, bool i_overflowOut, bool i_minus) -> GraphPtr
generatorSummator represents the generation of a combinational adder circuit.
auto generatorSubtractor(uint32_t i_bits, bool i_overflowIn, bool i_overflowOut, bool i_sub) -> GraphPtr
generatorComparison represents the generation of a combinational comparator circuit.
auto generatorMultiplier(uint32_t i_bits) -> GraphPtr
auto generatorSummator(const GenerationParameters& i_param) -> GraphPtr
auto generatorSubtractor(const GenerationParameters& i_param) -> GraphPtr
auto generatorMultiplier(const GenerationParameters& i_param) -> GraphPtr
auto generatorSummator() -> GraphPtr
auto generatorSubtractor() -> GraphPtr
auto generatorMultiplier() -> GraphPtr

Function documentation

GraphPtr CG_Gen::ArithmeticGenerator::generatorSummator(uint32_t i_bits, bool i_overflowIn, bool i_overflowOut, bool i_minus)

generatorSummator represents the generation of a combinational adder circuit.

Parameters
i_bits The number of bits, or in other words, input vertices (variables), which will be twice as many in the graph
i_overflowIn A Boolean flag indicating whether to create an additional input vertex (variable) in the graph at the beginning of generation
i_overflowOut A Boolean flag indicating whether to create an additional output vertex (variable) in the graph at the end of generation
i_minus A Boolean flag indicating whether it is worth adding logical vertices of type NOT to the graph to select a negative sum
Returns the created OrientedGraph

It is based on the arithmetic operation of addition in the decimal system and creates a graph of logical elements for its implementation. The number of bits fed into it is the length of the numbers that are converted from decimal to binary notation to implement the graph. Both the half-version and the full version are used as the basis of the generation.

GraphPtr CG_Gen::ArithmeticGenerator::generatorSubtractor(uint32_t i_bits, bool i_overflowIn, bool i_overflowOut, bool i_sub)

generatorComparison represents the generation of a combinational comparator circuit.

Parameters
i_bits The number of bits, or in other words, input vertices (variables), which will be twice as many in the graph
i_overflowIn
i_overflowOut
i_sub
Returns the created OrientedGraph

It is able to compare the submitted data in three variants: "equal", "less", "more". Reads the bits of numbers from larger to smaller, taking into account the significance of the higher bits. numbers that are converted from decimal to binary notation to implement the graph