Пример #1
0
 public NGDBuilder(XilinxToolchain toolchain, OutputPath output)
 {
     Toolchain = toolchain;
     OutputLocation = output;
 }
Пример #2
0
 public XSTSynthesizer(XilinxToolchain toolchain)
 {
     Toolchain = toolchain;
 }
Пример #3
0
 public BitstreamGenerator(XilinxToolchain toolchain, OutputPath output, string ncd)
 {
     Toolchain = toolchain;
     OutputLocation = output;
     NCDFile = ncd;
 }
Пример #4
0
 public FPGAImplementor(XilinxToolchain toolchain)
 {
     Toolchain = toolchain;
 }
Пример #5
0
 public PlaceAndRouter(XilinxToolchain toolchain, OutputPath output)
 {
     Toolchain = toolchain;
     OutputLocation = output;
 }
Пример #6
0
        public static DeviceFamily LoadFamily(XilinxToolchain toolchain, DeviceManufacture manufacture, string familyName)
        {
            DeviceFamily family = null;

            List<string> arguments = new List<string>();
            arguments.Add("-intstyle silent");
            arguments.Add("-arch " + familyName);
            ProcessHelper.ProcessExecutionResult result = XilinxProcess.ExecuteProcess(Environment.CurrentDirectory, "partgen", arguments);

            bool startedList = false;
            string realFamilyName = familyName;
            string defaultSpeeds = null;
            Device currentDevice = null;
            DeviceType familyType = ScanDeviceType(familyName);
            using (StringReader reader = new StringReader(result.StandardOutput))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    if (!startedList)
                    {
                        startedList = true;
                        realFamilyName = line.Trim(); // Picked up name
                        family = new DeviceFamily(manufacture, realFamilyName, familyName, familyType);
                    }
                    else if (family != null)
                    {
                        // The first line i the part + speeds, lines afterwards are packages
                        string cleanup = line.Trim();
                        if (line.StartsWith("    "))
                        {
                            if (currentDevice != null)
                            {
                                // Device
                                string[] splitUp = cleanup.Split(new char[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
                                if (splitUp.Length >= 1 && !string.IsNullOrEmpty(splitUp[0]))
                                {
                                    // Package specifier
                                    Logger.Instance.WriteDebug("Create/Find Package '{0}'", splitUp[0]);
                                    DevicePackage partPackage = family.CreatePackage(splitUp[0]);
                                    Logger.Instance.WriteDebug("Create/Find part with package '{0}'", partPackage.Name);
                                    DevicePart part = currentDevice.CreatePart(partPackage);

                                    // Can have an exclusive set of speeds
                                    ParseSpeedDetails(toolchain, family, part, (splitUp.Length > 1) ? splitUp[1] : defaultSpeeds);
                                }
                            }
                        }
                        else
                        {
                            string[] splitUp = cleanup.Split(new char[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
                            if (splitUp.Length >= 3 && !string.IsNullOrEmpty(splitUp[0]))
                            {
                                Logger.Instance.WriteDebug("Create/Find Device '{0}'", splitUp[0]);
                                currentDevice = family.CreateDevice(splitUp[0]);
                                defaultSpeeds = splitUp[2]; // Set default speed for devices
                            }
                        }
                    }
                }
            }
            return family;
        }
Пример #7
0
 private static void ParseSpeedDetails(XilinxToolchain toolchain, DeviceFamily family, DevicePart part, string speedDetails)
 {
     if (!string.IsNullOrEmpty(speedDetails))
     {
         string[] splitUpSpeeds = speedDetails.Split(new string[] { "    " }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string speed in splitUpSpeeds)
         {
             // Shouldn't start with "("
             if (!speed.StartsWith("("))
             {
                 DeviceSpeed familySpeed = family.CreateSpeed(speed);
                 DevicePartSpeed partSpeed = part.CreateSpeed(familySpeed);
                 partSpeed.AddToolchain(toolchain);
             }
         }
     }
 }