Esempio n. 1
0
  private void addTxsNode(Connection conn, DTNode node) {
    Vector<String> vRegNames = new Vector<String>();
    Vector<Long> vRegs = getReg((conn != null ? conn.getMasterModule() : null), vRegNames);
    int txsRegPosition;
    int width = 2;
    if (conn != null)
      width =
          conn.getMasterInterface().getPrimaryWidth()
              + conn.getMasterInterface().getSecondaryWidth();

    for (txsRegPosition = 0; txsRegPosition < vRegNames.size(); txsRegPosition++) {
      if (vRegNames.get(txsRegPosition).equalsIgnoreCase("txs")) break;
    }

    if (vRegs.size() > 0) {
      node.addProperty(new DTProperty("ranges"));
      node.getPropertyByName("ranges")
          .addHexValues(
              new long[] {
                PCI_PHYS_HI_RELOCATABLE | PCI_PHYS_HI_SPACE_MEM32,
                0,
                0,
                vRegs.get(txsRegPosition * width),
                vRegs.get(txsRegPosition * width + 1),
                0x0,
                vRegs.get(txsRegPosition * width + 2)
              });
    }
  }
Esempio n. 2
0
  private BasicComponent findMSIController(Vector<Interface> vector) {
    for (Interface i : vector) {
      if (interfaceshandled.contains(i)) continue;
      for (Connection c : i.getConnections()) {
        Parameter param =
            c.getSlaveInterface().getOwner().getParamByName("embeddedsw.dts.params.msi-controller");
        if (param != null) {
          return c.getSlaveInterface().getOwner();
        }
        interfaceshandled.add(i);
        BasicComponent component = findMSIController(c.getSlaveModule().getInterfaces());
        if (component != null) return component;
      }
    }

    return null;
  }