public Tile GetTile(TileKey key) { if (Contains(key)) { return(m_tiles.GetTile(key)); } else { throw new ArgumentException("Tile " + key.ToString() + " not found"); } }
public override bool Equals(object obj) { if (!(obj is TileKey)) { return(false); } TileKey other = (TileKey)obj; return(X == other.X && Y == other.Y); }
public Tile GetTile(string location) { if (m_location2TileKey.ContainsKey(location)) { TileKey key = m_location2TileKey[location]; return(m_tiles.GetTile(key));//[key.X][key.Y]; } else { return(null); throw new ArgumentException("Tile " + location + " not found"); } }
public Tile(TileKey key, string location) { m_key = key; m_location = location; // location in of form LEFTPART_X\d+Y\d+ // and left part may contain X. extract x and y digits from tight part if (m_tileMatch.IsMatch(m_location)) { string[] atoms = m_location.Split('X', 'Y'); m_locationX = (short)int.Parse(atoms[atoms.Length - 2]); m_locationY = (short)int.Parse(atoms[atoms.Length - 1]); } else if (m_tileMatchS3.IsMatch(m_location)) // Spartan 3 { string[] atoms = m_location.Split('R', 'C'); m_locationX = (short)int.Parse(atoms[atoms.Length - 1]); // reverse! m_locationY = (short)int.Parse(atoms[atoms.Length - 2]); } }
public Tile GetTile(TileKey key) { return(GetTile(key.X, key.Y)); }
public void Add(TileKey tileKey) { Tile t = FPGA.Instance.GetTile(tileKey); Add(t); }
public bool Contains(TileKey key) { return(Contains(key.X, key.Y)); }
public void Remove(TileKey key) { Remove(key.X, key.Y); }
public bool Contains(TileKey key) { return(m_tiles.Contains(key)); }
public Tile(RawTile rawTile) { m_key = new TileKey(rawTile.TileKeyX, rawTile.TileKeyY); m_location = rawTile.TileLocationString; SwitchMatrixHashCode = rawTile.SwitchMatrixHashCode; WireListHashCode = rawTile.WireListHashCode; IncomingWireListHashCode = rawTile.IncomingWireListHashCode; // vivado m_clockRegion = rawTile.ClockRegion != null ? rawTile.ClockRegion : "unknown"; // location in of form LEFTPART_X\d+Y\d+ // and left part may contain X. extract x and y digits from tight part if (m_tileMatch.IsMatch(m_location)) { string[] atoms = m_location.Split('X', 'Y'); m_locationX = int.Parse(atoms[atoms.Length - 2]); m_locationY = int.Parse(atoms[atoms.Length - 1]); } else if (m_tileMatchS3.IsMatch(m_location)) // Spartan 3 { string[] atoms = m_location.Split('R', 'C'); m_locationX = int.Parse(atoms[atoms.Length - 1]); // reverse! m_locationY = int.Parse(atoms[atoms.Length - 2]); } foreach (string portName in rawTile.PortsToExcludeFromBlocking) { // restore s6 bugfix BlockPort(portName, BlockReason.ExcludedFromBlocking); } if (rawTile.PortsOnArcsWithStopovers != null) { foreach (string portName in rawTile.PortsOnArcsWithStopovers) { BlockPort(portName, BlockReason.Stopover); } } if (!AddTimeData(rawTile)) { //Console.WriteLine("Adding time data failed for tile: " + m_location); } if (rawTile.WiresTrajectoriesData_keys != null && rawTile.WiresTrajectoriesData_vals != null) { if (rawTile.WiresTrajectoriesData_keys.Count == rawTile.WiresTrajectoriesData_vals.Count) { for (int i = 0; i < rawTile.WiresTrajectoriesData_keys.Count; i++) { uint pip = rawTile.WiresTrajectoriesData_keys[i]; string[] vals = rawTile.WiresTrajectoriesData_vals[i].Split(' '); foreach (var val in vals) { if (uint.TryParse(val, out uint tile)) { AddWireTrajectoryData(pip, tile); } else { Console.WriteLine("Failed parsing " + val + " into uint"); } } } } } }