URL
https://opencores.org/ocsvn/instruction_list_pipelined_processor_with_peripherals/instruction_list_pipelined_processor_with_peripherals/trunk
Subversion Repositories instruction_list_pipelined_processor_with_peripherals
Compare Revisions
- This comparison shows the changes necessary to convert path
/instruction_list_pipelined_processor_with_peripherals/trunk/program_rom
- from Rev 9 to Rev 10
- ↔ Reverse comparison
Rev 9 → Rev 10
/romCreate.plx
70,26 → 70,8
|
|
|
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 |
|