Allow labelled begin blocks to contain processes in VHDL target

This is a simple fix for a crash that occured when a process
was inside a labelled begin inside a generate statement.
(cherry picked from commit face1a1d15)
This commit is contained in:
Nick Gasson 2009-08-26 15:56:23 +01:00 committed by Stephen Williams
parent 902ae19bbf
commit 4e77abca44
1 changed files with 7 additions and 2 deletions

View File

@ -95,8 +95,13 @@ int draw_process(ivl_process_t proc, void *cd)
ivl_scope_tname(scope), ivl_process_file(proc),
ivl_process_lineno(proc));
// A process should occur in a module scope, therefore it
// should have already been assigned a VHDL entity
// Skip over any generate and begin scopes until we find
// the module that contains them - this is where we will
// generate the process
while (ivl_scope_type(scope) == IVL_SCT_GENERATE
|| ivl_scope_type(scope) == IVL_SCT_BEGIN)
scope = ivl_scope_parent(scope);
assert(ivl_scope_type(scope) == IVL_SCT_MODULE);
vhdl_entity *ent = find_entity(scope);
assert(ent != NULL);