From a48825a604d776becc85ad147d7a767029364cf6 Mon Sep 17 00:00:00 2001 From: Peter Gadfort Date: Fri, 12 Apr 2024 13:57:29 -0400 Subject: [PATCH] add support for using ABCs library merging when providing multiple liberty files --- passes/techmap/abc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index 422879662..b33e1a17d 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -804,8 +804,10 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin for (std::string dont_use_cell : dont_use_cells) { dont_use_args += stringf("-X \"%s\" ", dont_use_cell.c_str()); } + bool first_lib = true; for (std::string liberty_file : liberty_files) { - abc_script += stringf("read_lib %s -w \"%s\" ; ", dont_use_args.c_str(), liberty_file.c_str()); + abc_script += stringf("read_lib %s %s -w \"%s\" ; ", dont_use_args.c_str(), first_lib ? "" : "-m", liberty_file.c_str()); + first_lib = false; } for (std::string liberty_file : genlib_files) abc_script += stringf("read_library \"%s\"; ", liberty_file.c_str());