checklerp.pl
647 Bytes
#!/usr/bin/perl
require "$ENV{'ROOT'}/PR/rdpsim/test/vi/OutData/vi_lerp/vivl.pl";
while (<>)
{
next if !(/^0x/);
chop;
($cfrac, $crgb_a, $crgb_b, $csync_a, $clerp_rgb, $clerp_sync) = split;
&vivl($cfrac, $crgb_a, $crgb_b, $csync_a, $olerp_rgb, $olerp_sync);
# need to skip first few lines of output to get to valid values
if ($ValidLines++ >= 1)
{
if ($olerp_rgb ne $clerp_rgb)
{
printf("ERROR lerp, line $. (computed) $olerp_rgb != (verilog) $clerp_rgb \n");
}
if ($olerp_sync ne $clerp_sync)
{
printf("ERROR sync, line $. (computed) $olerp_sync != (verilog) $clerp_sync \n");
}
}
}
#EOF