]> jspc29.x-matter.uni-frankfurt.de Git - trb3sc.git/commitdiff
compile-script: adding constraints-only option
authorJan Michel <j.michel@gsi.de>
Tue, 14 Jul 2015 16:21:00 +0000 (18:21 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 14 Jul 2015 16:21:00 +0000 (18:21 +0200)
scripts/compile.pl

index 3b05e80da8817447e4e26c185dfde3a41c1c4124..a8702d5129f25e9e93ea76134db484e2723a6b8d 100755 (executable)
@@ -41,11 +41,13 @@ my $map        = 0;
 my $par        = 0;
 my $timing     = 0;
 my $bitgen     = 0;
+my $con        = 0;
 
 my $result = GetOptions (
     "h|help"   => \$help,
     "m|mpar=i" => \$nrNodes,
     "a|all"    => \$all,
+    "c|con"    => \$con,
     "s|syn"    => \$syn,
     "mp|map"   => \$map,
     "p|par"    => \$par,
@@ -58,6 +60,7 @@ if($help) {
     print "-h  --help\tPrints the usage manual.\n";
     print "-a  --all\tRun all compile script. By default the script is going to run the whole process.\n";
     print "-s  --syn\tRun synthesis part of the compile script.\n";
+    print "-c  --con\tCompile constraints only.\n";
     print "-mp --map\tRun map part of the compile script.\n";
     print "-p  --par\tRun par part of the compile script.\n";
     print "-t  --timing\tRun timing analysis part of the compile script.\n";
@@ -110,28 +113,30 @@ unless(-d $WORKDIR) {
 
 system("ln -sfT $lattice_path $WORKDIR/lattice-diamond");
 
-#create full lpf file
-print GREEN, "Generating constraints file...\n\n", RESET;
-system("cp ../pinout/$pinout_file.lpf $WORKDIR/$TOPNAME.lpf");
-system("cat ../pinout/trb3sc_basic.lpf >> $WORKDIR/$TOPNAME.lpf");
-system("cat ../pinout/basic_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
-system("cat $TOPNAME.lpf >> $WORKDIR/$TOPNAME.lpf");
-
-if($include_TDC) {
-  system("cat ../tdc_release/trbnet_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
-  system("cat ../tdc_release/tdc_constraints_64.lpf >> $WORKDIR/$TOPNAME.lpf");
-  system("cat ../tdc_release/unimportant_lines_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
-  }
-if($include_GBE) {
+if($con==1 || $all==1){
+  #create full lpf file
+  print GREEN, "Generating constraints file...\n\n", RESET;
+  system("cp ../pinout/$pinout_file.lpf $WORKDIR/$TOPNAME.lpf");
+  system("cat ../pinout/trb3sc_basic.lpf >> $WORKDIR/$TOPNAME.lpf");
+  system("cat ../pinout/basic_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
+  system("cat $TOPNAME.lpf >> $WORKDIR/$TOPNAME.lpf");
+
+  if($include_TDC) {
+    system("cat ../tdc_release/trbnet_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
+    system("cat ../tdc_release/tdc_constraints_64.lpf >> $WORKDIR/$TOPNAME.lpf");
+    system("cat ../tdc_release/unimportant_lines_constraints.lpf >> $WORKDIR/$TOPNAME.lpf");
+    }
+  if($include_GBE) {
 
-  }
+    }
 
-#copy delay line to project folder
-if($include_TDC) {
-  system("rm $WORKDIR/Adder_304.ngo");
-  system("ln -s ../../../tdc/base/cores/ecp3/TDC/Adder_304.ngo $WORKDIR/Adder_304.ngo");
+  #copy delay line to project folder
+  if($include_TDC) {
+    system("rm $WORKDIR/Adder_304.ngo");
+    system("ln -s ../../../tdc/base/cores/ecp3/TDC/Adder_304.ngo $WORKDIR/Adder_304.ngo");
+    }
   }
-
+  
 #generate timestamp
 my $t=time;
 my $fh = new FileHandle(">$WORKDIR/version.vhd");