From 796217edf17c19c660ca09bae26baccef2f278bf Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 9 Jul 2013 15:52:09 +0200 Subject: [PATCH] creates boards.ini --- setup/testsetup.xml | 2 +- tools/startup.pl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) 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. -- 2.43.0