2 # SymbiYosys (sby) -- Front-end for Yosys-based formal verification flows
4 # Copyright (C) 2016 Claire Xenia Wolf <claire@yosyshq.com>
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 from sby_core
import SbyTask
23 job
.handle_int_option("depth", 20)
24 job
.handle_int_option("append", 0)
26 for engine_idx
in range(len(job
.engines
)):
27 engine
= job
.engines
[engine_idx
]
28 assert len(engine
) > 0
30 job
.log(f
"""engine_{engine_idx}: {" ".join(engine)}""")
31 job
.makedirs(f
"{job.workdir}/engine_{engine_idx}")
33 if engine
[0] == "smtbmc":
34 import sby_engine_smtbmc
35 sby_engine_smtbmc
.run("cover", job
, engine_idx
, engine
)
37 elif engine
[0] == "btor":
38 import sby_engine_btor
39 sby_engine_btor
.run("cover", job
, engine_idx
, engine
)
42 job
.error(f
"Invalid engine '{engine[0]}' for cover mode.")