hwtLib.examples.arithmetic package¶
Submodules¶
hwtLib.examples.arithmetic.cntr module¶
- class hwtLib.examples.arithmetic.cntr.Cntr(hdlName: str | None = None)[source]¶
Bases:
HwModule- HDL params:
DATA_WIDTH - default value 2 of type int
- HDL IO:
clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE
rst - of type hwt.hwIOs.std.HwIORst with dtype=<HBits, 1bit> - SLAVE
en - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE
val - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 2bits> - MASTER
- __annotations__ = {}¶
hwtLib.examples.arithmetic.multiplierBooth module¶
- class hwtLib.examples.arithmetic.multiplierBooth.MultiplierBooth(hdlName: str | None = None)[source]¶
Bases:
HwModuleAn implementation of Booth’s multiplication algorithm
max = 2 ** (DATA_WIDTH - 1) - 1 min = -1 * 2 ** (DATA_WIDTH - 1)
- HDL params:
DATA_WIDTH - default value 4 of type int
RESULT_WIDTH - default value None of type None
- HDL IO:
clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE
rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE
dataIn - of type hwtLib.examples.arithmetic.multiplierBooth.TwoOperandsHs - SLAVE
dataOut - of type hwt.hwIOs.std.HwIODataRdVld - MASTER
- __annotations__ = {}¶
hwtLib.examples.arithmetic.privateSignals module¶
hwtLib.examples.arithmetic.selfRefCntr module¶
- class hwtLib.examples.arithmetic.selfRefCntr.SelfRefCntr(hdlName: str | None = None)[source]¶
Bases:
HwModule- HDL IO:
clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE
rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE
dout - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 8bits, unsigned> - MASTER
- __annotations__ = {}¶
hwtLib.examples.arithmetic.twoCntrs module¶
- class hwtLib.examples.arithmetic.twoCntrs.TwoCntrs(hdlName: str | None = None)[source]¶
Bases:
HwModule- HDL IO:
clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE
rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE
a_en - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE
b_en - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE
eq - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER
ne - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER
lt - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER
gt - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER
- __annotations__ = {}¶
hwtLib.examples.arithmetic.vhdl_vector_auto_casts module¶
- class hwtLib.examples.arithmetic.vhdl_vector_auto_casts.VhdlVectorAutoCastExample(hdlName: str | None = None)[source]¶
Bases:
HwModule- __annotations__ = {}¶
- class hwtLib.examples.arithmetic.vhdl_vector_auto_casts.VhdlVectorAutoCastExampleTC(methodName='runTest')[source]¶
Bases:
BaseSerializationTC- __FILE__ = '/home/docs/checkouts/readthedocs.org/user_builds/hwtlib/checkouts/latest/hwtLib/examples/arithmetic/vhdl_vector_auto_casts.py'¶
- __annotations__ = {}¶
- _classSetupFailed = False¶
- _class_cleanups = []¶
hwtLib.examples.arithmetic.widthCasting module¶
- class hwtLib.examples.arithmetic.widthCasting.WidthCastingExample(hdlName: str | None = None)[source]¶
Bases:
HwModuleDemonstration of how HWT width conversions are serialized into HDL
- HDL IO:
clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE
rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE
a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 8bits> - SLAVE
b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 11bits> - SLAVE
c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 12bits> - MASTER
d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 8bits> - MASTER
- __annotations__ = {}¶