mirror of
https://github.com/YosysHQ/sby.git
synced 2026-05-15 08:45:33 +00:00
Docs: Clarify tasks section
Move simple tasks example into an actual `.sby` file and use `literalinclude`. Add `gen.sh` script for generating output log (currently using checked in log file so that we don't need to deal with having sby installed for readthedocs). Remove more complex examples. Remove "group aliases" in favor of "tags". Refer to `<tag>:` instead of `<taskname>:`. Introduce `--dumptags` and tasks being assigned a tag of the same name. Split out tags into subsection. Move "run specific task" example call in line, and add a task (so that it shows two tasks in one)
This commit is contained in:
parent
4297f6ed43
commit
b476597edf
4 changed files with 98 additions and 81 deletions
18
docs/examples/tags/example.log
Normal file
18
docs/examples/tags/example.log
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
$ sby --dumptasks example.sby
|
||||
task1
|
||||
task2
|
||||
task3
|
||||
$ sby --dumptags example.sby
|
||||
task1
|
||||
task2
|
||||
task3
|
||||
task_1_or_2
|
||||
task_1_or_3
|
||||
$ sby --dumptags example.sby task1
|
||||
task1
|
||||
task_1_or_2
|
||||
task_1_or_3
|
||||
$ sby --dumpcfg example.sby task1
|
||||
[options]
|
||||
mode bmc
|
||||
depth 100
|
||||
9
docs/examples/tags/example.sby
Normal file
9
docs/examples/tags/example.sby
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[tasks]
|
||||
task1 task_1_or_2 task_1_or_3
|
||||
task2 task_1_or_2
|
||||
task3 task_1_or_3
|
||||
|
||||
[options]
|
||||
task_1_or_2: mode bmc
|
||||
task3: mode prove
|
||||
~task3: depth 100
|
||||
28
docs/examples/tags/gen.sh
Executable file
28
docs/examples/tags/gen.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
sby="sby"
|
||||
script="example.sby"
|
||||
task="task1"
|
||||
|
||||
while getopts :s: opt; do
|
||||
case "$opt" in
|
||||
s)
|
||||
sby=$OPTARG
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [-s SBY command]\n" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# log our commands and output
|
||||
PS4="$ "
|
||||
exec > >(tee example.log) 2>&1
|
||||
set -x
|
||||
|
||||
$sby --dumptasks $script
|
||||
$sby --dumptags $script
|
||||
$sby --dumptags $script $task
|
||||
$sby --dumpcfg $script $task
|
||||
Loading…
Add table
Add a link
Reference in a new issue