Clean up VHDL debug messages

This won't produce so many useless messages, and the messages
produced should be more relevant.
This commit is contained in:
Nick Gasson 2009-01-17 14:02:25 +00:00 committed by Stephen Williams
parent f1f9274bb9
commit f9448b9dd7
2 changed files with 24 additions and 39 deletions

View File

@ -87,13 +87,12 @@ int draw_process(ivl_process_t proc, void *cd)
{ {
ivl_scope_t scope = ivl_process_scope(proc); ivl_scope_t scope = ivl_process_scope(proc);
if (!is_default_scope_instance(scope)) { if (!is_default_scope_instance(scope))
debug_msg("Ignoring process in %s", ivl_scope_name(scope)); return 0; // Ignore this process at it's not in a scope that
return 0; // we're using to generate code
}
debug_msg("Translating process in scope type %s (%s:%d)",
debug_msg("Translating process in %s (%s:%d)", ivl_scope_tname(scope), ivl_process_file(proc),
ivl_scope_name(scope), ivl_process_file(proc),
ivl_process_lineno(proc)); ivl_process_lineno(proc));
// A process should occur in a module scope, therefore it // A process should occur in a module scope, therefore it

View File

@ -351,7 +351,7 @@ vhdl_var_ref *nexus_to_var_ref(vhdl_scope *scope, ivl_nexus_t nexus)
*/ */
static void declare_logic(vhdl_arch *arch, ivl_scope_t scope) static void declare_logic(vhdl_arch *arch, ivl_scope_t scope)
{ {
debug_msg("Declaring logic in scope %s", ivl_scope_name(scope)); debug_msg("Declaring logic in scope type %s", ivl_scope_tname(scope));
int nlogs = ivl_scope_logs(scope); int nlogs = ivl_scope_logs(scope);
for (int i = 0; i < nlogs; i++) for (int i = 0; i < nlogs; i++)
@ -399,7 +399,7 @@ static string make_safe_name(ivl_signal_t sig)
*/ */
static void declare_signals(vhdl_entity *ent, ivl_scope_t scope) static void declare_signals(vhdl_entity *ent, ivl_scope_t scope)
{ {
debug_msg("Declaring signals in scope %s", ivl_scope_name(scope)); debug_msg("Declaring signals in scope type %s", ivl_scope_tname(scope));
int nsigs = ivl_scope_sigs(scope); int nsigs = ivl_scope_sigs(scope);
for (int i = 0; i < nsigs; i++) { for (int i = 0; i < nsigs; i++) {
@ -752,13 +752,11 @@ static int draw_skeleton_scope(ivl_scope_t scope, void *_unused)
{ {
static int depth = 0; static int depth = 0;
if (seen_this_scope_type(scope)) { if (seen_this_scope_type(scope))
debug_msg("Ignoring scope: %s", ivl_scope_name(scope)); return 0; // Already generated a skeleton for this scope type
return 0;
}
debug_msg("Initial visit to scope %s at depth %d", debug_msg("Initial visit to scope type %s at depth %d",
ivl_scope_name(scope), depth); ivl_scope_tname(scope), depth);
switch (ivl_scope_type(scope)) { switch (ivl_scope_type(scope)) {
case IVL_SCT_MODULE: case IVL_SCT_MODULE:
@ -783,11 +781,9 @@ static int draw_skeleton_scope(ivl_scope_t scope, void *_unused)
static int draw_all_signals(ivl_scope_t scope, void *_parent) static int draw_all_signals(ivl_scope_t scope, void *_parent)
{ {
if (!is_default_scope_instance(scope)) { if (!is_default_scope_instance(scope))
debug_msg("Ignoring scope: %s\n", ivl_scope_name(scope)); return 0; // Not interested in this instance
return 0;
}
if (ivl_scope_type(scope) == IVL_SCT_MODULE) { if (ivl_scope_type(scope) == IVL_SCT_MODULE) {
vhdl_entity *ent = find_entity(scope); vhdl_entity *ent = find_entity(scope);
assert(ent); assert(ent);
@ -803,11 +799,8 @@ static int draw_all_signals(ivl_scope_t scope, void *_parent)
*/ */
static int draw_functions(ivl_scope_t scope, void *_parent) static int draw_functions(ivl_scope_t scope, void *_parent)
{ {
if (!is_default_scope_instance(scope))
if (!is_default_scope_instance(scope)) { return 0; // Not interested in this instance
debug_msg("Ignoring scope: %s\n", ivl_scope_name(scope));
return 0;
}
ivl_scope_t parent = static_cast<ivl_scope_t>(_parent); ivl_scope_t parent = static_cast<ivl_scope_t>(_parent);
if (ivl_scope_type(scope) == IVL_SCT_FUNCTION) { if (ivl_scope_type(scope) == IVL_SCT_FUNCTION) {
@ -830,10 +823,8 @@ static int draw_functions(ivl_scope_t scope, void *_parent)
*/ */
static int draw_constant_drivers(ivl_scope_t scope, void *_parent) static int draw_constant_drivers(ivl_scope_t scope, void *_parent)
{ {
if (!is_default_scope_instance(scope)) { if (!is_default_scope_instance(scope))
debug_msg("Ignoring scope: %s\n", ivl_scope_name(scope)); return 0; // Not interested in this instance
return 0;
}
ivl_scope_children(scope, draw_constant_drivers, scope); ivl_scope_children(scope, draw_constant_drivers, scope);
@ -902,12 +893,8 @@ static int draw_constant_drivers(ivl_scope_t scope, void *_parent)
static int draw_all_logic_and_lpm(ivl_scope_t scope, void *_parent) static int draw_all_logic_and_lpm(ivl_scope_t scope, void *_parent)
{ {
if (!is_default_scope_instance(scope))
if (!is_default_scope_instance(scope)) { return 0; // Not interested in this instance
debug_msg("Ignoring scope: %s\n", ivl_scope_name(scope));
return 0;
}
if (ivl_scope_type(scope) == IVL_SCT_MODULE) { if (ivl_scope_type(scope) == IVL_SCT_MODULE) {
vhdl_entity *ent = find_entity(scope); vhdl_entity *ent = find_entity(scope);
@ -929,10 +916,9 @@ static int draw_hierarchy(ivl_scope_t scope, void *_parent)
if (ivl_scope_type(scope) == IVL_SCT_MODULE && _parent) { if (ivl_scope_type(scope) == IVL_SCT_MODULE && _parent) {
ivl_scope_t parent = static_cast<ivl_scope_t>(_parent); ivl_scope_t parent = static_cast<ivl_scope_t>(_parent);
if (!is_default_scope_instance(parent)) { if (!is_default_scope_instance(parent))
debug_msg("Ignoring scope: %s\n", ivl_scope_name(scope)); return 0; // Not generating code for the parent instance so
return 0; // don't generate for the child
}
vhdl_entity *ent = find_entity(scope); vhdl_entity *ent = find_entity(scope);
assert(ent); assert(ent);