I was running a Perl script and I encountered the following result, instead of the answer I expected.
input HASH(0x17268bb0)
input HASH(0x172b3300)
input HASH(0x172b32a0)
Can anyone say what this is and how to rectify it?
This is my XML file here
<Root>
<Top name="ri_32">
<Module name="ALU">
<input name="power_control_bus"/>
<bidirection name="address_bus"/>
</Module>
<Module name="Power_control">
<input name="cpu_control_bus"/>
<output name="power_control_bus"/>
<bidirection name="address_bus"/>
</Module>
<input name="address"/>
<input name="clock"/>
<input name="data_in"/>
<output name="data_out"/>
<bidirection name="control"/>
</Top>
</Root>
I'm writing a Perl script which can be converted into a specific requirement (.v, .sv file)
use strict;
use XML::Simple;
use Data::Dumper;
my $xml_root = XMLin( './simodule.xml' );
my $root_top = $xml_root->{Top};
my $mod = $root_top->{Module};
print "Top $root_top->{name}\n";
my $top_in = $root_top->{input};
foreach my $namein ( keys %$top_in ) {
print " input $top_in->{$namein}\n";
}
my $top_ou = $root_top->{output};
foreach my $nameou ( keys %$top_ou ) {
print " output $top_ou->{$nameou}\n";
}
my $top_bi = $root_top->{bidirection};
foreach my $namebi ( keys %$top_bi ) {
print " bidirection $top_bi->{$namebi}\n";
}
output:
Top risc_32
input HASH(0x172b3300)
input HASH(0x172b32a0)
input HASH(0x17268bb0)
output data_out
bidirection control
Expected output
input address
input clock
input data_in
output data_out
bidirection control