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
| Flag | Description |
|---|
verbose | Display compilation progress |
route_only | Stop after routing (no executable) |
json_only | Skip transport routing, intersection checks, region verification and coloring |
annotate | Add source annotations to the listing |
listing | Write the listing to listing.json |
portmap | Print transport routing |
skip_verify | Skip region verification |
merge_symbols | Merge duplicate symbol-map entries that lie on a regular fabric grid into one entry |
noroute | Skip transport routing |
time | Output timing report |
space | Output problem size info |
check_memory_divergence | Fail when variants of a code block produce different symbol tables |
Options
| Option | Description |
|---|
arch=sdr | Target architecture: sdr (Schrödinger) |
source=file.paint | Input source file |
image=file.img | Output executable image |
map=file.map | Output symbol map |
note=file.note | Output linker notes |
entrymap=file.entry | Output global bus protocol |
listing=file.json | Output listing |
debuginfo=file.json | Output source-level debug information; without annotate it holds only the tile map, with no kernel entries |
lib=directory | Add library search path (repeatable) |
ps=file.ps | Output floorplan PostScript |
portmap=file | Output transport routing |
regiondump=file | Dump region tree |
compiler=w,yeti | Source suffix priority for code() attachments (w, yeti) |
threads=N | Threads for intersection checks and kernel compiles (default 1) |
float16_dtype=10 | Format 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
| Constant | Value | Description |
|---|
R0 | 0 | No rotation |
R90 | 2 | 90° counter-clockwise: +X turns into +Y |
R180 | 4 | 180° |
R270 | 6 | 270° counter-clockwise: +X turns into −Y |
M0 | 1 | Mirror (horizontal flip) |
M90 | 3 | Mirror horizontally, then rotate 90° counter-clockwise |
M180 | 5 | Mirror horizontally, then rotate 180° |
M270 | 7 | Mirror horizontally, then rotate 270° counter-clockwise |
Direction constants
| Constant | Description |
|---|
RIGHT | East direction |
LEFT | West direction |
UP | +Y (south) |
DOWN | −Y (north) |
CENTER | PE compute element |
HORIZONTAL | 0 |
VERTICAL | 1 |