use of com.bfh.logisim.fpgaboardeditor.FPGAIOInformationContainer.IOComponentTypes in project logisim-evolution by reds-heig.
the class BoardInformation method GetComponents.
@SuppressWarnings("unchecked")
public Map<String, ArrayList<Integer>> GetComponents() {
Map<String, ArrayList<Integer>> result = new HashMap<>();
ArrayList<Integer> list = new ArrayList<>();
int count = 0;
for (IOComponentTypes type : IOComponentTypes.KnownComponentSet) {
count = 0;
for (FPGAIOInformationContainer comp : MyComponents) {
if (comp.GetType().equals(type)) {
list.add(count, comp.getNrOfPins());
count++;
}
}
if (count > 0) {
result.put(type.toString(), (ArrayList<Integer>) list.clone());
}
list.clear();
}
return result;
}
use of com.bfh.logisim.fpgaboardeditor.FPGAIOInformationContainer.IOComponentTypes in project logisim-evolution by reds-heig.
the class MappableResourcesContainer method GetSelectableItemsList.
public ArrayList<BoardRectangle> GetSelectableItemsList(String DisplayName, BoardInformation BoardInfo) {
ArrayList<BoardRectangle> List;
ArrayList<String> key = GetHierarchyKey(DisplayName);
NetlistComponent comp = myMappableResources.get(key);
int pinNeeded = comp.GetIOInformationContainer().GetNrOfInOutports() + comp.GetIOInformationContainer().GetNrOfInports() + comp.GetIOInformationContainer().GetNrOfOutports();
/* first check main map type */
if (!comp.AlternateMappingEnabled(key)) {
List = BoardInfo.GetIoComponentsOfType(comp.GetIOInformationContainer().GetMainMapType(), pinNeeded);
if (!List.isEmpty()) {
return RemoveUsedItems(List, 0);
}
}
List = new ArrayList<BoardRectangle>();
int MapId = 0;
IOComponentTypes MapType;
do {
MapType = comp.GetIOInformationContainer().GetAlternateMapType(MapId);
List.addAll(BoardInfo.GetIoComponentsOfType(MapType, 0));
MapId++;
} while (MapType != IOComponentTypes.Unknown);
return RemoveUsedItems(List, pinNeeded);
}
Aggregations