if(newAnchorSite == null || dev == null){
return false;
}
// Do some error checking on the newAnchorSite
PrimitiveSite p = module.getAnchor().getPrimitiveSite();
Tile t = newAnchorSite.getTile();
PrimitiveSite newValidSite = Device.getCorrespondingPrimitiveSite(p, module.getAnchor().getType(), t);
if(!newAnchorSite.equals(newValidSite)){
//MessageGenerator.briefError("New anchor site (" + newAnchorSite.getName() +
// ") is incorrect. Should be " + newValidSite.getName());
//this.unplace();
return false;
}
// save original placement in case new placement is invalid
HashMap<Instance, PrimitiveSite> originalSites;
originalSites = isPlaced() ? new HashMap<Instance, PrimitiveSite>() : null;
//=======================================================//
/* Place instances at new location */
//=======================================================//
for(Instance inst : instances){
PrimitiveSite templateSite = inst.getModuleTemplateInstance().getPrimitiveSite();
Tile newTile = module.getCorrespondingTile(templateSite.getTile(), newAnchorSite.getTile(), dev);
PrimitiveSite newSite = Device.getCorrespondingPrimitiveSite(templateSite, inst.getType(), newTile);
if(newSite == null){
//MessageGenerator.briefError("ERROR: No matching primitive site found." +
// " (Template Primitive:" + templateSite.getName() +
// ", Template Tile:" + templateSite.getTile() +