URL
https://opencores.org/ocsvn/instruction_list_pipelined_processor_with_peripherals/instruction_list_pipelined_processor_with_peripherals/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 9 |
Rev 10 |
Line 68... |
Line 68... |
print FILE_V "\n\n\t\t\tdefault\t:\tcode = 15'b111111111111111;";
|
print FILE_V "\n\n\t\t\tdefault\t:\tcode = 15'b111111111111111;";
|
print FILE_V "\n\t\tendcase\nend\n\nendmodule\n";
|
print FILE_V "\n\t\tendcase\nend\n\nendmodule\n";
|
|
|
|
|
|
|
sub bin2hex {
|
|
my $bin = shift;
|
|
|
|
# Make input bit string a multiple of 4
|
|
#$bin = substr("0000",length($bin)%4) . $bin if length($bin)%4;
|
|
|
|
my ($hex, $nybble) = ("");
|
|
while (length($bin)) {
|
|
($nybble,$bin) = (substr($bin,0,4), substr($bin,4)); # (substr($bin,0,4), substr($bin,4));
|
|
#substr extracts a substring . . .
|
|
$nybble = eval "0b$nybble";
|
|
$hex .= substr("0123456789ABCDEF", $nybble, 1);
|
|
}
|
|
return $hex;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##############
|
##############
|
# getOpcode
|
# getOpcode
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.