use of com.bfh.logisim.designrulecheck.ConnectionEnd in project logisim-evolution by reds-heig.
the class AbstractHDLGeneratorFactory method GetClockNetName.
public static String GetClockNetName(NetlistComponent comp, int EndIndex, Netlist TheNets) {
StringBuffer Contents = new StringBuffer();
if ((TheNets.GetCurrentHierarchyLevel() != null) && (EndIndex >= 0) && (EndIndex < comp.NrOfEnds())) {
ConnectionEnd EndData = comp.getEnd(EndIndex);
if (EndData.NrOfBits() == 1) {
Net ConnectedNet = EndData.GetConnection((byte) 0).GetParrentNet();
byte ConnectedNetBitIndex = EndData.GetConnection((byte) 0).GetParrentNetBitIndex();
/* Here we search for a clock net Match */
int clocksourceid = TheNets.GetClockSourceId(TheNets.GetCurrentHierarchyLevel(), ConnectedNet, ConnectedNetBitIndex);
if (clocksourceid >= 0) {
Contents.append(ClockTreeName + Integer.toString(clocksourceid));
}
}
}
return Contents.toString();
}
Aggregations