in reply to Re: Wrong Results in checking if hash value is defined or not
in thread Wrong Results in checking if hash value is defined or not
It Printed output as below.foreach my $net(@netLst){ //For debug foreach my $key_net (keys %{$moduleRef->{modRef}{$moduleName +}{ioRef}}) { print "IN: moduleName = $moduleName; net = $key_net; indx + = $moduleRef->{modRef}{$moduleName}{ioRef}{$key_net}{indx}\n"; } if($net =~ /\'/) {next;} elsif(defined ($moduleRef->{modRef}{$moduleName}{ioRef}{$net}) +) { print "$net is part of hash "; } //For debug foreach my $key_net (keys %{$moduleRef->{modRef}{$moduleName +}{ioRef}}) { print "OUT: moduleName = $moduleName; net = $key_net; ind +x = $moduleRef->{modRef}{$moduleName}{ioRef}{$key_net}{indx}\n"; } }
So here even though ts_500_gated_clk_buf was not part of the hash, it executed that loop and here on it added that hash with net ts_500_gated_clk_buf even though it wasn't intended. Thanks, SandeepIN: moduleName = msc_chan_reset; net = ch_rst_l; indx = 2 IN: moduleName = msc_chan_reset; net = data_in; indx = 3 IN: moduleName = msc_chan_reset; net = clk; indx = 0 IN: moduleName = msc_chan_reset; net = rst_l; indx = 1 IN: moduleName = msc_chan_reset; net = data_out; indx = 4 ts_500_gated_clk_buf is hash part of hash OUT: moduleName = msc_chan_reset; net = ch_rst_l; indx = 2 OUT: moduleName = msc_chan_reset; net = data_in; indx = 3 OUT: moduleName = msc_chan_reset; net = clk; indx = 0 OUT: moduleName = msc_chan_reset; net = ts_500_gated_clk_buf; indx = + OUT: moduleName = msc_chan_reset; net = rst_l; indx = 1 OUT: moduleName = msc_chan_reset; net = data_out; indx = 4 ####:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Wrong Results in checking if hash value is defined or not
by Eily (Monsignor) on Jun 30, 2017 at 09:51 UTC |