HAL  v4.5.0-254-g8f9f6a423
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
gate_library_parser.cpp
Go to the documentation of this file.
2 
3 #include <atomic>
4 
5 namespace hal
6 {
7  namespace
8  {
9  // parsers are created for a single parse each, so the outcome must outlive them
10  std::atomic<GateLibraryParser::ParseStatus> s_parse_status(GateLibraryParser::ParseStatus::NoError);
11  std::atomic<bool> s_upgrade_requested(false);
12  } // namespace
13 
15  {
16  s_parse_status = ParseStatus::UnknownError;
17  }
18 
20  {
21  s_upgrade_requested = false;
22  }
23 
25  {
26  return s_parse_status;
27  }
28 
30  {
31  s_upgrade_requested = true;
32  }
33 
35  {
36  s_parse_status = status;
37  }
38 
40  {
41  return s_upgrade_requested;
42  }
43 } // namespace hal
static void set_parse_status(ParseStatus status)
@ NoError
The gate library was parsed successfully.
@ UnknownError
Parsing failed for any other reason, or the parser does not report its status.
static ParseStatus get_parse_status()
Definition: defines.h:45