OpenCores
URL https://opencores.org/ocsvn/bluespec-h264/bluespec-h264/trunk

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [test/] [hexfilegen.pl] - Blame information for rev 100

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jamey.hick
#!/usr/local/bin/perl
2
 
3
$outfilename = $ARGV[0];
4
$outfilename =~ s/\..*/\.hex/;
5
 
6
open(INF, $ARGV[0]) || die("\nCan't open $ARGV[0] for reading: $!\n");
7
open(OUTF, ">$outfilename") || die("\nCan't open $outfilename for writing: $!\n");
8
 
9
binmode INF;
10
 
11
$size = -s INF;
12
 
13
print "$size\n";
14
 
15
for($i=0; $i<$size; $i++)
16
{
17
    read (INF, $buffer, 1);
18
    $hex = unpack("H*",$buffer);
19
    print OUTF "$hex\n";
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.