Logic
BitwiseAND4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise AND circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise AND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise AND circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise AND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseAND8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise AND circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise AND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise AND circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise AND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseAND16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise AND circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise AND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise AND circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise AND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNAND4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise NAND circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise NAND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise NAND circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise NAND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNAND8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise NAND circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise NAND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise NAND circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise NAND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNAND16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise NAND circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise NAND operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise NAND circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise NAND circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOR4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise NOR circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise NOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise NOR circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise NOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOR8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise NOR circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise NOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise NOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise NOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOR16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise NOR circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise NOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise NOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise NOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOT4
__init__
__init__(
input_bus,
output_bus
)
Construct a new 4-bit bitwise NOT circuit.
Args:
input_bus
: An object of typeBus4
. The input to the bitwise NOT operation.output_bus
: An object of typeBus4
. The output of the bitwise NOT operation.
Raises:
TypeError
: If eitherinput_bus
oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise NOT circuit.
input_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
input_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise NOT circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOT8
__init__
__init__(
input_bus,
output_bus
)
Construct a new 8-bit bitwise NOT circuit.
Args:
input_bus
: An object of typeBus8
. The input to the bitwise NOT operation.output_bus
: An object of typeBus8
. The output of the bitwise NOT operation.
Raises:
TypeError
: If eitherinput_bus
oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise NOT circuit.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
input_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise NOT circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseNOT16
__init__
__init__(
input_bus,
output_bus
)
Construct a new 16-bit bitwise NOT circuit.
Args:
input_bus
: An object of typeBus16
. The input to the bitwise NOT operation.output_bus
: An object of typeBus16
. The output of the bitwise NOT operation.
Raises:
TypeError
: If eitherinput_bus
oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise NOT circuit.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
input_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise NOT circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseOR4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise OR circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise OR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise OR circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise OR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseOR8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise OR circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise OR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise OR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise OR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseOR16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise OR circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise OR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise OR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise OR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXNOR4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise XNOR circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise XNOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise XNOR circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise XNOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXNOR8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise XNOR circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise XNOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise XNOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise XNOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXNOR16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise XNOR circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise XNOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise XNOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise XNOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXOR4
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 4-bit bitwise XOR circuit.
Args:
a_bus
: An object of typeBus4
. The first input.b_bus
: An object of typeBus4
. The second input.output_bus
: An object of typeBus4
. The output of the bitwise XOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit bitwise XOR circuit.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
output_bus: (0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 4-bit bitwise XOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXOR8
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 8-bit bitwise XOR circuit.
Args:
a_bus
: An object of typeBus8
. The first input.b_bus
: An object of typeBus8
. The second input.output_bus
: An object of typeBus8
. The output of the bitwise XOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit bitwise XOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 8-bit bitwise XOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
BitwiseXOR16
__init__
__init__(
a_bus,
b_bus,
output_bus
)
Construct a new 16-bit bitwise XOR circuit.
Args:
a_bus
: An object of typeBus16
. The first input.b_bus
: An object of typeBus16
. The second input.output_bus
: An object of typeBus16
. The output of the bitwise XOR operation.
Raises:
TypeError
: If eithera_bus
,b_bus
, oroutput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit bitwise XOR circuit.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
output_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
__call__
__call__(
a_bus=None,
b_bus=None,
output_bus=None
)
Force specific values on the wires of the 16-bit bitwise XOR circuit.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
Comparator3
__init__
__init__(
a_bus,
b_bus,
greater_than,
equal_to,
less_than
)
Construct a new 3-bit logical comparator.
Args:
a_bus
: An object of typeBus4
. The number to be compared.a_bus[1]
anda_bus[3]
are the most and least significant bit, respectively.a_bus[0]
is the sign bit.b_bus
: An object of typeBus4
. The number to be compared against.b_bus[1]
andb_bus[3]
are the most and least significant bit, respectively.b_bus[0]
is the sign bit.greater_than
: An object of typeWire
. The greater-than indicator.equal_to
: An object of typeWire
. The equal-to indicator.less_than
: An object of typeWire
. The less-than indicator.
Raises:
TypeError
: If eithera_bus
orb_bus
is not a bus of width 4.
__str__
Print out the wire values of the 3-bit logical comparator.
a_bus: (0, 0, 0, 0)
b_bus: (0, 0, 0, 0)
greater_than: 0
equal_to: 0
less_than: 0
__call__
__call__(
a_bus=None,
b_bus=None,
greater_than=None,
equal_to=None,
less_than=None
)
Force specific values on the wires of the 3-bit logical comparator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
Comparator7
__init__
__init__(
a_bus,
b_bus,
greater_than,
equal_to,
less_than
)
Construct a new 7-bit logical comparator.
Args:
a_bus
: An object of typeBus8
. The number to be compared.a_bus[1]
anda_bus[7]
are the most and least significant bit, respectively.a_bus[0]
is the sign bit.b_bus
: An object of typeBus8
. The number to be compared against.b_bus[1]
andb_bus[7]
are the most and least significant bit, respectively.b_bus[0]
is the sign bit.greater_than
: An object of typeWire
. The greater-than indicator.equal_to
: An object of typeWire
. The equal-to indicator.less_than
: An object of typeWire
. The less-than indicator.
Raises:
TypeError
: If eithera_bus
orb_bus
is not a bus of width 8.
__str__
Print out the wire values of the 7-bit logical comparator.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0)
greater_than: 0
equal_to: 0
less_than: 0
__call__
__call__(
a_bus=None,
b_bus=None,
greater_than=None,
equal_to=None,
less_than=None
)
Force specific values on the wires of the 7-bit logical comparator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
Comparator15
__init__
__init__(
a_bus,
b_bus,
greater_than,
equal_to,
less_than
)
Construct a new 15-bit logical comparator.
Args:
a_bus
: An object of typeBus16
. The number to be compared.a_bus[1]
anda_bus[15]
are the most and least significant bit, respectively.a_bus[0]
is the sign bit.b_bus
: An object of typeBus16
. The number to be compared against.b_bus[1]
andb_bus[15]
are the most and least significant bit, respectively.b_bus[0]
is the sign bit.greater_than
: An object of typeWire
. The greater-than indicator.equal_to
: An object of typeWire
. The equal-to indicator.less_than
: An object of typeWire
. The less-than indicator.
Raises:
TypeError
: If eithera_bus
orb_bus
is not a bus of width 16.
__str__
Print out the wire values of the 15-bit logical comparator.
a_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
b_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
greater_than: 0
equal_to: 0
less_than: 0
__call__
__call__(
a_bus=None,
b_bus=None,
greater_than=None,
equal_to=None,
less_than=None
)
Force specific values on the wires of the 15-bit logical comparator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityChecker4
__init__
__init__(
input_bus,
parity_bit,
error
)
Construct a new 4-bit even parity checker.
Args:
input_bus
: An object of typeBus4
. The input to the parity checker.parity_bit
: An object of typeWire
. The parity bit.error
: An object of typeWire
. The error indicator.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit even parity checker.
input_bus: (0, 0, 0, 0)
parity_bit: 0
error: 0
__call__
__call__(
input_bus=None,
parity_bit=None,
error=None
)
Force specific values on the wires of the 4-bit even parity checker.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityChecker8
__init__
__init__(
input_bus,
parity_bit,
error
)
Construct a new 8-bit even parity checker.
Args:
input_bus
: An object of typeBus8
. The input to the parity checker.parity_bit
: An object of typeWire
. The parity bit.error
: An object of typeWire
. The error indicator.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit even parity checker.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0)
parity_bit: 0
error: 0
__call__
__call__(
input_bus=None,
parity_bit=None,
error=None
)
Force specific values on the wires of the 8-bit even parity checker.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityChecker16
__init__
__init__(
input_bus,
parity_bit,
error
)
Construct a new 16-bit even parity checker.
Args:
input_bus
: An object of typeBus16
. The input to the parity checker.parity_bit
: An object of typeWire
. The parity bit.error
: An object of typeWire
. The error indicator.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit even parity checker.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
parity_bit: 0
error: 0
__call__
__call__(
input_bus=None,
parity_bit=None,
error=None
)
Force specific values on the wires of the 16-bit even parity checker.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityGenerator4
__init__
__init__(
input_bus,
parity_bit
)
Construct a new 4-bit even parity generator.
Args:
input_bus
: An object of typeBus4
. The input to the parity generator.parity_bit
: An object of typeWire
. The parity bit.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 4.
__str__
Print out the wire values of the 4-bit even parity generator.
input_bus: (0, 0, 0, 0)
parity_bit: 0
__call__
__call__(
input_bus=None,
parity_bit=None
)
Force specific values on the wires of the 4-bit even parity generator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityGenerator8
__init__
__init__(
input_bus,
parity_bit
)
Construct a new 8-bit even parity generator.
Args:
input_bus
: An object of typeBus8
. The input to the parity generator.parity_bit
: An object of typeWire
. The parity bit.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 8.
__str__
Print out the wire values of the 8-bit even parity generator.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0)
parity_bit: 0
__call__
__call__(
input_bus=None,
parity_bit=None
)
Force specific values on the wires of the 8-bit even parity generator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.
ParityGenerator16
__init__
__init__(
input_bus,
parity_bit
)
Construct a new 16-bit even parity generator.
Args:
input_bus
: An object of typeBus16
. The input to the parity generator.parity_bit
: An object of typeWire
. The parity bit.
Raises:
TypeError
: Ifinput_bus
is not a bus of width 16.
__str__
Print out the wire values of the 16-bit even parity generator.
input_bus: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
parity_bit: 0
__call__
__call__(
input_bus=None,
parity_bit=None
)
Force specific values on the wires of the 16-bit even parity generator.
Note that this method takes zero positional arguments; all values must be given as keyword arguments.