예제 #1
0
        public XilinxToolchain(ToolchainManager manager, XilinxVersion version)
        {
            if (version == null)
            {
                throw new ArgumentNullException("version");
            }
            Version = version;
            Manager = manager;

            Logger.Instance.WriteDebug("Created Xilinx Toolchain Instance with version '{0}'", Version.ToString());

            PopulatePathData();
            PopulateToolFactories();
        }
예제 #2
0
        private static XilinxToolchain ScanXilinxInstall(ToolchainManager manager, string root)
        {
            if (Directory.Exists(root))
            {
                XilinxVersion version = XilinxVersion.GetVersionFromFileset(root);
                if (version == null)
                {
                    // May use a ISE_DS sub directory
                    version = XilinxVersion.GetVersionFromFileset(PathHelper.Combine(root, "ISE_DS"));
                }

                if (version != null)
                {
                    Logger.Instance.WriteDebug("Found Xilinx Toolchain @ '{0}', version {1}", root, version);

                    XilinxToolchain toolchain = new XilinxToolchain(manager, version);
                    manager.AddToolchain(toolchain);
                    return toolchain;
                }
            }
            Logger.Instance.WriteDebug("Invalid toolchain @ '{0}'", root);
            return null;
        }
예제 #3
0
        public static void SearchForXilinxInstalls(ToolchainManager manager)
        {
            if (manager == null)
            {
                throw new ArgumentNullException("manager");
            }

            // Check the environment variable for a forced XILINX path
            string environmentISE = Environment.GetEnvironmentVariable("XILINX");

            // Scan for extra installs
            HashSet<string> installs = new HashSet<string>(Directory.GetDirectories(GetXilinxDefaultRoot()));
            if (environmentISE != null)
            {
                installs.Add(environmentISE);
            }
            foreach (string install in installs)
            {
                ScanXilinxInstall(manager, install);
            }
        }
예제 #4
0
 public IToolchain Toolchain(ToolchainManager manager)
 {
     return manager.FindToolchainById(Id);
 }