Improve SDF warnings to separate name and scope
Some of the SDF warnings were mixing some of the scope path with the instance name. These are now separated into just scope and instance name. There was also a place where vpi_get_str() was being called twice in a single print statement. This is illegal since vpi_get_str() uses a single buffer and multiple calls will overwrite the buffer.
This commit is contained in:
parent
c6cbaf3076
commit
e4476d544f
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2010 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2007-2014 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -101,7 +101,7 @@ void sdf_select_instance(const char*celltype, const char*cellinst)
|
||||||
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
||||||
(int)vpi_get(vpiLineNo, sdf_callh));
|
(int)vpi_get(vpiLineNo, sdf_callh));
|
||||||
vpi_printf("Unable to find %s in scope %s.\n",
|
vpi_printf("Unable to find %s in scope %s.\n",
|
||||||
cellinst, vpi_get_str(vpiFullName, scope));
|
src, vpi_get_str(vpiFullName, scope));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -110,16 +110,16 @@ void sdf_select_instance(const char*celltype, const char*cellinst)
|
||||||
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
||||||
(int)vpi_get(vpiLineNo, sdf_callh));
|
(int)vpi_get(vpiLineNo, sdf_callh));
|
||||||
vpi_printf("Scope %s in %s is not a module.\n",
|
vpi_printf("Scope %s in %s is not a module.\n",
|
||||||
cellinst, vpi_get_str(vpiFullName, sdf_scope));
|
src, vpi_get_str(vpiFullName, scope));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The matching scope (a module) should have the expected type. */
|
/* The matching scope (a module) should have the expected type. */
|
||||||
if (strcmp(celltype,vpi_get_str(vpiDefName,sdf_cur_cell)) != 0) {
|
if (strcmp(celltype,vpi_get_str(vpiDefName,sdf_cur_cell)) != 0) {
|
||||||
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
vpi_printf("SDF WARNING: %s:%d: ", vpi_get_str(vpiFile, sdf_callh),
|
||||||
(int)vpi_get(vpiLineNo, sdf_callh));
|
(int)vpi_get(vpiLineNo, sdf_callh));
|
||||||
vpi_printf("Module %s in %s is not a %s; it is an %s\n", cellinst,
|
vpi_printf("Module %s in %s is not a %s; it is a ", src,
|
||||||
vpi_get_str(vpiFullName, sdf_scope), celltype,
|
vpi_get_str(vpiFullName, scope), celltype);
|
||||||
vpi_get_str(vpiDefName, sdf_cur_cell));
|
vpi_printf("%s\n", vpi_get_str(vpiDefName, sdf_cur_cell));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue