Duplicate ScalarSignal creation (signal & global) in VhdlEntity.
* Bug: In CRL Core, in VhdlEntity, when a scalar signal is also global, two ScalarSignal where created, but only one can be linked as a property on a Net. So when the one *not* linked as a property was deleted, an infinite loop started (under Cygwin at least). The _globals list now contains pointers to signals that are in _signals. The _globals elements no longer needs to be deleted.
This commit is contained in:
parent
fce97bb1d9
commit
12ac23713e
|
@ -132,9 +132,10 @@ namespace Vhdl {
|
|||
signal->addNet( index, net );
|
||||
_signals.insert( signal );
|
||||
} else {
|
||||
_signals.insert( new ScalarSignal(net) );
|
||||
ScalarSignal* signal = new ScalarSignal(net);
|
||||
_signals.insert( signal );
|
||||
if (net->isGlobal())
|
||||
_globals.insert( new ScalarSignal(net) );
|
||||
_globals.insert( signal );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +146,7 @@ namespace Vhdl {
|
|||
Entity::~Entity ()
|
||||
{
|
||||
for ( auto signal : _signals ) delete signal;
|
||||
for ( auto global : _globals ) delete global;
|
||||
//for ( auto global : _globals ) delete global;
|
||||
for ( auto ientity=_entities.begin() ; ientity!=_entities.end() ; ++ientity ) {
|
||||
if (*ientity == this) {
|
||||
_entities.erase( ientity );
|
||||
|
|
Loading…
Reference in New Issue