The Flow Dataflow Exporter (-tflow)¶
The flow code generator exports the elaborated design as a JSON dataflow database rather than a simulation or netlist artifact. The output describes the module hierarchy, the ports/parameters/signals of each module, and the dataflow graph (which processes and continuous assignments read and drive which nets), so that IDEs and analysis tools can render dataflow panels, browse the elaborated hierarchy, and trace input-to-output continuity across the design.
The emitted schema (flowtracer1.verilog.v0) is the Verilog companion
to the GHDL --flow exporter (flowtracer1.vhdl.v0), so a single
consumer works across Verilog (via this target) and VHDL (via GHDL)
designs.
USAGE¶
% iverilog -tflow -o<path>.flow <source files>...
The flow target runs at elaboration time; no simulation is performed.
The root module of the elaborated design becomes the top of the
exported database. Because the exporter reads the fully elaborated
netlist, parameter values, generate blocks, and instance bindings are
all resolved.
OUTPUT¶
The output is a single JSON object with these top-level fields:
schemaAlways
"flowtracer1.verilog.v0".topThe basename of the root module instance.
modulesOne entry per module type, each with
ports(name/direction/ type),generics(parameters),signals, the name-basedprocessesandassignments(withreads/drives/sensitivitygiven as signal names), and theinstancesit contains (withport_mapand resolvedgeneric_map).hierarchyThe elaborated instance tree. Each node carries its
port_map(formal-to-actual associations resolved through the shared net) andchildren. Generate blocks appear as transparent frames marked"scope": truewith agenerateobject describing the kind (for/if), label, and index.netsandcellsA secondary, integer-id dataflow graph:
netsare the canonical nexuses (withdrivers/loadsreferring to cell ids) andcellsare the processes, gates, LPM devices, and constants (withdrives/readsreferring to net ids, plusclockedandclock_net).
POSITIONS¶
Every pos / inst_pos is a compact string of byte offsets,
"start:begin:end", to help source-scanning consumers (such as Perl
lexers) locate constructs:
start – byte offset of the construct (first non-blank character of its line);
begin – byte offset of the
beginkeyword that opens a procedural or generate block – empty when there is none;end – byte offset of the closing
end/endmodulekeyword or the terminating;– empty for a plain point.
So a port or signal is "start::", a module is "start::end"
(module .. endmodule), an instance is "start::end" (.. ;),
and an always/initial block or generate frame is
"start:begin:end". Because the ivl_target API exposes only line
numbers, the exporter reads the source files and scans them (comment- and
string-aware) to recover these byte offsets and spans.
LIMITATIONS¶
Continuity through bit- and part-selects (for example a generate that
connects .d(bus[i])) is not yet represented at the individual-bit
level; whole-signal connections are tracked.
For a process sensitive to several edges (for example an
asynchronous-reset flip-flop @(posedge clk or posedge rst)), the
clock_net field reports the first edge signal.
Constant tie-offs and synthetic compiler temporaries are summarized rather than reported individually.