@@ -30,7 +30,7 @@ extern bool sv_mode;
30
30
}
31
31
YOSYS_NAMESPACE_END
32
32
33
- namespace systemverilog_plugin
33
+ namespace Synlig
34
34
{
35
35
36
36
using namespace ::Yosys;
@@ -75,7 +75,7 @@ static IdString enum_struct_item;
75
75
/* static*/ const IdString &UhdmAst::low_high_bound () { return attr_id::low_high_bound; }
76
76
/* static*/ const IdString &UhdmAst::is_elaborated_module () { return attr_id::is_elaborated_module; }
77
77
78
- #define MAKE_INTERNAL_ID (X ) IdString(" $systemverilog_plugin $" #X)
78
+ #define MAKE_INTERNAL_ID (X ) IdString(" $synlig $" #X)
79
79
80
80
void attr_id_init ()
81
81
{
@@ -88,6 +88,7 @@ void attr_id_init()
88
88
89
89
// Register IdStrings. Can't be done statically, as the IdString class uses resources created during Yosys initialization which happens after
90
90
// static initialization of the plugin when everything is statically linked.
91
+ // This applies only to Synlig compiled as plugin.
91
92
attr_id::partial = MAKE_INTERNAL_ID (partial);
92
93
attr_id::packed_ranges = MAKE_INTERNAL_ID (packed_ranges);
93
94
attr_id::unpacked_ranges = MAKE_INTERNAL_ID (unpacked_ranges);
@@ -149,7 +150,7 @@ static void delete_attribute(AST::AstNode *node, const IdString &attribute)
149
150
}
150
151
}
151
152
152
- // Delete all attributes that belong to the SV plugin .
153
+ // Delete all attributes that belong to the Synlig .
153
154
// The attributes beloning to Yosys are *not* deleted here.
154
155
static void delete_internal_attributes (AST::AstNode *node)
155
156
{
@@ -1371,7 +1372,7 @@ void resolve_children_reparent(AST::AstNode *current_node)
1371
1372
}
1372
1373
1373
1374
// A wrapper for Yosys simplify function.
1374
- // Simplifies AST constructs specific to this plugin to a form understandable by Yosys' simplify and then calls the latter if necessary.
1375
+ // Simplifies AST constructs specific to Synlig to a form understandable by Yosys' simplify and then calls the latter if necessary.
1375
1376
// Since simplify from Yosys has been forked to this codebase, all new code should be added there instead.
1376
1377
static void simplify_sv (AST::AstNode *current_node, AST::AstNode *parent_node)
1377
1378
{
@@ -1836,7 +1837,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h)
1836
1837
}
1837
1838
// handle vpiBinStrVal, vpiDecStrVal and vpiHexStrVal
1838
1839
if (val_str.find (' \' ' ) != std::string::npos) {
1839
- return ::systemverilog_plugin ::synlig_const2ast (std::move (val_str), caseType, false );
1840
+ return ::Synlig ::synlig_const2ast (std::move (val_str), caseType, false );
1840
1841
} else {
1841
1842
auto size = vpi_get (vpiSize, obj_h);
1842
1843
std::string size_str;
@@ -1852,7 +1853,7 @@ AST::AstNode *UhdmAst::process_value(vpiHandle obj_h)
1852
1853
size_str = " 1" ;
1853
1854
}
1854
1855
}
1855
- auto c = ::systemverilog_plugin ::synlig_const2ast (size_str + strValType + val_str, caseType, false );
1856
+ auto c = ::Synlig ::synlig_const2ast (size_str + strValType + val_str, caseType, false );
1856
1857
if (size <= 0 ) {
1857
1858
// unsized unbased const
1858
1859
c->is_unsized = true ;
@@ -2914,7 +2915,7 @@ void UhdmAst::process_enum_typespec()
2914
2915
}
2915
2916
if (current_node->str .empty ()) {
2916
2917
// anonymous typespec
2917
- std::string typedef_name = " $systemverilog_plugin $anonymous_enum" + std::to_string (shared.next_anonymous_enum_typedef_id ());
2918
+ std::string typedef_name = " $synlig $anonymous_enum" + std::to_string (shared.next_anonymous_enum_typedef_id ());
2918
2919
current_node->str = typedef_name;
2919
2920
uhdmast_assert (shared.current_top_node != nullptr );
2920
2921
move_type_to_new_typedef (shared.current_top_node , current_node);
@@ -3993,7 +3994,7 @@ void UhdmAst::process_stream_op()
3993
3994
// Get a prefix for internal identifiers.
3994
3995
const auto stream_op_id = shared.next_loop_id ();
3995
3996
const auto make_id_str = [stream_op_id](const char *suffix) {
3996
- return std::string (" $systemverilog_plugin $stream_op_" ) + std::to_string (stream_op_id) + " _" + suffix;
3997
+ return std::string (" $synlig $stream_op_" ) + std::to_string (stream_op_id) + " _" + suffix;
3997
3998
};
3998
3999
3999
4000
if (is_proc_ctx) {
@@ -5771,4 +5772,4 @@ void UhdmAst::report_error(const char *format, ...) const
5771
5772
}
5772
5773
}
5773
5774
5774
- } // namespace systemverilog_plugin
5775
+ } // namespace Synlig
0 commit comments