Exemple #1
0
        public ProcessPool.ToolBatch Execute(XilinxProject proj, string xcoPath, string projPath)
        {
            if (proj.SkipIPCoreSynthesis)
            {
                return(null);
            }

            //see: http://www.xilinx.com/itp/xilinx6/books/docs/cgn/cgn.pdf
            projPath = Path.GetFullPath(projPath);
            xcoPath  = Path.GetFullPath(xcoPath);
            string dir       = Path.GetDirectoryName(projPath);
            bool   madeSubst = false;
            char   drivel    = default(char);
            string drive     = null;

            try
            {
                var batch = ProcessPool.Instance.CreateBatch();
                if (projPath.Length >= 160)
                {
                    drivel = SubstManager.Instance.AllocateDrive();
                    drive  = drivel + ":";
                    batch.Add("subst ", drive + " " + dir);
                    dir       = drive + "\\";
                    projPath  = dir + Path.GetFileName(projPath);
                    madeSubst = true;
                }
                string arguments = "-b \"" + xcoPath + "\" -p \"" + projPath + "\"";
                proj.AddToolToBatch(batch, dir, "coregen", arguments);
                if (madeSubst)
                {
                    batch.Add("subst", drive + " /D");
                }
                batch.Start();
                return(batch);
            }
            finally
            {
                if (drivel != default(char))
                {
                    SubstManager.Instance.ReleaseDrive(drivel);
                }
            }
        }
Exemple #2
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();
            if (PartName != null)
                cmd.Append("-p " + PartName);
            cmd.Append(" -ol \"" + PropEnum.ToString(PlacerEffort, EPropAssoc.MAP) + "\"");
            if (PlacerExtraEffort != EPlacerExtraEffortMap.None)
                throw new NotImplementedException();
            cmd.Append(" -t " + StartingPlacerCostTable);
            cmd.Append(" -logic_opt ");
            if (CombinatorialLogicOptimization)
                cmd.Append("\"on\"");
            else
                cmd.Append("\"off\"");
            cmd.Append(" -register_duplication ");
            cmd.Append("\"" + PropEnum.ToString(RegisterDuplication, EPropAssoc.MAP) + "\"");
            cmd.Append(" -global_opt \"" + PropEnum.ToString(GlobalOptimization, EPropAssoc.MAP) + "\"");
            cmd.Append(" -equivalent_register_removal ");
            if (EquivalentRegisterRemoval)
                cmd.Append("\"on\"");
            else
                cmd.Append("\"off\"");
            if (IgnoreUserTimingConstraints)
                cmd.Append(" -x");
            if (TrimUnconnectedSignals)
                cmd.Append(" -u");
            if (IgnoreKeepHierarchy)
                cmd.Append(" -ignore_keep_hierarchy");
#if false
            //FIXME: Which architectures allow for this property?
            cmd.Append(" -cm \"" + PropEnum.ToString(OptimizationStrategyCoverMode, EPropAssoc.MAP) + "\"");
#endif
            if (GenerateDetailedMapReport)
                cmd.Append(" -detail");
            cmd.Append(" -ir \"" + PropEnum.ToString(UseRLOCConstraints, EPropAssoc.MAP) + "\"");
            cmd.Append(" -pr \"" + PropEnum.ToString(PackIORegistersIntoIOBs, EPropAssoc.MAP) + "\"");
            if (MaximumCompression)
                cmd.Append(" -c");
            cmd.Append(" -lc \"" + PropEnum.ToString(LUTCombining, EPropAssoc.MAP) + "\"");
            if (MapSliceLogicIntoUnusedBlockRAMs)
                cmd.Append(" -bp");
            cmd.Append(" -power ");
            if (PowerReduction)
                cmd.Append("\"on\"");
            else
                cmd.Append("\"off\"");
            if (PowerActivityFile != null)
                cmd.Append(" -activityfile \"" + PowerActivityFile + "\"");
            cmd.Append(" -mt \"" + MultiThreading + "\"");
            if (Overwrite)
                cmd.Append(" -w");
            if (OutputFile != null)
                cmd.Append(" -o \"" + OutputFile + "\"");
            cmd.Append(" \"" + InputFile + "\"");
            if (PRFFile != null)
                cmd.Append(" " + PRFFile);

            return proj.AddToolToBatch(batch, proj.ProjectPath, "map", cmd.ToString());
        }
