Skip to main content

Command line and constants

27. Command-Line Options​

paint [source.paint] [flags] [options] [definitions]

A bare NAME.paint argument reads that file and names every output after it: NAME.img, NAME.map, NAME.note, NAME.entry, NAME-region.json, NAME-listing.json and NAME-debuginfo.json.

Flags​

FlagDescription
verboseDisplay compilation progress
route_onlyStop after routing (no executable)
json_onlySkip transport routing, intersection checks, region verification and coloring
annotateAdd source annotations to the listing
listingWrite the listing to listing.json
portmapPrint transport routing
skip_verifySkip region verification
merge_symbolsMerge duplicate symbol-map entries that lie on a regular fabric grid into one entry
norouteSkip transport routing
timeOutput timing report
spaceOutput problem size info
check_memory_divergenceFail when variants of a code block produce different symbol tables

Options​

OptionDescription
arch=sdrTarget architecture: sdr (Schrödinger)
source=file.paintInput source file
image=file.imgOutput executable image
map=file.mapOutput symbol map
note=file.noteOutput linker notes
entrymap=file.entryOutput global bus protocol
listing=file.jsonOutput listing
debuginfo=file.jsonOutput source-level debug information; without annotate it holds only the tile map, with no kernel entries
lib=directoryAdd library search path (repeatable)
ps=file.psOutput floorplan PostScript
portmap=fileOutput transport routing
regiondump=fileDump region tree
compiler=w,yetiSource suffix priority for code() attachments (w, yeti)
threads=NThreads for intersection checks and kernel compiles (default 1)
float16_dtype=10Format of the fabric adder's CE operand: 10 = F16 (Tungsten hp), 15 = BF16, 16 = CB16. Required with fabadder; no default

Definitions​

set VAR = value
set VAR = "(expression)"
toolname w carbide
toolflag w "wall"

toolname names the compiler that builds the sources with that suffix, and toolflag passes the compiler's own command-line terms. Paint compiles .w and .yeti sources with Carbide: pass toolname w carbide toolname yeti carbide, as the build system does.

With check_memory_divergence, paint compares each variant's symbol table with the first variant's, entry by entry in order: name, origin, fixup, read/write symbols, and each dimension's name, shape, stride and direction must agree. bench.map holds the symbols of a block's first variant.


28. Predefined Constants​

Rotation constants​

ConstantValueDescription
R00No rotation
R90290° counter-clockwise: +X turns into +Y
R1804180°
R2706270° counter-clockwise: +X turns into −Y
M01Mirror (horizontal flip)
M903Mirror horizontally, then rotate 90° counter-clockwise
M1805Mirror horizontally, then rotate 180°
M2707Mirror horizontally, then rotate 270° counter-clockwise

Direction constants​

ConstantDescription
RIGHTEast direction
LEFTWest direction
UP+Y (south)
DOWN−Y (north)
CENTERPE compute element
HORIZONTAL0
VERTICAL1