Merge branch 'primitive_redefinition' of https://github.com/thasti/iverilog
- make primitive redefinition a warning, not an error - make edge-sensitive ifnone a warning, not an error This allows Icarus to be used to simulate designs using third-party cell libraries that contain such things.
This commit is contained in:
commit
acdd78db7d
2
parse.y
2
parse.y
|
|
@ -5782,7 +5782,7 @@ specify_item
|
|||
pform_module_specify_path(tmp);
|
||||
}
|
||||
| K_ifnone specify_edge_path_decl ';'
|
||||
{ yyerror(@1, "Sorry: ifnone with an edge-sensitive path is "
|
||||
{ yywarn(@1, "Sorry: ifnone with an edge-sensitive path is "
|
||||
"not supported.");
|
||||
yyerrok;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ std::ostream& operator << (std::ostream&o, const YYLTYPE&loc)
|
|||
return o;
|
||||
}
|
||||
|
||||
void VLwarn(const char*msg)
|
||||
{
|
||||
warn_count += 1;
|
||||
cerr << yylloc.text << ":" << yylloc.first_line << ": " << msg << endl;
|
||||
}
|
||||
|
||||
void VLerror(const char*msg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ extern int VLlex();
|
|||
extern void VLerror(const char*msg);
|
||||
extern void VLerror(const YYLTYPE&loc, const char*msg, ...) __attribute__((format(printf,2,3)));
|
||||
#define yywarn VLwarn
|
||||
extern void VLwarn(const char*msg);
|
||||
extern void VLwarn(const YYLTYPE&loc, const char*msg);
|
||||
|
||||
extern void destroy_lexor();
|
||||
|
|
|
|||
2
pform.cc
2
pform.cc
|
|
@ -1847,7 +1847,7 @@ void pform_make_udp(perm_string name, list<perm_string>*parms,
|
|||
|
||||
// Put the primitive into the primitives table
|
||||
if (pform_primitives[name]) {
|
||||
VLerror("UDP primitive already exists.");
|
||||
VLwarn("UDP primitive already exists.");
|
||||
|
||||
} else {
|
||||
PUdp*udp = new PUdp(name, parms->size());
|
||||
|
|
|
|||
Loading…
Reference in New Issue