Exemple #3
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();
            cmd.Append("-ol \"" + PropEnum.ToString(OverallEffortLevel, EPropAssoc.PAR) + "\"");
#if false
            //FIXME: Supporting device families?
            cmd.Append(" -pl \"" + PropEnum.ToString(PlacerEffortLevel, EPropAssoc.PAR) + "\"");
            cmd.Append(" -rl \"" + PropEnum.ToString(RouterEffortLevel, EPropAssoc.PAR) + "\"");
#endif
            if (ExtraEffortLevel != EExtraEffortLevel.None)
                cmd.Append(" -xl \"" + PropEnum.ToString(ExtraEffortLevel, EPropAssoc.PAR) + "\"");
            if (MultiThreading > 1)
                cmd.Append(" -mt \"" + MultiThreading + "\"");
#if false
            //FIXME: Supporting device families?
            cmd.Append(" -t \"" + PlacerCostTableEntry + "\"");
#endif
            if (KeepCurrentPlacement)
                cmd.Append(" -p");
            if (ReentrantRoute)
                cmd.Append(" -k");
            if (DontRunRouter)
                cmd.Append(" -r");
            if (Overwrite)
                cmd.Append(" -w");
            if (SmartGuideFile != null)
                cmd.Append(" -smartguide \"" + SmartGuideFile + "\"");
            if (IgnoreUserTimingConstraintsAutoGen)
                cmd.Append(" -x");
            if (NoPadReport)
                cmd.Append(" -nopad");
            cmd.Append(" -power \"" + PropEnum.ToString(PowerReduction, EPropAssoc.PAR) + "\"");
            if (PowerActivityFile != null)
                cmd.Append(" -activityfile \"" + PowerActivityFile + "\"");
            if (FilterFile != null)
                cmd.Append(" -filter \"" + FilterFile + "\"");
            if (IgnoreUserTimingConstraintsNoGen)
                cmd.Append(" -ntd");
            cmd.Append(" -intstyle silent");
            if (ISERepositoryFile != null)
                cmd.Append(" -ise \"" + ISERepositoryFile + "\"");
            if (FilterFile != null)
                cmd.Append(" -filter \"" + FilterFile + "\"");
            cmd.Append(" \"" + InputFile + "\"");
            cmd.Append(" \"" + OutputFile + "\"");
            if (PhysicalConstraintsFile != null)
                cmd.Append(" \"" + PhysicalConstraintsFile + "\"");

            return proj.AddToolToBatch(batch, proj.ProjectPath, "par", cmd.ToString());
            batch.Add(proj.ISEBinPath, proj.ProjectPath, "par", cmd.ToString());
        }
Exemple #4
0
 public static ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch, string scriptPath, string logPath)
 {
     string args = "-intstyle \"silent\" -ifn \"" + scriptPath + "\" -ofn \"" + logPath + "\"";
     return proj.AddToolToBatch(batch, proj.ProjectPath, "xst", args);
 }
Exemple #5
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();

            if (PartName != null)
            {
                cmd.Append("-p " + PartName);
            }
            cmd.Append(" -ol \"" + PropEnum.ToString(PlacerEffort, EPropAssoc.MAP) + "\"");
            if (PlacerExtraEffort != EPlacerExtraEffortMap.None)
            {
                throw new NotImplementedException();
            }
            cmd.Append(" -t " + StartingPlacerCostTable);
            cmd.Append(" -logic_opt ");
            if (CombinatorialLogicOptimization)
            {
                cmd.Append("\"on\"");
            }
            else
            {
                cmd.Append("\"off\"");
            }
            cmd.Append(" -register_duplication ");
            cmd.Append("\"" + PropEnum.ToString(RegisterDuplication, EPropAssoc.MAP) + "\"");
            cmd.Append(" -global_opt \"" + PropEnum.ToString(GlobalOptimization, EPropAssoc.MAP) + "\"");
            cmd.Append(" -equivalent_register_removal ");
            if (EquivalentRegisterRemoval)
            {
                cmd.Append("\"on\"");
            }
            else
            {
                cmd.Append("\"off\"");
            }
            if (IgnoreUserTimingConstraints)
            {
                cmd.Append(" -x");
            }
            if (TrimUnconnectedSignals)
            {
                cmd.Append(" -u");
            }
            if (IgnoreKeepHierarchy)
            {
                cmd.Append(" -ignore_keep_hierarchy");
            }
