Commit ff9848b8 authored by Théotime BOLLENGIER's avatar Théotime BOLLENGIER

bash-completion

parent c3498e2c
......@@ -102,21 +102,31 @@ this gem also include the `ruby_abc` executable script, which uses command line
```lang-none
$ ruby_abc --help
Usage: rubyabc_synthesis [options] -i <input_file> -o <output_file>
-i, --input FILE Input BLIF file
-o, --output FILE Output netlist to FILE
-r, --retime Retime netlist
-z, --zero Set latches initial value to zero
-l, --lcorr Computes latch correspondence using 1-step induction
-a, --area Optimize for area instead of performance (minimize the number of nodes instead of the logic level)
-w, --sweep Sweep logic network to remove dangling nodes
-k, --lut_inputs K Map to K-input LUTs.
-h, --help Display this help
Usage: ruby_abc [options] -i <input_file> -o <output_file>
-i, --input FILE Input file
-o, --output FILE Write processed netlist to FILE
-s, --sweep Sweep logic network to remove dangling nodes
-k, --lut_inputs K Map to K-input LUTs.
-a, --area Optimize in area
-r, --retime Retime netlist
-l, --lcorr Computes latch correspondence using 1-step induction
-z, --zero Set latches initial value to zero
-e, --echo Echo commands sent to ABC
-q, --quiet Do not print netlist statistics during synthesis
-h, --help Display this help
```
The *abc* executable is also included so that it can be used natively without ruby.
Bash completion
---------------
If you want to have bash completion in your terminal for the _ruby\_abc_ command,
copy the file [`share/bash_completion/ruby\_abc.bash-completion.sh`](share/bash_completion/ruby_abc.bash-completion.sh)
to your `/etc/bash\_completion.d/` directory.
Documentation
-------------
......
......@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
'bin/ruby_abc',
'test/test_ruby_abc.rb',
'test/generic_netlist.blif',
'share/bash_completion/ruby_abc.bash-completion.sh',
'ext/extconf.rb',
'ext/ruby_abc.c',
'ext/ruby_abc_wrapper.c',
......
# To get file completion with the ruby_abc command,
# this file should be writen as /etc/bash_completion.d/
__ruby_abc_completion()
{
local cur prev words cword
_init_completion || return
opts='--input --output --sweep --lut_inputs --area --retime --lcorr --zero --echo --quiet --help'
case $prev in
--input | -i | --output | -o)
COMPREPLY=($(compgen -f -o default -X '!*.blif' -- ${cur}))
;;
*)
COMPREPLY=($(compgen -W "$opts" -- ${cur}))
;;
esac
}
complete -F __ruby_abc_completion ruby_abc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment