File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ struct ModIndex : public RTLIL::Monitor
78
78
SigMap sigmap;
79
79
RTLIL::Module *module ;
80
80
std::map<RTLIL::SigBit, SigBitInfo> database;
81
+ int reload_counter;
81
82
int auto_reload_counter;
82
83
bool auto_reload_module;
83
84
@@ -106,6 +107,10 @@ struct ModIndex : public RTLIL::Monitor
106
107
107
108
void reload_module (bool reset_sigmap = true )
108
109
{
110
+ reload_counter++;
111
+ if (reload_counter % 10 == 0 )
112
+ log_warning (" ModIndex::reload_module() called %d times.\n " , reload_counter);
113
+
109
114
if (reset_sigmap) {
110
115
sigmap.clear ();
111
116
sigmap.set (module );
@@ -231,6 +236,7 @@ struct ModIndex : public RTLIL::Monitor
231
236
232
237
ModIndex (RTLIL::Module *_m) : sigmap(_m), module (_m)
233
238
{
239
+ reload_counter = 0 ;
234
240
auto_reload_counter = 0 ;
235
241
auto_reload_module = true ;
236
242
module ->monitors .insert (this );
Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ struct WreduceWorker
78
78
for (int i = GetSize (sig_y)-1 ; i >= 0 ; i--)
79
79
{
80
80
auto info = mi.query (sig_y[i]);
81
+ if (info == nullptr )
82
+ return ;
81
83
if (!info->is_output && GetSize (info->ports ) <= 1 && !keep_bits.count (mi.sigmap (sig_y[i]))) {
82
84
bits_removed.push_back (State::Sx);
83
85
continue ;
@@ -408,6 +410,8 @@ struct WreduceWorker
408
410
break ;
409
411
410
412
auto info = mi.query (bit);
413
+ if (info == nullptr )
414
+ return ;
411
415
if (info->is_output || GetSize (info->ports ) > 1 )
412
416
break ;
413
417
@@ -566,6 +570,10 @@ struct WreduceWorker
566
570
for (int i = GetSize (w)-1 ; i >= 0 ; i--) {
567
571
SigBit bit (w, i);
568
572
auto info = mi.query (bit);
573
+ if (info == nullptr ) {
574
+ unused_top_bits = 0 ;
575
+ break ;
576
+ }
569
577
if (info && (info->is_input || info->is_output || GetSize (info->ports ) > 0 ))
570
578
break ;
571
579
unused_top_bits++;
You can’t perform that action at this time.
0 commit comments