#if false
            //FIXME: Which architectures allow for this property?
            cmd.Append(" -cm \"" + PropEnum.ToString(OptimizationStrategyCoverMode, EPropAssoc.MAP) + "\"");
#endif
            if (GenerateDetailedMapReport)
            {
                cmd.Append(" -detail");
            }
            cmd.Append(" -ir \"" + PropEnum.ToString(UseRLOCConstraints, EPropAssoc.MAP) + "\"");
            cmd.Append(" -pr \"" + PropEnum.ToString(PackIORegistersIntoIOBs, EPropAssoc.MAP) + "\"");
            if (MaximumCompression)
            {
                cmd.Append(" -c");
            }
            cmd.Append(" -lc \"" + PropEnum.ToString(LUTCombining, EPropAssoc.MAP) + "\"");
            if (MapSliceLogicIntoUnusedBlockRAMs)
            {
                cmd.Append(" -bp");
            }
            cmd.Append(" -power ");
            if (PowerReduction)
            {
                cmd.Append("\"on\"");
            }
            else
            {
                cmd.Append("\"off\"");
            }
            if (PowerActivityFile != null)
            {
                cmd.Append(" -activityfile \"" + PowerActivityFile + "\"");
            }
            cmd.Append(" -mt \"" + MultiThreading + "\"");
            if (Overwrite)
            {
                cmd.Append(" -w");
            }
            if (OutputFile != null)
            {
                cmd.Append(" -o \"" + OutputFile + "\"");
            }
            cmd.Append(" \"" + InputFile + "\"");
            if (PRFFile != null)
            {
                cmd.Append(" " + PRFFile);
            }

            return(proj.AddToolToBatch(batch, proj.ProjectPath, "map", cmd.ToString()));
        }
Exemple #6
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();

            cmd.Append("-ol \"" + PropEnum.ToString(OverallEffortLevel, EPropAssoc.PAR) + "\"");
#if false
            //FIXME: Supporting device families?
            cmd.Append(" -pl \"" + PropEnum.ToString(PlacerEffortLevel, EPropAssoc.PAR) + "\"");
            cmd.Append(" -rl \"" + PropEnum.ToString(RouterEffortLevel, EPropAssoc.PAR) + "\"");
#endif
            if (ExtraEffortLevel != EExtraEffortLevel.None)
            {
                cmd.Append(" -xl \"" + PropEnum.ToString(ExtraEffortLevel, EPropAssoc.PAR) + "\"");
            }
            if (MultiThreading > 1)
            {
                cmd.Append(" -mt \"" + MultiThreading + "\"");
            }
#if false
            //FIXME: Supporting device families?
            cmd.Append(" -t \"" + PlacerCostTableEntry + "\"");
