Skip to content
Nic30 edited this page Dec 30, 2018 · 27 revisions

HWT in wider context of similar libraries

HWT design workflow

hwt_design_paths

Design is Unit instance (hilevel netlist). From this instance it is possible to generate target HDL/IPcore. Or it can be simulated.

HWT structure

  • hwt.interfaces - Collection of most essential interfaces like Signal, Clk, Rst, Rst_n...

  • hwt.serializer - Converters from internal representation to VHDL/Verilog/SystemC/IPcore/...

  • hwt.simulator - RTL based simulator and simulator utils.

  • hwt.synthesizer - Tools for generating of internal representation from HWT hw description.

  • hwt.code - Contains most of code operations used in HWT hw descriptions like:

    • If, Switch and other statements,
    • arithmetic operators and functions like slr, isPow2, log2ceil
  • hwt.hdl - Classes which representing hdl structures like Entity, Architecture, RtlSignal, hdl types, etc. Object of these classes we call internal representation of HWT. Most of this module is quite low level but there are some part which you will surely use:

    • hwt.hdl.typeShortcuts - this file contains definitions of most used hdl types which can be used in HWT hw descriptions
    • hwt.hdl.constants - Most used constants like Time, Direction, etc...
  • hwt.pyUtils - general purpose python utils

Structure hwt of type system

hwt_type_system_parts

HdlType definitions are stored in hwt.hdl.types. Operators and conversions are defined on HdlType class. This methods are called from RtlSignal/Signal/Value instances. HdlType instance is available in _dtype property of RtlSignal/Signal/Value. Each HdlType class has also specific Value class for example HdlType Bits has Value class BitsVal.

For user specified types may also require to specify serialization method for type and type value in serializer class.

HWToolkit tutorials

There are plenty of examples and real designs in hwtLib. Most simple have entry level documentation.

Simulation and verification

Clone this wiki locally