#!/usr/bin/perl
#This small perl script is to help in processing the 
#CAVS 3.3 test tool's vst .req files
#use is
# vsttest < reqfile > rspfile

#COUNT = 158
#b = 160
#XKey = fffffffffffffffffffffffffffffffffffffffe
#XSeed = 0000000000000000000000000000000000000000

while( <> ) {
	$done = 0;

	if( /Key1 = ([0-9a-f]+)$/ ) {
		$key1=$1;
		chomp $key1;
	} elsif( /Key2 = ([0-9a-f]+)$/ ) {
		$key2=$1;
		chomp $key1;
	} elsif( /DT = ([0-9a-f]+)$/ ) {
		$DT=$1;
		chomp $key1;
	} elsif( /V = ([0-9a-f]+)$/ ) {
		$V=$1;
		chomp $key1;
		$done = 1;
	} else {
		print;
	}

	if($done == 1) {
		system(( "./test931", $key1, $key2, $V, $DT, "10000" ));
	}
}