#endif
            if (KeepCurrentPlacement)
            {
                cmd.Append(" -p");
            }
            if (ReentrantRoute)
            {
                cmd.Append(" -k");
            }
            if (DontRunRouter)
            {
                cmd.Append(" -r");
            }
            if (Overwrite)
            {
                cmd.Append(" -w");
            }
            if (SmartGuideFile != null)
            {
                cmd.Append(" -smartguide \"" + SmartGuideFile + "\"");
            }
            if (IgnoreUserTimingConstraintsAutoGen)
            {
                cmd.Append(" -x");
            }
            if (NoPadReport)
            {
                cmd.Append(" -nopad");
            }
            cmd.Append(" -power \"" + PropEnum.ToString(PowerReduction, EPropAssoc.PAR) + "\"");
            if (PowerActivityFile != null)
            {
                cmd.Append(" -activityfile \"" + PowerActivityFile + "\"");
            }
            if (FilterFile != null)
            {
                cmd.Append(" -filter \"" + FilterFile + "\"");
            }
            if (IgnoreUserTimingConstraintsNoGen)
            {
                cmd.Append(" -ntd");
            }
            cmd.Append(" -intstyle silent");
            if (ISERepositoryFile != null)
            {
                cmd.Append(" -ise \"" + ISERepositoryFile + "\"");
            }
            if (FilterFile != null)
            {
                cmd.Append(" -filter \"" + FilterFile + "\"");
            }
            cmd.Append(" \"" + InputFile + "\"");
            cmd.Append(" \"" + OutputFile + "\"");
            if (PhysicalConstraintsFile != null)
            {
                cmd.Append(" \"" + PhysicalConstraintsFile + "\"");
            }

            return(proj.AddToolToBatch(batch, proj.ProjectPath, "par", cmd.ToString()));

            batch.Add(proj.ISEBinPath, proj.ProjectPath, "par", cmd.ToString());
        }
        public ProcessPool.ToolBatch Execute(XilinxProject proj, string xcoPath, string projPath)
        {
            if (proj.SkipIPCoreSynthesis)
                return null;

            //see: http://www.xilinx.com/itp/xilinx6/books/docs/cgn/cgn.pdf
            projPath = Path.GetFullPath(projPath);
            xcoPath = Path.GetFullPath(xcoPath);
            string dir = Path.GetDirectoryName(projPath);
            bool madeSubst = false;
            char drivel = default(char);
            string drive = null;
            try
            {
                var batch = ProcessPool.Instance.CreateBatch();
                if (projPath.Length >= 160)
                {
                    drivel = SubstManager.Instance.AllocateDrive();
                    drive = drivel + ":";
                    batch.Add("subst ", drive + " " + dir);
                    dir = drive + "\\";
                    projPath = dir + Path.GetFileName(projPath);
                    madeSubst = true;
                }
                string arguments = "-b \"" + xcoPath + "\" -p \"" + projPath + "\"";
                proj.AddToolToBatch(batch, dir, "coregen", arguments);
                if (madeSubst)
                {
                    batch.Add("subst", drive + " /D");
                }
                batch.Start();
                return batch;
            }
            finally
            {
                if (drivel != default(char))
                    SubstManager.Instance.ReleaseDrive(drivel);
            }
        }
Exemple #8
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();
            if (PartName != null)
                cmd.Append(" -p " + PartName);
            foreach (var dir in SearchDirs)
                cmd.Append(" -sd " + dir);
            foreach (var lib in Libraries)
                cmd.Append(" -l " + lib);
            if (RulesFile != null)
                cmd.Append(" -ur " + RulesFile);
            if (IntermediateDir != null)
                cmd.Append(" -dd " + IntermediateDir);
            cmd.Append(" -nt ");
            switch (NGOGeneration)
            { 
                case ENGOGeneration.Off:
                    cmd.Append(" off");
                    break;
                case ENGOGeneration.On:
                    cmd.Append(" on");
                    break;
                case ENGOGeneration.Timestamp:
                    cmd.Append(" timestamp");
                    break;
            }
            if (UserConstraintsFile != null)
                cmd.Append(" -uc " + UserConstraintsFile);
            if (IgnoreLocationConstraints)
                cmd.Append(" -r");
            if (AllowUnmatchedLOCConstraints)
                cmd.Append(" -aul");
            if (AllowUnmatchedTimingGroupConstraints)
                cmd.Append(" -aut");
            if (InferPadComponents)
                cmd.Append(" -a");
            if (IgnoreDefaultUCF)
                cmd.Append(" -i");
            if (AllowUnexpandedBlocks)
                cmd.Append(" -u");
            if (InsertKeepHierarchy)
                cmd.Append(" -insert_keep_hierarchy");
            if (BMMFile != null)
                cmd.Append(" -bm " + BMMFile);
            if (FilterFile != null)
                cmd.Append(" -filter " + FilterFile);
            cmd.Append(" -intstyle silent");
            if (Quiet)
                cmd.Append(" -quiet");
            if (Verbose)
                cmd.Append(" -verbose");
            cmd.Append(" " + DesignName);
            if (NGDFile != null)
                cmd.Append(" " + NGDFile);

            return proj.AddToolToBatch(batch, proj.ProjectPath, "ngdbuild", cmd.ToString());
        }
