From: Jan Michel Date: Tue, 9 Jul 2013 13:52:09 +0000 (+0200) Subject: creates boards.ini X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=796217edf17c19c660ca09bae26baccef2f278bf;p=mvdsensorcontrol.git creates boards.ini --- diff --git a/setup/testsetup.xml b/setup/testsetup.xml index 3040bd0..c8787b6 100644 --- a/setup/testsetup.xml +++ b/setup/testsetup.xml @@ -4,7 +4,7 @@ name="Prototype" > The main MVD prototype system setup file - + new(line_numbers => 1); my $filename = $ARGV[0]; my $db = $parser->parse_file($filename); @@ -48,6 +49,7 @@ print STDERR "Loading setup $name from file $filename\n" if $verbose; foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) { print STDERR "Found controller id ".$curctrl->getAttribute('id')."\n" if $verbose; + $boardsini .= proto_boardsini($curctrl->getAttribute('name'),$curctrl->getAttribute('id'),$curctrl->getAttribute('address')); foreach my $curchain ($curctrl->findnodes('chain')) { print STDERR " Found chain id ".$curchain->getAttribute('id')."\n" if $verbose; foreach my $cursensor ($curchain->findnodes('sensor')) { @@ -69,6 +71,12 @@ foreach my $curctrl ($db->getDocumentElement->findnodes('controller')) { } +############################### +## Write ini files +############################### + + + ############################### ## Do whatever has to be done ############################### @@ -93,8 +101,36 @@ sub execute { +############################### +## Fill information to template ini files +############################### +sub proto_boardsini { + my ($name,$id,$addr) = @_; + $r = qq% +[$name] +chainsini=chains_board$id.ini +FPGAtrbnetAddr=0x$addr +CONFwaitstart_trbnetAddr=0xb007 +CONFtriginitseq_trbnetAddr=0xb003 +CONFtrigmapsstart_trbnetAddr=0xb00b +CONFtrigmapsreset_trbnetAddr=0xb00a +CONFtrigrunjtag_trbnetAddr=0xb00f +CONFtrigwriteonce_trbnetAddr=0xb014 +%; + return $r; +} + + + + + + + + print "\n"; +__END__ + =head1 NAME startup.pl - Run the necessary steps to configure and start MAPS sensors.