checkgamma.pl
713 Bytes
#!/usr/bin/perl
require "$ENV{'ROOT'}/PR/rdpsim/test/vi/OutData/vi_gamma/vi_gamma.pl";
while (<>)
{
next if !(/^[01]/);
chop;
($cgamma_enable, $cgamma_dither_enable, $crgb, $crand, $csync, $vgamma_rgb, $vgamma_sync) = split;
&vi_gamma($cgamma_enable, $cgamma_dither_enable, $crgb, $crand, $csync, $cgamma_rgb, $cgamma_sync);
# need to skip first few lines of output to get to valid values
if ($ValidLines++ >= 1)
{
if ($cgamma_rgb ne $vgamma_rgb)
{
printf("ERROR gamma, line $. (computed) $cgamma_rgb != (verilog) $vgamma_rgb \n");
}
if ($cgamma_sync ne $vgamma_sync)
{
printf("ERROR sync, line $. (current) $cgamma_sync != (next) $vgamma_sync \n");
}
}
}