Exemple #9
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();

            if (VerboseReport || ErrorReport)
            {
                if (VerboseReport)
                {
                    cmd.Append("-v ");
                }
                else
                {
                    cmd.Append("-e ");
                }
                cmd.Append(ReportLimit);
            }
            if (TimingReport)
            {
                cmd.Append(" -l " + TimingReportLimit);
            }
            if (ReportPathsPerEndpoint)
            {
                cmd.Append(" -n " + EndpointsLimit);
            }
            if (SpeedGrade > 0)
            {
                cmd.Append(" -s " + SpeedGrade);
            }
            if (AdvancedAnalysis)
            {
                cmd.Append(" -a");
            }
            if (ReportUnconstrainedPaths)
            {
                cmd.Append(" -u " + UnconstrainedPathsLimit);
            }
            if (ReportFile != null)
            {
                cmd.Append(" -o \"" + ReportFile + "\"");
            }
            if (StampFile != null)
            {
                cmd.Append(" -stamp \"" + StampFile + "\"");
            }
            if (TSIFile != null)
            {
                cmd.Append(" -tsi \"" + TSIFile + "\"");
            }
            if (XMLReportFile != null)
            {
                cmd.Append(" -xml \"" + XMLReportFile + "\"");
            }
            if (NoDatasheet)
            {
                cmd.Append(" -nodatasheet");
            }
            if (TimegroupsSection)
            {
                cmd.Append(" -timegroups");
            }
            if (ReportFastestPaths)
            {
                cmd.Append(" -fastpaths");
            }
            if (FilterFile != null)
            {
                cmd.Append(" -filter \"" + FilterFile + "\"");
            }
            if (TurnOffPackageFlightDelay)
            {
                cmd.Append(" -noflight");
            }
            cmd.Append(" -intstyle silent");
            if (ISEProjectFile != null)
            {
                cmd.Append(" -ise \"" + ISEProjectFile + "\"");
            }
            cmd.Append(" \"" + PhysicalDesignFile + "\"");
            if (PhysicalConstraintsFile != null)
            {
                cmd.Append(" \"" + PhysicalConstraintsFile + "\"");
            }
            if (UserConstraintsFile != null)
            {
                cmd.Append(" -ucf \"" + UserConstraintsFile + "\"");
            }

            return(proj.AddToolToBatch(batch, proj.ProjectPath, "trce", cmd.ToString()));
        }
Exemple #10
0
        public static ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch, string scriptPath, string logPath)
        {
            string args = "-intstyle \"silent\" -ifn \"" + scriptPath + "\" -ofn \"" + logPath + "\"";

            return(proj.AddToolToBatch(batch, proj.ProjectPath, "xst", args));
        }
