From b7ff673e96a925b19b720f48bf8c6f586c4c2937 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 14 Jul 2015 18:21:00 +0200 Subject: [PATCH] compile-script: adding constraints-only option --- scripts/compile.pl | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/scripts/compile.pl b/scripts/compile.pl index 3b05e80..a8702d5 100755 --- a/scripts/compile.pl +++ b/scripts/compile.pl @@ -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"); -- 2.43.0