-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathverilog_language.h
104 lines (76 loc) · 2.34 KB
/
verilog_language.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*******************************************************************\
Module:
Author: Daniel Kroening, [email protected]
\*******************************************************************/
#ifndef CPROVER_VERILOG_LANGUAGE_H
#define CPROVER_VERILOG_LANGUAGE_H
#include <util/options.h>
#include <langapi/language.h>
#include "verilog_parse_tree.h"
#include "verilog_scope.h"
class verilog_languaget:public languaget
{
public:
bool preprocess(
std::istream &,
const std::string &path,
std::ostream &,
message_handlert &) override;
bool
parse(std::istream &, const std::string &path, message_handlert &) override;
void dependencies(
const std::string &module,
std::set<std::string> &module_set) override;
void modules_provided(
std::set<std::string> &module_set) override;
bool interfaces(symbol_table_baset &, message_handlert &) override;
bool typecheck(
symbol_table_baset &,
const std::string &module,
message_handlert &) override;
void show_parse(std::ostream &, message_handlert &) override;
~verilog_languaget() override { }
bool from_expr(
const exprt &expr, std::string &code,
const namespacet &ns) override;
bool from_type(
const typet &type, std::string &code,
const namespacet &ns) override;
bool to_expr(
const std::string &code,
const std::string &module,
exprt &,
const namespacet &,
message_handlert &) override;
bool
generate_support_functions(symbol_table_baset &, message_handlert &) override
{
return false;
}
std::unique_ptr<languaget> new_language() override
{
return std::make_unique<verilog_languaget>();
}
std::string id() const override { return "Verilog"; }
std::string description() const override { return "Verilog"; }
std::set<std::string> extensions() const override
{
return { "v", "sv" };
}
void set_language_options(const optionst &, message_handlert &) override;
verilog_parse_treet &get_parse_tree()
{
return parse_tree;
}
verilog_languaget() : parse_tree(verilog_standardt::NOT_SET)
{
}
protected:
bool force_systemverilog = false;
bool vl2smv_extensions = false;
bool warn_implicit_nets = false;
std::list<std::string> initial_defines;
verilog_parse_treet parse_tree;
};
std::unique_ptr<languaget> new_verilog_language();
#endif