| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| tools:interact:start [2026/03/12 09:38] – [Basic I/O commands] rajit | tools:interact:start [2026/03/12 09:46] (current) – [Global routing] rajit |
|---|
| |
| |
| ===== Standard built-in commands ===== | ===== Basic commands ===== |
| | |
| | ==== Standard built-ins ==== |
| |
| The following commands are built into the scripting framework: | The following commands are built into the scripting framework: |
| | quit | the same as ''exit'' | | | quit | the same as ''exit'' | |
| |
| ===== Basic I/O commands ===== | ==== Interacting with the user and environment ==== |
| |
| The following commands are used to interact with the environment, and for miscellaneous operations that are generic and not related to the ACT flow. | The following commands are used to interact with the environment, and for miscellaneous operations that are generic and not related to the ACT flow. |
| |
| Given that options parsing is a standard use-case, ''interact'' comes with a simple command-line parsing package. After calling ''getopt'', load the ''act-opt.scm'' package using ''load-scm''. The two key functions are ''act:get-options'' and ''act:remaining-args''. Look at [[https://github.com/asyncvlsi/interact/blob/main/scripts/aflat|aflat as a script]] for an example. The parsing package treats options without arguments as flags that are stored in variables, and options with arguments as options that are stored as a string. | Given that options parsing is a standard use-case, ''interact'' comes with a simple command-line parsing package. After calling ''getopt'', load the ''act-opt.scm'' package using ''load-scm''. The two key functions are ''act:get-options'' and ''act:remaining-args''. Look at [[https://github.com/asyncvlsi/interact/blob/main/scripts/aflat|aflat as a script]] for an example. The parsing package treats options without arguments as flags that are stored in variables, and options with arguments as options that are stored as a string. |
| | |
| | |
| | ==== Misc support functions ==== |
| | |
| | The Galois parallel programming system is used for multi-threaded execution of some of the ACT tools. |
| | The number of threads used can be dynamically set the number of active threads used for parallel execution. |
| | |
| | ^ Command ^ Meaning ^ |
| | | sys:nthreads <num> | set number of threads used by Galois runtime to <num> | |
| | | sys:end-galois | shutdown Galois runtime | |
| | |
| | File I/O is supported via file handles, which are integers corresponding to open files. |
| | |
| | ^ Command ^ Meaning ^ |
| | | sys:open <name> <mode> | open a file in the specified <mode> (r = read, w = write, a = append), and return handle | |
| | | sys:close <handle> | close file corresponding to the specified <handle> | |
| | |
| | A transcript of interact commands can be saved to a log file to make it easier to create an interact command script for re-use later. Note that interact's execution is deterministic, so this can be used to reproduce results. |
| | |
| | ^ Command ^ Meaning ^ |
| | | sys:log <name> | open a command log file called <name> | |
| | | sys:endlog | close the currently open log file | |
| | |
| | |
| ===== Technology parameters ===== | ===== Technology parameters ===== |
| |
| | tech:scale | similar to ''tech:uscale'', except it returns scale factor in units of nanometers | | | tech:scale | similar to ''tech:uscale'', except it returns scale factor in units of nanometers | |
| | tech:getpitch <layer> | returns pitch of metal layer <layer> | | | tech:getpitch <layer> | returns pitch of metal layer <layer> | |
| |
| |
| |
| ===== Configuration parameters ===== | ===== Configuration parameters ===== |
| |
| When the ''conf:set_{int,string,real}'' family of commands is used, reading a configuration file //will not// change the value of the configuration parameter. If instead the ''conf:set_default_{int,string,real}'' command is used, then its value can be changed by reading a configuration file. | When the ''conf:set_{int,string,real}'' family of commands is used, reading a configuration file //will not// change the value of the configuration parameter. If instead the ''conf:set_default_{int,string,real}'' command is used, then its value can be changed by reading a configuration file. |
| |
| |
| ===== Misc support functions ===== | |
| |
| The Galois parallel programming system is used for multi-threaded execution of some of the ACT tools. | |
| The number of threads used can be dynamically set the number of active threads used for parallel execution. | |
| |
| ^ Command ^ Meaning ^ | |
| | sys:nthreads <num> | set number of threads used by Galois runtime to <num> | | |
| | sys:end-galois | shutdown Galois runtime | | |
| |
| File I/O is supported via file handles, which are integers corresponding to open files. | |
| |
| ^ Command ^ Meaning ^ | |
| | sys:open <name> <mode> | open a file in the specified <mode> (r = read, w = write, a = append), and return handle | | |
| | sys:close <handle> | close file corresponding to the specified <handle> | | |
| |
| A transcript of interact commands can be saved to a log file to make it easier to create an interact command script for re-use later. Note that interact's execution is deterministic, so this can be used to reproduce results. | |
| |
| ^ Command ^ Meaning ^ | |
| | sys:log <name> | open a command log file called <name> | | |
| | sys:endlog | close the currently open log file | | |
| |
| |
| ===== ACT functions ===== | ===== ACT functions ===== |
| |
| ==== Circuit generation ==== | ==== Circuit generation ==== |
| | |
| | ckt:map - generate transistor-level description |
| | ckt:save-sp <file> - save SPICE netlist to <file> |
| | ckt:save-flatsp <file> - save flattened spice netlist to file after cell mapping |
| | ckt:mk-nets - preparation for DEF generation |
| | ckt:save-prs <file> - save flat production rule set to <file> for simulation |
| | ckt:save-lvp <file> - save flat production rule set to <file> for lvp |
| | ckt:save-sim <file-prefix> - save flat .sim/.al file |
| | ckt:save-vnet [-nocell] <file> - save Verilog netlist to <file> |
| |
| ==== Cell mapping ==== | ==== Cell mapping ==== |
| | |
| | ckt:cell-map [-l] - map gates to cell library; -l lists used cells |
| | ckt:cell-save <file> - save cells to file |
| | ckt:cell-addbuf <proc> <inst> <pin> <buf> - add buffer to the pin within the process |
| | ckt:cell-edit <proc> <inst> <newcell> - replace cell for instance within <proc> |
| | ckt:cell-update - take the design back to the clean state |
| | ckt:net->pins <net> - return pins that a net is connected to |
| | ckt:cell->pins <inst> - return pins for a cell |
| |
| ===== Timing and power analysis ===== | ===== Timing and power analysis ===== |
| | |
| | timer:lib-read <file> - read liberty timing file and return handle |
| | timer:lib-merge <lh> <file> - merge <file> into liberty file handle <lh> |
| | timer:time-units - returns string for time units |
| | timer:build-graph - build timing graph |
| | timer:tick <net1>+/- <net2>+/- - add a tick (iteration boundary) to the timing graph |
| | timer:add-constraint <root>+/- [*]<fast>[+/-] [*]<slow>[+/-] [margin] - add a timing fork constraint |
| | timer:init <l1> <l2> ... - initialize analysis engine with specified liberty handles |
| | timer:spef <file> - read in SPEF parasitics from <file> |
| | timer:phydb-link - link timer to phydb for timing-driven physical design flow |
| | timer:run - run timing analysis, and returns list (p M) |
| | timer:crit - show critical cycle |
| | timer:info <net> - display information about the net |
| | timer:constraint [<net>] - display information about all timing forks that involve <net> |
| | timer:num-constraints - returns the number of constraints in the design |
| | timer:get-violations - returns a list of constraint ids (cids) that have violations |
| | timer:check-constraint cid [ticks] - does a path analysis to check paths for timing fork #<cid> exist |
| | timer:get-slack cid - returns the slack of the violating constraint id #cid |
| | timer:get-witness cid - displays the witness for the violation |
| | timer:get-rise <net> - returns rise time for <net> |
| | timer:get-fall <net> - returns fall time for <net> |
| | timer:rise-violations <time> - returns a list of drivers that have rise time worse than <time> in timer units |
| | timer:fall-violations <time> - returns a list of drivers that have fall time worse than <time> in timer units |
| | timer:save <file> - save abstract timing graph to file in graphviz format |
| |
| ===== Physical database ===== | ===== Physical database ===== |
| | |
| | phydb:init - initialize physical database |
| | phydb:set-placement-grid <grid_value_x> <grid_value_y> - set placement grid |
| | phydb:read-lef <file> - read LEF and populate database |
| | phydb:get-used-lef - return list of macros used by the design |
| | phydb:read-def <file> - read DEF and populate database |
| | phydb:read-cell <file> - read CELL file and populate database |
| | phydb:read-techconfig <file> - read technology configuration file |
| | phydb:read-cluster <file> - read Cluster file and populate database |
| | phydb:get-columns - return a list of coordinates of columns in grid point coords |
| | phydb:get-gaps - return a list of coordinates of gaps in the minirows |
| | phydb:place-cell <cell-type> <llx> <lly> <N|FS> - add a new cell to a fixed location |
| | phydb:place-inst <inst> <llx> <lly> <N|FS> - place an instance at a fixed location |
| | phydb:add-io <iopin_name> <net_name> <direction> <use> - add a new I/O pin |
| | phydb:place-io <iopin_name> <metal_name> <lx> <ly> <ux> <uy> <placement_status> <x> <y> <orientation> - place an I/O pin at a fixed location |
| | phydb:write-def <file> - write DEF from database |
| | phydb:write-guide <file> - write GUIDE from database |
| | phydb:write-cluster <file> - write CLUSTER from database |
| | phydb:write-aux-rect <file> - write PP/NP cover and well rect files |
| | phydb:close - tear down physical database |
| |
| ===== Placement ===== | ===== Placement ===== |
| |
| ==== Partitioning ==== | ==== Partitioning ==== |
| | |
| | bipart:partition <file> [k] [depth] - compute a k-way partition (default 2) |
| |
| ==== Dali placer ==== | ==== Dali placer ==== |
| | |
| | dali:init <verbosity_level(0-5)> - initialize Dali placement engine |
| | dali:add-welltap <-cell cell_name -interval max_microns> [-checker_board] - add well-tap cell |
| | dali:place-design <target_density> [number_of_threads] - place design |
| | dali:place-io <metal_name> - place I/O pins |
| | dali:global-place <target_density> [number_of_threads] - global placement |
| | dali:refine-place <engine> - refine placement using an external placer |
| | dali:export-phydb - export placement to phydb |
| | dali:close - close Dali |
| |
| ===== Routing ===== | ===== Routing ===== |
| ==== Power detailed routing ==== | ==== Power detailed routing ==== |
| |
| ==== Global routing ==== | pwroute:init <verbose> -initialize pwroute engine <verbose> |
| | pwroute:set_parameters <reinforcement_width, reinforcement_step, cluster_mesh_width> - run pw route with mesh configuration. Default is <8, 16, 2> |
| | pwroute:set_reinforcement <bool>, enable/disable reinforcement connection (default: 1) |
| | pwroute:run run pwroute |
| | pwroute:export-phydb -export power and ground wires to phydb |
| | pwroute:close -close pwroute |
| |
| | ==== Global routing ==== |
| |
| | sproute:init initialize sproute engine |
| | sproute:set-num-threads set num threads, default = 1 |
| | sproute:set-algo Det/NonDet, default is NonDet |
| | sproute:set-max-iterations set max iterations of maze routing, default = 30 |
| | sproute:run run sproute |
| | sproute:close close sproute |
| |
| |
| |
| |