]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
creates boards.ini
authorJan Michel <j.michel@gsi.de>
Tue, 9 Jul 2013 13:52:09 +0000 (15:52 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 9 Jul 2013 13:52:09 +0000 (15:52 +0200)
setup/testsetup.xml
tools/startup.pl

index 3040bd0486717f142ae0773a105da8c25c6a9024..c8787b6d24f4e100fc96a449f99a484b4c5e49ee 100644 (file)
@@ -4,7 +4,7 @@
                name="Prototype"
                >
   <description>The main MVD prototype system setup file</description>
-  <controller address="f308" name="board01">
+  <controller id="0" address="f308" name="board01">
     <chain id="0" name="chain0">
       <sensor id="0" 
               serial="5"
index d8451f41d63906052a21f27fb4a4c200100772cb..f2b13a6739308608a446bc6c07e702882df406c1 100755 (executable)
@@ -40,6 +40,7 @@ unless (defined $ENV{'JTAGCONFIGPATH'}) {
 ## Read setup xml file
 ###############################  
 my @commands;
+my $boardsini;
 my $parser = XML::LibXML->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.