hwtLib.samples package

Subpackages

Submodules

hwtLib.samples.emptyUnitWithSpi module

class hwtLib.samples.emptyUnitWithSpi.EmptyUnitWithSpi[source]

Bases: hwt.synthesizer.interfaceLevel.emptyUnit.EmptyUnit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
class hwtLib.samples.emptyUnitWithSpi.EmptyUnitWithSpiTC(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_vhdl()[source]

hwtLib.samples.hdlComments module

class hwtLib.samples.hdlComments.SimpleComentedUnit[source]

Bases: hwt.synthesizer.unit.Unit

This is comment for SimpleComentedUnit entity, it will be rendered before entity as comment. Do not forget that class inheritance does apply for docstring as well.

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.hdlComments.SimpleComentedUnit2[source]

Bases: hwtLib.samples.hdlComments.SimpleComentedUnit

single line

class hwtLib.samples.hdlComments.SimpleComentedUnit3[source]

Bases: hwtLib.samples.hdlComments.SimpleComentedUnit2

dynamically generated, for example loaded from file or builded from unit content

hwtLib.samples.ipCoreCompatibleWrap module

class hwtLib.samples.ipCoreCompatibleWrap.ArrayIntfExample[source]

Bases: hwt.synthesizer.unit.Unit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr

hwtLib.samples.parametrization module

class hwtLib.samples.parametrization.ParametrizationExample[source]

Bases: hwt.synthesizer.unit.Unit

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr

hwtLib.samples.showcase0 module

class hwtLib.samples.showcase0.Showcase0[source]

Bases: hwt.synthesizer.unit.Unit

Every HW component class has to be derived from Unit class (any kind of inheritance supported)

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

_declr()[source]

In this function collecting of public interfaces is performed on every attribute assignment. Instances of Interface or Unit are recognized by Unit instance and are used as public interface of this unit.

Direction of interfaces is resolved by access from inside of this unit and you do not have to care about it.

_impl()[source]

Purpose of this method In this method all public interfaces and configuration has been made and they can not be edited.

hwtLib.samples.showcase0.foo(condition0, statements, condition1, fallback0, fallback1)[source]

Python functions used as macro

hwtLib.samples.simple module

class hwtLib.samples.simple.SimpleUnit[source]

Bases: hwt.synthesizer.unit.Unit

In order to create a new unit you have to make new class derived from Unit.

_declr()[source]

_declr() is like header of Unit. There you have to declare things which should be visible from outside.

_impl()[source]

_impl() is like body of unit. Logic and connections are specified i`qn this function.

hwtLib.samples.simple2withNonDirectIntConnection module

class hwtLib.samples.simple2withNonDirectIntConnection.Simple2withNonDirectIntConnection[source]

Bases: hwt.synthesizer.unit.Unit

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.simple2withNonDirectIntConnection.Simple2withNonDirectIntConnectionTC(methodName='runTest')[source]

Bases: hwt.simulator.simTestCase.SimTestCase

test_passData()[source]

hwtLib.samples.simpleAxiStream module

class hwtLib.samples.simpleAxiStream.SimpleUnitAxiStream[source]

Bases: hwt.synthesizer.unit.Unit

Example of unit with axi stream interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr

hwtLib.samples.simpleWithNonDirectIntConncetion module

class hwtLib.samples.simpleWithNonDirectIntConncetion.SimpleWithNonDirectIntConncetion[source]

Bases: hwt.synthesizer.unit.Unit

Example of fact that interfaces does not have to be only extern the can be used even for connection inside unit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.simpleWithNonDirectIntConncetion.SimpleWithNonDirectIntConncetionTC(methodName='runTest')[source]

Bases: hwt.simulator.simTestCase.SimTestCase

test_passData()[source]

hwtLib.samples.simpleWithParam module

class hwtLib.samples.simpleWithParam.SimpleUnitWithParam[source]

Bases: hwt.synthesizer.unit.Unit

Simple parametrized unit.

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.simpleWithParam.SimpleUnitWithParamTC(methodName='runTest')[source]

Bases: hwt.simulator.simTestCase.SimTestCase

test_canNotSetAfterSynth()[source]
test_simple()[source]

hwtLib.samples.timers module

class hwtLib.samples.timers.DynamicCounterInstancesExample[source]

Bases: hwt.synthesizer.unit.Unit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.timers.TimerInfoTest[source]

Bases: hwt.synthesizer.unit.Unit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
class hwtLib.samples.timers.TimerTC(methodName='runTest')[source]

Bases: hwt.simulator.simTestCase.SimTestCase

test_basic()[source]
test_dynamic_simple()[source]
class hwtLib.samples.timers.TimerTestUnit[source]

Bases: hwt.synthesizer.unit.Unit

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr

Module contents