3 hal_base_path =
"/home/simon/projects/hal/"
4 dir_path =
"/home/simon/playground/boolean_inf_test/netlists"
5 gate_library_path =
"/home/simon/projects/hal/plugins/gate_libraries/definitions/lsi_10k.hgl"
7 sys.path.append(hal_base_path +
"build/lib/")
8 os.environ[
"HAL_BASE_PATH"] = hal_base_path +
"build"
13 hal_py.plugin_manager.load_all_plugins()
15 from hal_plugins
import boolean_influence
19 files = glob.glob(dir_path +
'/**/netlist/*.v', recursive=
True)
25 print(
"Getting influences in netlist {}".format(file))
27 netlist = hal_py.NetlistFactory.load_netlist(file, gate_library_path)
29 for gate
in netlist.gates:
30 if gate.type.has_property(hal_py.GateTypeProperty.ff):
31 print(
"Gathering influences for gate {}".format(gate.id))
32 inf = boolean_influence.get_boolean_influences_of_gate(gate)
36 hal_py.plugin_manager.unload_all_plugins()