HAL
liberty_parser.cpp
Go to the documentation of this file.
1 #include "netlist_test_utils.h"
7 #include <filesystem>
8 
9 namespace hal {
10 
11  class LibertyParserTest : public ::testing::Test {
12  protected:
13  virtual void SetUp() {
14  test_utils::init_log_channels();
15  }
16 
17  virtual void TearDown() {
18  }
19  };
20 
26  TEST_F(LibertyParserTest, check_combinatorial) {
27  TEST_START
28  {
29  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/test1.lib";
30  LibertyParser liberty_parser;
31  auto gl_res = liberty_parser.parse(path_lib);
32  ASSERT_TRUE(gl_res.is_ok());
33  std::unique_ptr<GateLibrary> gl = gl_res.get();
34 
35  ASSERT_NE(gl, nullptr);
36 
37  // Check that the name of the Gate library
38  EXPECT_EQ(gl->get_name(), "TEST_GATE_LIBRARY");
39 
40  // Check that the Gate type was created
41  auto gate_types = gl->get_gate_types();
42  ASSERT_EQ(gate_types.size(), 1);
43  auto gt_it = gate_types.find("TEST_GATE_TYPE");
44  ASSERT_TRUE(gt_it != gate_types.end());
45  GateType* gt = gt_it->second;
46  EXPECT_EQ(gt->get_properties(), std::set<GateTypeProperty>({GateTypeProperty::combinational}));
47 
48  // Check the pins
49  const auto pins = gt->get_pins();
50  ASSERT_EQ(pins.size(), 4);
51  {
52  const auto* vdd_pin = pins.at(0);
53  EXPECT_EQ(vdd_pin->get_id(), 1);
54  EXPECT_EQ(vdd_pin->get_name(), "VDD");
55  EXPECT_EQ(vdd_pin->get_direction(), PinDirection::input);
56  EXPECT_EQ(vdd_pin->get_type(), PinType::power);
57  }
58  {
59  const auto* gnd_pin = pins.at(1);
60  EXPECT_EQ(gnd_pin->get_id(), 2);
61  EXPECT_EQ(gnd_pin->get_name(), "GND");
62  EXPECT_EQ(gnd_pin->get_direction(), PinDirection::input);
63  EXPECT_EQ(gnd_pin->get_type(), PinType::ground);
64  }
65  {
66  const auto* i_pin = pins.at(2);
67  EXPECT_EQ(i_pin->get_id(), 3);
68  EXPECT_EQ(i_pin->get_name(), "I");
69  EXPECT_EQ(i_pin->get_direction(), PinDirection::input);
70  EXPECT_EQ(i_pin->get_type(), PinType::none);
71  }
72  {
73  const auto* o_pin = pins.at(3);
74  EXPECT_EQ(o_pin->get_id(), 4);
75  EXPECT_EQ(o_pin->get_name(), "O");
76  EXPECT_EQ(o_pin->get_direction(), PinDirection::output);
77  EXPECT_EQ(o_pin->get_type(), PinType::none);
78  }
79 
80  // Check the Boolean functions
81  ASSERT_TRUE(gt->get_boolean_functions().find("O") != gt->get_boolean_functions().end());
82  EXPECT_EQ(gt->get_boolean_functions().at("O"), BooleanFunction::Var("I"));
83  ASSERT_TRUE(gt->get_boolean_functions().find("O_undefined") != gt->get_boolean_functions().end()); // x_function
84  EXPECT_EQ(gt->get_boolean_functions().at("O_undefined"), BooleanFunction::from_string("!I").get());
85 
86  // Components
87  ASSERT_EQ(gt->get_components().size(), 0);
88  }
89  TEST_END
90  }
91 
97  TEST_F(LibertyParserTest, check_flip_flop) {
98  TEST_START
99  {
100  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/test3.lib";
101  LibertyParser liberty_parser;
102  auto gl_res = liberty_parser.parse(path_lib);
103  ASSERT_TRUE(gl_res.is_ok());
104  std::unique_ptr<GateLibrary> gl = gl_res.get();
105 
106  ASSERT_NE(gl, nullptr);
107 
108  // Check that the Gate type was created
109  auto gate_types = gl->get_gate_types();
110  ASSERT_EQ(gate_types.size(), 1);
111  auto gt_it = gate_types.find("TEST_FF");
112  ASSERT_TRUE(gt_it != gate_types.end());
113  GateType* gt = gt_it->second;
114  EXPECT_EQ(gt->get_properties(), std::set<GateTypeProperty>({GateTypeProperty::sequential, GateTypeProperty::ff}));
115 
116  // Check the pins
117  const auto pins = gt->get_pins();
118  ASSERT_EQ(pins.size(), 8);
119  {
120  const auto* clk_pin = pins.at(0);
121  EXPECT_EQ(clk_pin->get_id(), 1);
122  EXPECT_EQ(clk_pin->get_name(), "CLK");
123  EXPECT_EQ(clk_pin->get_direction(), PinDirection::input);
124  EXPECT_EQ(clk_pin->get_type(), PinType::clock);
125  }
126  {
127  const auto* ce_pin = pins.at(1);
128  EXPECT_EQ(ce_pin->get_id(), 2);
129  EXPECT_EQ(ce_pin->get_name(), "CE");
130  EXPECT_EQ(ce_pin->get_direction(), PinDirection::input);
131  }
132  {
133  const auto* d_pin = pins.at(2);
134  EXPECT_EQ(d_pin->get_id(), 3);
135  EXPECT_EQ(d_pin->get_name(), "D");
136  EXPECT_EQ(d_pin->get_direction(), PinDirection::input);
137  }
138  {
139  const auto* r_pin = pins.at(3);
140  EXPECT_EQ(r_pin->get_id(), 4);
141  EXPECT_EQ(r_pin->get_name(), "R");
142  EXPECT_EQ(r_pin->get_direction(), PinDirection::input);
143  }
144  {
145  const auto* s_pin = pins.at(4);
146  EXPECT_EQ(s_pin->get_id(), 5);
147  EXPECT_EQ(s_pin->get_name(), "S");
148  EXPECT_EQ(s_pin->get_direction(), PinDirection::input);
149  }
150  {
151  const auto* q_pin = pins.at(5);
152  EXPECT_EQ(q_pin->get_id(), 6);
153  EXPECT_EQ(q_pin->get_name(), "Q");
154  EXPECT_EQ(q_pin->get_direction(), PinDirection::output);
155  EXPECT_EQ(q_pin->get_type(), PinType::state);
156  }
157  {
158  const auto* qn_pin = pins.at(6);
159  EXPECT_EQ(qn_pin->get_id(), 7);
160  EXPECT_EQ(qn_pin->get_name(), "QN");
161  EXPECT_EQ(qn_pin->get_direction(), PinDirection::output);
162  EXPECT_EQ(qn_pin->get_type(), PinType::neg_state);
163  }
164  {
165  const auto* o_pin = pins.at(7);
166  EXPECT_EQ(o_pin->get_id(), 8);
167  EXPECT_EQ(o_pin->get_name(), "O");
168  EXPECT_EQ(o_pin->get_direction(), PinDirection::output);
169  }
170 
171  // Check the Boolean functions
172  ASSERT_TRUE(gt->get_boolean_functions().find("Q") != gt->get_boolean_functions().end());
173  EXPECT_EQ(gt->get_boolean_functions().at("Q"), BooleanFunction::from_string("IQ").get());
174  ASSERT_TRUE(gt->get_boolean_functions().find("QN") != gt->get_boolean_functions().end());
175  EXPECT_EQ(gt->get_boolean_functions().at("QN"), BooleanFunction::from_string("IQN").get());
176  ASSERT_TRUE(gt->get_boolean_functions().find("O") != gt->get_boolean_functions().end());
177  EXPECT_EQ(gt->get_boolean_functions().at("O"), BooleanFunction::from_string("S & R & D").get());
178 
179  // Components
180  ASSERT_EQ(gt->get_components().size(), 2);
181  const FFComponent* ff_component = gt->get_component_as<FFComponent>([](const GateTypeComponent* c){ return FFComponent::is_class_of(c); });
182  ASSERT_NE(ff_component, nullptr);
183  const StateComponent* state_component = gt->get_component_as<StateComponent>([](const GateTypeComponent* c){ return StateComponent::is_class_of(c); });
184  ASSERT_NE(state_component, nullptr);
185 
186  EXPECT_EQ(ff_component->get_next_state_function(), BooleanFunction::Var("D"));
187  EXPECT_EQ(ff_component->get_clock_function(), BooleanFunction::Var("CLK"));
188  EXPECT_EQ(ff_component->get_async_reset_function(), BooleanFunction::Var("R"));
189  EXPECT_EQ(ff_component->get_async_set_function(), BooleanFunction::Var("S"));
190  EXPECT_EQ(ff_component->get_async_set_reset_behavior(), std::make_pair(AsyncSetResetBehavior::L, AsyncSetResetBehavior::H));
191  EXPECT_EQ(state_component->get_state_identifier(), "IQ");
192  EXPECT_EQ(state_component->get_neg_state_identifier(), "IQN");
193  }
194  TEST_END
195  }
196 
202  TEST_F(LibertyParserTest, check_latch) {
203  TEST_START
204  {
205  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/test4.lib";
206  LibertyParser liberty_parser;
207  auto gl_res = liberty_parser.parse(path_lib);
208  ASSERT_TRUE(gl_res.is_ok());
209  std::unique_ptr<GateLibrary> gl = gl_res.get();
210 
211  ASSERT_NE(gl, nullptr);
212 
213  // Check that the Gate type was created
214  auto gate_types = gl->get_gate_types();
215  ASSERT_EQ(gate_types.size(), 1);
216  auto gt_it = gate_types.find("TEST_LATCH");
217  ASSERT_TRUE(gt_it != gate_types.end());
218  GateType* gt = gt_it->second;
219  EXPECT_EQ(gt->get_properties(), std::set<GateTypeProperty>({GateTypeProperty::sequential, GateTypeProperty::latch}));
220 
221  // Check the pins
222  const auto pins = gt->get_pins();
223  ASSERT_EQ(pins.size(), 7);
224  {
225  const auto* g_pin = pins.at(0);
226  EXPECT_EQ(g_pin->get_id(), 1);
227  EXPECT_EQ(g_pin->get_name(), "G");
228  EXPECT_EQ(g_pin->get_direction(), PinDirection::input);
229  }
230  {
231  const auto* d_pin = pins.at(1);
232  EXPECT_EQ(d_pin->get_id(), 2);
233  EXPECT_EQ(d_pin->get_name(), "D");
234  EXPECT_EQ(d_pin->get_direction(), PinDirection::input);
235  }
236  {
237  const auto* s_pin = pins.at(2);
238  EXPECT_EQ(s_pin->get_id(), 3);
239  EXPECT_EQ(s_pin->get_name(), "S");
240  EXPECT_EQ(s_pin->get_direction(), PinDirection::input);
241  }
242  {
243  const auto* r_pin = pins.at(3);
244  EXPECT_EQ(r_pin->get_id(), 4);
245  EXPECT_EQ(r_pin->get_name(), "R");
246  EXPECT_EQ(r_pin->get_direction(), PinDirection::input);
247  }
248  {
249  const auto* q_pin = pins.at(4);
250  EXPECT_EQ(q_pin->get_id(), 5);
251  EXPECT_EQ(q_pin->get_name(), "Q");
252  EXPECT_EQ(q_pin->get_direction(), PinDirection::output);
253  EXPECT_EQ(q_pin->get_type(), PinType::state);
254  }
255  {
256  const auto* qn_pin = pins.at(5);
257  EXPECT_EQ(qn_pin->get_id(), 6);
258  EXPECT_EQ(qn_pin->get_name(), "QN");
259  EXPECT_EQ(qn_pin->get_direction(), PinDirection::output);
260  EXPECT_EQ(qn_pin->get_type(), PinType::neg_state);
261  }
262  {
263  const auto* o_pin = pins.at(6);
264  EXPECT_EQ(o_pin->get_id(), 7);
265  EXPECT_EQ(o_pin->get_name(), "O");
266  EXPECT_EQ(o_pin->get_direction(), PinDirection::output);
267  }
268 
269  // Check the Boolean functions
270  ASSERT_TRUE(gt->get_boolean_functions().find("Q") != gt->get_boolean_functions().end());
271  EXPECT_EQ(gt->get_boolean_functions().at("Q"), BooleanFunction::from_string("IQ").get());
272  ASSERT_TRUE(gt->get_boolean_functions().find("QN") != gt->get_boolean_functions().end());
273  EXPECT_EQ(gt->get_boolean_functions().at("QN"), BooleanFunction::from_string("IQN").get());
274  ASSERT_TRUE(gt->get_boolean_functions().find("O") != gt->get_boolean_functions().end());
275  EXPECT_EQ(gt->get_boolean_functions().at("O"), BooleanFunction::from_string("S & R & D").get());
276 
277  // Components
278  ASSERT_EQ(gt->get_components().size(), 2);
279  const LatchComponent* latch_component = gt->get_component_as<LatchComponent>([](const GateTypeComponent* c){ return LatchComponent::is_class_of(c); });
280  ASSERT_NE(latch_component, nullptr);
281  const StateComponent* state_component = gt->get_component_as<StateComponent>([](const GateTypeComponent* c){ return StateComponent::is_class_of(c); });
282  ASSERT_NE(state_component, nullptr);
283 
284  EXPECT_EQ(latch_component->get_data_in_function(), BooleanFunction::Var("D"));
285  EXPECT_EQ(latch_component->get_enable_function(), BooleanFunction::Var("G"));
286  EXPECT_EQ(latch_component->get_async_reset_function(), BooleanFunction::Var("R"));
287  EXPECT_EQ(latch_component->get_async_set_function(), BooleanFunction::Var("S"));
288  EXPECT_EQ(latch_component->get_async_set_reset_behavior(), std::make_pair(AsyncSetResetBehavior::N, AsyncSetResetBehavior::T));
289  EXPECT_EQ(state_component->get_state_identifier(), "IQ");
290  EXPECT_EQ(state_component->get_neg_state_identifier(), "IQN");
291  }
292  TEST_END
293  }
294 
300  TEST_F(LibertyParserTest, check_multiline_comment) {
301  TEST_START
302  {
303  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/test5.lib";
304  LibertyParser liberty_parser;
305  auto gl_res = liberty_parser.parse(path_lib);
306  ASSERT_TRUE(gl_res.is_ok());
307  std::unique_ptr<GateLibrary> gl = gl_res.get();
308 
309  ASSERT_NE(gl, nullptr);
310  // Check that the Gate type was created
311  auto gate_types = gl->get_gate_types();
312  ASSERT_EQ(gate_types.size(), 1);
313  auto gt_it = gate_types.find("TEST_GATE_TYPE");
314  ASSERT_TRUE(gt_it != gate_types.end());
315  GateType* gt = gt_it->second;
316 
317  // Check that only the pins outside the comments are created
318  const auto pins = gt->get_pins();
319  ASSERT_EQ(pins.size(), 5);
320  {
321  const auto* o0_pin = pins.at(0);
322  EXPECT_EQ(o0_pin->get_id(), 1);
323  EXPECT_EQ(o0_pin->get_name(), "I");
324  EXPECT_EQ(o0_pin->get_direction(), PinDirection::input);
325  }
326  {
327  const auto* o0_pin = pins.at(1);
328  EXPECT_EQ(o0_pin->get_id(), 2);
329  EXPECT_EQ(o0_pin->get_name(), "O0");
330  EXPECT_EQ(o0_pin->get_direction(), PinDirection::output);
331  }
332  {
333  const auto* o1_pin = pins.at(2);
334  EXPECT_EQ(o1_pin->get_id(), 3);
335  EXPECT_EQ(o1_pin->get_name(), "O1");
336  EXPECT_EQ(o1_pin->get_direction(), PinDirection::output);
337  }
338  {
339  const auto* o2_pin = pins.at(3);
340  EXPECT_EQ(o2_pin->get_id(), 4);
341  EXPECT_EQ(o2_pin->get_name(), "O2");
342  EXPECT_EQ(o2_pin->get_direction(), PinDirection::output);
343  }
344  {
345  const auto* g_pin = pins.at(4);
346  EXPECT_EQ(g_pin->get_id(), 5);
347  EXPECT_EQ(g_pin->get_name(), "O3");
348  EXPECT_EQ(g_pin->get_direction(), PinDirection::output);
349  }
350  }
351  TEST_END
352  }
353 
359  TEST_F(LibertyParserTest, check_invalid_input) {
360  TEST_START
361  {
362  // Pass an invalid input path
363  NO_COUT_TEST_BLOCK;
364  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/test_noexist.lib";
365  LibertyParser liberty_parser;
366  auto gl_res = liberty_parser.parse(path_lib);
367  ASSERT_TRUE(gl_res.is_error());
368  }
369  {
370  // For a ff, use an undefined clear_preset_var1 behaviour (not in {L,H,N,T,X})
371  NO_COUT_TEST_BLOCK;
372  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test1.lib";
373  LibertyParser liberty_parser;
374  auto gl_res = liberty_parser.parse(path_lib);
375  ASSERT_TRUE(gl_res.is_error());
376  }
377  {
378  // For a ff, use an undefined clear_preset_var2 behaviour (not in {L,H,N,T,X})
379  NO_COUT_TEST_BLOCK;
380  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test2.lib";
381  LibertyParser liberty_parser;
382  auto gl_res = liberty_parser.parse(path_lib);
383  ASSERT_TRUE(gl_res.is_error());
384  }
385  {
386  // For a latch, use an undefined clear_preset_var1 behaviour (not in {L,H,N,T,X})
387  NO_COUT_TEST_BLOCK;
388  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test3.lib";
389  LibertyParser liberty_parser;
390  auto gl_res = liberty_parser.parse(path_lib);
391  ASSERT_TRUE(gl_res.is_error());
392  }
393  {
394  // For a latch, use an undefined clear_preset_var1 behaviour (not in {L,H,N,T,X})
395  NO_COUT_TEST_BLOCK;
396  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test4.lib";
397  LibertyParser liberty_parser;
398  auto gl_res = liberty_parser.parse(path_lib);
399  ASSERT_TRUE(gl_res.is_error());
400  }
401 #if !defined (__APPLE__)
402  {
403  // Use a pin with an unknown direction (not in {input, output}) as an input pin
404  NO_COUT_TEST_BLOCK;
405  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test6.lib";
406  LibertyParser liberty_parser;
407  auto gl_res = liberty_parser.parse(path_lib);
408  ASSERT_TRUE(gl_res.is_error());
409  }
410 #endif
411  // { // NOTE: Works (is ok?)
412  // // Use an unknown variable in a boolean function
413  // NO_COUT_TEST_BLOCK;
414  // std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test7.lib";
415  // LibertyParser liberty_parser;
416  // std::unique_ptr<GateLibrary> gl = liberty_parser.parse(path_lib);
417 
418  // EXPECT_EQ(gl, nullptr); // NOTE: Ok? BF is parsed anyway with Variable WAMBO
419  // }
420  {
421  // Use an unknown cell group (should be filtered out)
422  NO_COUT_TEST_BLOCK;
423  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test8.lib";
424  LibertyParser liberty_parser;
425  auto gl_res = liberty_parser.parse(path_lib);
426  ASSERT_TRUE(gl_res.is_ok());
427  std::unique_ptr<GateLibrary> gl = gl_res.get();
428 
429  ASSERT_NE(gl, nullptr);
430 
431  auto gate_types = gl->get_gate_types();
432  ASSERT_TRUE(gate_types.find("TEST_GATE_TYPE") != gate_types.end());
433  EXPECT_EQ(gate_types.at("TEST_GATE_TYPE")->get_properties(), std::set<GateTypeProperty>({GateTypeProperty::combinational}));
434  }
435  {
436  // Define a pin twice
437  NO_COUT_TEST_BLOCK;
438  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test9.lib";
439  LibertyParser liberty_parser;
440  auto gl_res = liberty_parser.parse(path_lib);
441  ASSERT_TRUE(gl_res.is_error());
442 
443  }
444  {
445  // Define a Gate type twice
446  NO_COUT_TEST_BLOCK;
447  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test10.lib";
448  LibertyParser liberty_parser;
449  auto gl_res = liberty_parser.parse(path_lib);
450  ASSERT_TRUE(gl_res.is_error());
451  }
452  {
453  // Pin got no direction
454  NO_COUT_TEST_BLOCK;
455  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test11.lib";
456  LibertyParser liberty_parser;
457  auto gl_res = liberty_parser.parse(path_lib);
458  ASSERT_TRUE(gl_res.is_error());
459  }
460  {
461  // Test the usage of complex attributes
462  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test12.lib";
463  LibertyParser liberty_parser;
464  auto gl_res = liberty_parser.parse(path_lib);
465  ASSERT_TRUE(gl_res.is_ok());
466  std::unique_ptr<GateLibrary> gl = gl_res.get();
467 
468  ASSERT_NE(gl, nullptr);
469 
470  auto gate_types = gl->get_gate_types();
471  ASSERT_TRUE(gate_types.find("TEST_GATE_TYPE") != gate_types.end());
472  EXPECT_EQ(gate_types.at("TEST_GATE_TYPE")->get_properties(), std::set<GateTypeProperty>({GateTypeProperty::combinational}));
473  EXPECT_EQ(gate_types.at("TEST_GATE_TYPE")->get_output_pins().size(), 1);
474 
475  }
476  {
477  // Test empty pin names
478  std::string path_lib = utils::get_base_directory().string() + "/bin/hal_plugins/test-files/liberty_parser/invalid_test13.lib";
479  LibertyParser liberty_parser;
480  auto gl_res = liberty_parser.parse(path_lib);
481  ASSERT_TRUE(gl_res.is_error());
482  }
483  TEST_END
484  }
485 
486 } //namespace hal
static BooleanFunction Var(const std::string &name, u16 size=1)
static Result< BooleanFunction > from_string(const std::string &expression)
BooleanFunction get_clock_function() const
const std::pair< AsyncSetResetBehavior, AsyncSetResetBehavior > & get_async_set_reset_behavior() const
BooleanFunction get_async_set_function() const
static bool is_class_of(const GateTypeComponent *component)
BooleanFunction get_async_reset_function() const
BooleanFunction get_next_state_function() const
std::vector< GateTypeComponent * > get_components(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
Definition: gate_type.cpp:19
T * get_component_as(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
Definition: gate_type.h:89
std::set< GateTypeProperty > get_properties() const
Definition: gate_type.cpp:74
const std::unordered_map< std::string, BooleanFunction > & get_boolean_functions() const
Definition: gate_type.cpp:746
std::vector< GatePin * > get_pins(const std::function< bool(GatePin *)> &filter=nullptr) const
Definition: gate_type.cpp:210
BooleanFunction get_async_reset_function() const
static bool is_class_of(const GateTypeComponent *component)
const std::pair< AsyncSetResetBehavior, AsyncSetResetBehavior > & get_async_set_reset_behavior() const
BooleanFunction get_async_set_function() const
BooleanFunction get_enable_function() const
BooleanFunction get_data_in_function() const
Result< std::unique_ptr< GateLibrary > > parse(const std::filesystem::path &file_path) override
const std::string & get_state_identifier() const
static bool is_class_of(const GateTypeComponent *component)
const std::string & get_neg_state_identifier() const
std::filesystem::path get_base_directory()
Definition: utils.cpp:99
TEST_F(HGLParserTest, check_library)
Definition: hgl_parser.cpp:26
std::vector< PinInformation > pins