private void ExtractPins(string pins, InPortOutPortMapping pm, FPGATypes.PortDirection direction, Slice slice) { string[] pinPaths = pins.Split(' '); foreach (string pinPath in pinPaths.Where(s => !string.IsNullOrEmpty(s))) { int index = pinPath.IndexOf('/'); if (index <= 0) { throw new ArgumentException("Unexpected line " + pinPath); } string bel = pinPath.Substring(0, index); string pin = pinPath.Substring(index + 1, pinPath.Length - index - 1); Port p = new Port(pin); pm.AddSlicePort(p, direction); pm.Add(bel, p); slice.AddBel(bel); /* * string[] components = pinPath.Split('/'); * Port p = new Port(components[1]); * pm.AddSlicePort(p, direction); * pm.Add(components[0], p); * slice.AddBel(components[0]); */ } }