]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
adjusted compile script for adaptive lpf file generation for tdc constraints
authorCahit <c.ugur@gsi.de>
Fri, 23 Oct 2015 09:15:51 +0000 (11:15 +0200)
committerCahit <c.ugur@gsi.de>
Fri, 23 Oct 2015 09:15:51 +0000 (11:15 +0200)
32PinAddOn/config_compile_gsi.pl
scripts/compile.pl

index 746fe519c267d8ec6062452e5f7db58fb0a738bf..a8bacf45161784b8ef22e890da23432c7f73527a 100644 (file)
@@ -1,11 +1,13 @@
 TOPNAME                      => "trb3_periph_32PinAddOn",
 lm_license_file_for_synplify => "27000\@lxcad01.gsi.de",
 lm_license_file_for_par      => "1702\@hadeb05.gsi.de",
-lattice_path                 => '/opt/lattice/diamond/3.4_x64/',
+lattice_path                 => '/opt/lattice/diamond/3.5_x64/',
 synplify_path                => '/opt/synplicity/J-2014.09-SP2',
 #synplify_command             => "/opt/lattice/diamond/3.4_x64/bin/lin64/synpwrap -fg -options",
 synplify_command             => "/opt/synplicity/J-2014.09-SP2/bin/synplify_premier_dp",
 
+nodelist_file                => '../nodes_lxhadeb07.txt',
+
 #Include only necessary lpf files
 include_TDC                  => 1,
 include_GBE                  => 0,
@@ -13,5 +15,3 @@ include_GBE                  => 0,
 #Report settings
 firefox_open                 => 0,
 twr_number_of_errors         => 20,
-
-
index 13555d82ec92ef8ca386fec0a30d380004e91858..69ceadafb903304395b218c7776f0aa1c942631f 100755 (executable)
@@ -19,6 +19,7 @@ my $synplify_command             = $config{synplify_command};
 my $synplify_locale_workaround   = "en_US\@UTF-8";
 my $lattice_bin_path             = "$lattice_path/bin/lin64"; # note the lin/lin64 at the end, no isfgpa needed
 
+my $nodelist_file                = $config{nodelist_file};
 my $include_TDC                  = $config{include_TDC} || 0;
 my $include_GBE                  = $config{include_GBE} || 0;
 my $include_CTS                  = $config{include_CTS} || 0;
@@ -123,7 +124,56 @@ if($include_TDC && $include_CTS==0) {
   system("cat tdc_release/tdc_constraints_64.lpf >> $WORKDIR/$TOPNAME.lpf");
   system("cat tdc_release/unimportant_lines_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
   system("cat unimportant_lines_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
+
+  #change the Ring buffer name in the constraints file according to the config.vhd
+  my $fh = new FileHandle("<config.vhd");
+  my @a = <$fh>;
+  $fh -> close;
+  my $ringbuffersize = 5;
+    
+    foreach (@a)
+    {
+       if(/constant\s*RING_BUFFER_SIZE/)
+       {
+           my $tmp = $1 if $_ =~ /(:=.*;)/;
+           $ringbuffersize = $1 if $1 =~ /(\d+)/;
+       }
+    }
+
+
+  my @newline;
+  $fh = new FileHandle("<$WORKDIR/$TOPNAME".".lpf");
+  @a = <$fh>;
+  $fh -> close;
+    
+    foreach (@a)
+    {
+       if ($ringbuffersize == 0) {
+           $_ =~ s/Buffer_128.The_Buffer/Buffer_32.The_Buffer/g;
+       }
+       elsif ($ringbuffersize == 1 || $ringbuffersize == 5) {
+           $_ =~ s/Buffer_128.The_Buffer/Buffer_64.The_Buffer/g;
+       }
+       elsif ($ringbuffersize == 2) {
+           $_ =~ s/Buffer_128.The_Buffer/Buffer_96.The_Buffer/g;
+       }
+       elsif ($ringbuffersize == 3 || $ringbuffersize == 7) {
+           $_ =~ s/Buffer_128.The_Buffer/Buffer_128.The_Buffer/g;
+       }
+       else {
+           print "unknown ringbuffer size... \n";
+           exit 129;
+       }
+
+       push(@newline,$_);
+    }
+  $fh = new FileHandle(">$WORKDIR/$TOPNAME".".lpf");
+  print $fh @newline;
+  $fh -> close;
+
 }
+
+
 if($include_GBE) {
 
 }
@@ -271,7 +321,7 @@ if($par==1 || $all==1){
     system("rm $TOPNAME.ncd");
     if ($isMultiPar)
     {
-       $c=qq|LC_ALL=en_US.UTF-8; par -m nodelist.txt -n $nrNodes -w -i 15 -l 5 -y -s 8 -t 1 -c 1 -e 2 -exp parCDP=1:parCDR=1:parPlcInLimit=0:parPlcInNeighborSize=1:parPathBased=ON:parHold=1:parHoldLimit=10000:paruseNBR=1 $tpmap.ncd $TOPNAME.dir $TOPNAME.prf;|;
+       $c=qq|LC_ALL=en_US.UTF-8; par -m $nodelist_file -n $nrNodes -w -i 15 -l 5 -y -s 8 -t 1 -c 1 -e 2 -exp parCDP=1:parCDR=1:parPlcInLimit=0:parPlcInNeighborSize=1:parPathBased=ON:parHold=1:parHoldLimit=10000:paruseNBR=1 $tpmap.ncd $TOPNAME.dir $TOPNAME.prf;|;
        execute($c);
 
         # find and copy the .ncd file which has met the timing constraints