Exemple #11
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();
            if (VerboseReport || ErrorReport)
            {
                if (VerboseReport)
                    cmd.Append("-v ");
                else
                    cmd.Append("-e ");
                cmd.Append(ReportLimit);
            }
            if (TimingReport)
            {
                cmd.Append(" -l " + TimingReportLimit);
            }
            if (ReportPathsPerEndpoint)
            {
                cmd.Append(" -n " + EndpointsLimit);
            }
            if (SpeedGrade > 0)
            {
                cmd.Append(" -s " + SpeedGrade);
            }
            if (AdvancedAnalysis)
            {
                cmd.Append(" -a");
            }
            if (ReportUnconstrainedPaths)
            {
                cmd.Append(" -u " + UnconstrainedPathsLimit);
            }
            if (ReportFile != null)
            {
                cmd.Append(" -o \"" + ReportFile + "\"");
            }
            if (StampFile != null)
            {
                cmd.Append(" -stamp \"" + StampFile + "\"");
            }
            if (TSIFile != null)
            {
                cmd.Append(" -tsi \"" + TSIFile + "\"");
            }
            if (XMLReportFile != null)
            {
                cmd.Append(" -xml \"" + XMLReportFile + "\"");
            }
            if (NoDatasheet)
            {
                cmd.Append(" -nodatasheet");
            }
            if (TimegroupsSection)
            {
                cmd.Append(" -timegroups");
            }
            if (ReportFastestPaths)
            {
                cmd.Append(" -fastpaths");
            }
            if (FilterFile != null)
            {
                cmd.Append(" -filter \"" + FilterFile + "\"");
            }
            if (TurnOffPackageFlightDelay)
            {
                cmd.Append(" -noflight");
            }
            cmd.Append(" -intstyle silent");
            if (ISEProjectFile != null)
            {
                cmd.Append(" -ise \"" + ISEProjectFile + "\"");
            }
            cmd.Append(" \"" + PhysicalDesignFile + "\"");
            if (PhysicalConstraintsFile != null)
                cmd.Append(" \"" + PhysicalConstraintsFile + "\"");
            if (UserConstraintsFile != null)
                cmd.Append(" -ucf \"" + UserConstraintsFile + "\"");

            return proj.AddToolToBatch(batch, proj.ProjectPath, "trce", cmd.ToString());
        }
Exemple #12
0
        public ProcessPool.Tool AddToBatch(XilinxProject proj, ProcessPool.ToolBatch batch)
        {
            var cmd = new StringBuilder();

            if (PartName != null)
            {
                cmd.Append(" -p " + PartName);
            }
            foreach (var dir in SearchDirs)
            {
                cmd.Append(" -sd " + dir);
            }
            foreach (var lib in Libraries)
            {
                cmd.Append(" -l " + lib);
            }
            if (RulesFile != null)
            {
                cmd.Append(" -ur " + RulesFile);
            }
            if (IntermediateDir != null)
            {
                cmd.Append(" -dd " + IntermediateDir);
            }
            cmd.Append(" -nt ");
            switch (NGOGeneration)
            {
            case ENGOGeneration.Off:
                cmd.Append(" off");
                break;

            case ENGOGeneration.On:
                cmd.Append(" on");
                break;

            case ENGOGeneration.Timestamp:
                cmd.Append(" timestamp");
                break;
            }
            if (UserConstraintsFile != null)
            {
                cmd.Append(" -uc " + UserConstraintsFile);
            }
            if (IgnoreLocationConstraints)
            {
                cmd.Append(" -r");
            }
            if (AllowUnmatchedLOCConstraints)
            {
                cmd.Append(" -aul");
            }
            if (AllowUnmatchedTimingGroupConstraints)
            {
                cmd.Append(" -aut");
            }
            if (InferPadComponents)
            {
                cmd.Append(" -a");
            }
            if (IgnoreDefaultUCF)
            {
                cmd.Append(" -i");
            }
            if (AllowUnexpandedBlocks)
            {
                cmd.Append(" -u");
            }
            if (InsertKeepHierarchy)
            {
                cmd.Append(" -insert_keep_hierarchy");
            }
            if (BMMFile != null)
            {
                cmd.Append(" -bm " + BMMFile);
            }
            if (FilterFile != null)
            {
                cmd.Append(" -filter " + FilterFile);
            }
            cmd.Append(" -intstyle silent");
            if (Quiet)
            {
                cmd.Append(" -quiet");
            }
            if (Verbose)
            {
                cmd.Append(" -verbose");
            }
            cmd.Append(" " + DesignName);
            if (NGDFile != null)
            {
                cmd.Append(" " + NGDFile);
            }

            return(proj.AddToolToBatch(batch, proj.ProjectPath, "ngdbuild", cmd.ToString()));
        }