Modules

A design is a tree of hardware modules. The Flow Overview walks a design through the flow; these pages are the reference for the modules themselves:

The older host-launched flow is under Legacy flows.


Table of contents

  • Hardware modules - The foundation both flows build on. A HwModule is a SimObj with typed ports and a behavior — the single source of truth for a hardware block, both the model you simulate and the source for a generated kernel. It is defined by three things: its endpoints, how it is wired, and what it does. The taxonomy then sorts the kinds and hands off to a flow: a plain HwModule is a simulation-only model, HostActivated maps to the sequential flow, and FreeRunMod (a leaf, or a composite of sub-components) maps to the concurrent flow. Kind is only one of three axes: kind is how the body is invoked (a class fact), hooks are how it is realized (kernel_task / bfm_model), and the cut decides which hook applies (a build choice).
  • Writing a free-running module - How to describe a free-running module in Python: a LEAF implements run_iter (one firing) and a COMPOSITE has sub-components wired by internal interfaces — body XOR children, never both. Covers what one firing means, why there is no before-the-loop, how to carry state across firings with add_state, and how a composite declares only its boundary port names.
  • Developing module by module - How a design of several modules is developed one module at a time. Any module in a design's tree can be run alone: harness(module) makes it the DUT of its own HwSystem, with a stand-in at each port generated from the port's type, each with an RTL twin, so the harness runs in pysim and at RTL. The pages: the harness and its stand-ins (streams, credit streams, memory-master ports, a memory's own slave port) and workload(kind); reading what a harness recorded (sinks, the memory's arena, arrival and acceptance cycles); hostile stand-ins (StandInPolicy, add_robustness_steps); calibrating a module in its harness; composing a parent from its units' records, checked against the parent's RTL, and incremental builds.
  • XSI simulation components - The concurrent flow uses two simulations: a Python discrete-event simulation for system-level modeling, and an XSI simulation that runs the real RTL cycle by cycle. This page is the big picture of the second: an XSI simulation top made of the RTL top (what will be synthesized) and a testbench of C++ bus-functional models, the three ways an object can be realized in it, and where each kind of pysim object usually lands.
  • Parameterization - Parameterizing a HwModule (both flows). The family is one axis — when does the value bind — with four points: HwConst at class definition, HwParam at build (so distinct values mean distinct artifacts), DynParam at init/pre-sim, and a regmap register at runtime. The last two share one artifact across every value. param_supports declares a set of HwParam values to emit as kernel variants; its C++ realization is comp_codegen/templating.
  • Toward the board - What follows either simulation flow when a system goes to a board: its parts packaged as Vivado IP, one per device, and wired in a block design from the same spec as the XSI system top. Packaging and synthesis mode are independent choices: a block design of device IPs can be synthesized globally (one run, best area, fastest cold build: the default for a bitstream) or per device (each part's number its own, an incremental change cheap: for design-space exploration). Built through a validated block design; the processor, the board and the bitstream come next.