AddArray.c
OrdGroups.c
Represents a list of groups of variables. Each group is expected to be kept grouped at encoder level
utils.c
Utilities for encodings stuff

AddArray.c

By: Andrei Tchaltsev

See AlsoAddArray.h

()
converts a type from (actually used) array_t* to our artificial AddArray_ptr
()
converts a type from our artificial AddArray_ptr to (actually used) array_t*
AddArray_create()
constructor. Create an array of "number" ADDs
AddArray_from_word_number()
Creates a new AddArray from given WordNumber
AddArray_from_add()
given an ADD create an AddArray consisting of one element
AddArray_duplicate()
create a new AddArray, a copy of a given one
AddArray_destroy()
destructor of the class
AddArray_get_size()
returns the size (number of elements) of the array
AddArray_get_add()
This function returns the first element of the array
AddArray_get_n()
Returns the element number "n" from the array.
AddArray_get_array()
Returns the AddArray represented as an array of ADDs.
AddArray_get_add_size()
Returns the sum of the sizes of the ADDs within self
AddArray_set_n()
Sets the element number "number" to "add".
AddArray_word_apply_unary()
Applies unary operator to each bit of given argument, and returns resulting add array
AddArray_word_apply_binary()
Applies binary operator to each bits pair of given arguments, and returns resulting add array
AddArray_make_disjunction()
Returns an ADD that is the disjunction of all bits of arg
AddArray_make_conjunction()
Returns an ADD that is the conjunction of all bits of arg
AddArray_word_plus()
Perform the addition operations on two Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_minus()
Perform the subtraction operations on two Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unary_minus()
Changes the sign of the given word.
AddArray_word_times()
Perform the multiplication operations on two Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_divide()
Perform the division operations on two unsigned Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_mod()
Perform the remainder operations on two unsigned Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_divide()
Perform the division operations on two singed Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_mod()
Perform the remainder operations on two signed Word expressions represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_left_shift()
Performs left shift operations on a Word expression represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_right_shift()
Invokes add_array_word_right_shift with isSigned set to false
AddArray_word_signed_right_shift()
Invokes add_array_word_right_shift with isSigned set to true
AddArray_word_left_rotate()
Performs left rotate operations on a Word expression represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_right_rotate()
Performs right rotate operations on a Word expression represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_less()
Performs less-then operation on two unsigned Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_less_equal()
Performs less-or-equal operation on two unsigned Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_greater()
Performs greater-then operation on two unsigned Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_greater_equal()
Performs greater-or-equal operation on two unsigned Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_less()
Performs _signed_ less-then operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_less_equal()
Performs _signed_ less-equal-then operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_greater()
Performs _signed_ greater-then operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_greater_equal()
Performs _signed_ greater-equal-then operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_extend()
Extends the width of a signed Word expression keeping the value of the expression
AddArray_word_unsigned_extend()
Extends the width of an unsigned Word expression keeping the value of the expression
AddArray_word_equal()
Performs equal-operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_not_equal()
Performs not-equal-operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_ite()
Creates a ITE word array: {ITE(_if, _then[N-1
AddArray_word_bit_selection()
Performs bit-selection operation on a Word expression represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_signed_resize()
Performs signed resize operation on a Word expression represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_unsigned_resize()
Performs signed resize operation on a Word expression represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
AddArray_word_concatenation()
Performs concatenation operation on two Word expressions represented as arrays of ADD. Every ADD corresponds to a bit of a Word expression
add_array_full_adder()
Performes the full-adder operation on the arguments arg1, arg2 and carry_in. The returned sum-bit and carry-bit are returned in sum and carry_out.
add_array_adder()
Performes the addition of two Word expressions and a carry-in bit.
add_array_word_plus_negated_and_one()
Perform "arg1 + (not arg2) + 1" of two Word expressions represented as an array of ADD. This operation correspond to the subtraction operations.
add_array_unsigned_division_remainder()
Performs division operations on two unsigned Word expressions (which are encoded as arrays of bits)
add_array_signed_division_remainder_simple()
Performs division operations on two unsigned Word expressions (which are encoded as arrays of bits)
add_array_signed_division_remainder_hardware()
Performs division operations on two unsigned Word expressions (which are encoded as arrays of bits)
add_array_create_default_value_of_shift_operation()
Create an ADD of the default case in shift operations, i.e. ADD of ITE(nubmer >=0 && number <= width, zero, FAILURE).
add_array_negate_bits()
A function takes an array and negates every bit of it
add_array_word_extend()
Extends the width of a Word expression by padding the expression with a padding bit on the left (i.e. highest bits)
add_array_word_right_shift()
Performs right shift operations on a Word expression represented as an array of ADD. Every ADD corresponds to a bit of a Word expression
add_array_word_signed_comparison()
Private service
add_array_is_word()
Private service

OrdGroups.c

Represents a list of groups of variables. Each group is expected to be kept grouped at encoder level

By: Roberto Cavada

When the order of bool vars is important, a list of of groups of vars is returned. All vars appearing into a group should be grouped by the specific encoding

OrdGroups_create()
Class constructor
OrdGroups_copy()
Class copy constructor
OrdGroups_destroy()
Class destructor
OrdGroups_create_group()
Creates a new group, and returns the group ID for future reference
OrdGroups_add_variable()
Adds a new variable to the groups set.
OrdGroups_add_variables()
Adds a list of variable to the groups set.
OrdGroups_get_vars_in_group()
Returns the set of variables that belong to a given group
OrdGroups_get_var_group()
Given a var name, it returns the group that variable belongs to.
OrdGroups_get_size()
Returns the number of available groups
ord_groups_init()
Private class initializer
ord_groups_copy()
Private class copier
ord_groups_deinit()
Private deinitializer
ord_groups_allocate_new_group()
Creates a new group, and returns its ID
ord_groups_name_to_group()
Given a variable name, it returns the group that variable belongs to, or -1 if the variable has not been added.
ord_groups_associate_name_to_group()
Associates a var name to an existing group, but only if not already associated. An error occurs if the given name is already associated to a different group

utils.c

Utilities for encodings stuff

By: Roberto Cavada

enc_utils_parse_ordering_file()
Parses the given ordering file, and produces an OrdGroups instance.
enc_utils_create_vars_ord_groups()
Given a list of variables representing a new variable ordering, produces an OrdGroups instance.

Last updated on 2012/11/18 14h:37