hwtLib.examples.statements package

Module dedicated for example usages of hwt statements.

Submodules

hwtLib.examples.statements.codeBlockStm module

class hwtLib.examples.statements.codeBlockStm.BlockStm_complete_override0(hdlName: str | None = None)[source]

Bases: HwModule

__annotations__ = {}
class hwtLib.examples.statements.codeBlockStm.BlockStm_complete_override1(hdlName: str | None = None)[source]

Bases: BlockStm_complete_override0

__annotations__ = {}
class hwtLib.examples.statements.codeBlockStm.BlockStm_complete_override2(hdlName: str | None = None)[source]

Bases: BlockStm_complete_override0

__annotations__ = {}
class hwtLib.examples.statements.codeBlockStm.BlockStm_nop_val(hdlName: str | None = None)[source]

Bases: BlockStm_nop_val_optimized_out

__annotations__ = {}
class hwtLib.examples.statements.codeBlockStm.BlockStm_nop_val_optimized_out(hdlName: str | None = None)[source]

Bases: BlockStm_complete_override0

__annotations__ = {}

hwtLib.examples.statements.constCondition module

class hwtLib.examples.statements.constCondition.ConstCondition(hdlName: str | None = None)[source]

Bases: HwModule

__annotations__ = {}
class hwtLib.examples.statements.constCondition.ConstConditionTC(methodName='runTest')[source]

Bases: SimTestCase

__annotations__ = {}
_classSetupFailed = False
_class_cleanups = []
classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_reg_update()[source]
hwtLib.examples.statements.constCondition.main()[source]

hwtLib.examples.statements.constDriver module

class hwtLib.examples.statements.constDriver.ConstDriverHwModule(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • out0 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • out1 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}

hwtLib.examples.statements.forLoopCntrl module

class hwtLib.examples.statements.forLoopCntrl.StaticForLoopCntrl(hdlName: str | None = None)[source]

Bases: HwModule

HDL params:
  • ITERATIONS - default value 15 of type int

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

  • cntrl - of type hwt.hwIOs.std.HwIORdVldSync - SLAVE

  • index - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 4bits> - MASTER

  • body - of type hwt.hwIOs.std.HwIORdVldSync - MASTER

  • bodyBreak - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

schematic
__annotations__ = {}

hwtLib.examples.statements.fsm module

class hwtLib.examples.statements.fsm.FsmExample(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 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • dout - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 3bits> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.fsm.HadrcodedFsmExample(hdlName: str | None = None)[source]

Bases: FsmExample

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, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • dout - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 3bits> - MASTER

schematic
__annotations__ = {}

hwtLib.examples.statements.ifStm module

class hwtLib.examples.statements.ifStm.IfStatementPartiallyEnclosed(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE

  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatement(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatement2(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 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatement2b(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 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatement2c(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 - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 2bits> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatement3(hdlName: str | None = None)[source]

Bases: SimpleIfStatement

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatementMergable(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatementMergable1(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • e - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatementMergable2(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • d - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • e - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • f - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatementPartialOverride(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}
class hwtLib.examples.statements.ifStm.SimpleIfStatementPartialOverrideNopVal(hdlName: str | None = None)[source]

Bases: HwModule

HDL IO:
  • clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE

  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • e - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}

hwtLib.examples.statements.switchStm module

class hwtLib.examples.statements.switchStm.SwitchStmHwModule(hdlName: str | None = None)[source]

Bases: HwModule

Example which is using switch statement to create multiplexer

HDL IO:
  • sel - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 3bits> - SLAVE

  • out - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

schematic
__annotations__ = {}

hwtLib.examples.statements.vldMaskConflictsResolving module

class hwtLib.examples.statements.vldMaskConflictsResolving.VldMaskConflictsResolving(hdlName: str | None = None)[source]

Bases: HwModule

Example how invalid value of condition does not matter if it has no effect on result

HDL IO:
  • a - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • b - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - SLAVE

  • c - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

schematic
__annotations__ = {}