Hide the always_comb/latch TO event by not attaching it to a scope.

This commit is contained in:
Cary R 2018-01-01 21:17:45 -08:00
parent ca01385797
commit 24a4ec3bb2
3 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2017 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2018 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -495,8 +495,8 @@ bool vvp_net_resolv_list_s::resolve(bool mes)
// the compiler output instead of implicitly in this code.
assert(! vpip_peek_current_scope()->is_automatic());
t0_trigger_generated = true;
// Create an event with no name for the T0 trigger
compile_named_event(strdup(label()), strcpy(new char [1],""));
// Create a local event with no name for the T0 trigger
compile_named_event(strdup(label()), strcpy(new char [1],""), true);
tmp = vvp_net_lookup(label());
assert(tmp);
tmp->link(port);

View File

@ -1,7 +1,7 @@
#ifndef IVL_compile_H
#define IVL_compile_H
/*
* Copyright (c) 2001-2017 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2018 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -418,7 +418,7 @@ extern void compile_ufunc_vec4(char*label, char*code, unsigned wid,
*/
extern void compile_event(char*label, char*type,
unsigned argc, struct symb_s*argv);
extern void compile_named_event(char*label, char*type);
extern void compile_named_event(char*label, char*type, bool local_flag=false);
/*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2004-2018 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -829,7 +829,7 @@ static void compile_event_or(char*label, unsigned argc, struct symb_s*argv)
* inputs, it is only accessed by behavioral trigger statements, which
* in vvp are %set instructions.
*/
void compile_named_event(char*label, char*name)
void compile_named_event(char*label, char*name, bool local_flag)
{
vvp_net_t*ptr = new vvp_net_t;
@ -842,7 +842,7 @@ void compile_named_event(char*label, char*name)
}
define_functor_symbol(label, ptr);
compile_vpi_symbol(label, obj);
vpip_attach_to_current_scope(obj);
if (! local_flag) vpip_attach_to_current_scope(obj);
free(label);
delete[] name;