Example #1
0
  /**
   * DOCUMENT ME!
   *
   * @param call DOCUMENT ME!
   */
  @Override
  public void visit(Call call) {
    if (_schedule.db) {
      _schedule.ln(_schedule.GVISIT, "visiting call " + call);
    }

    beginFrame();
    call.getProcedure().accept(this);
    ConnectionFrame procedureFrame = endFrame();

    // record duplicates of the procedure's connections
    // Some connections contain the same buses (done & address)
    // which we only want 1 new port for not multiples...
    Map<ID, ID> duplicatedMap = new HashMap<ID, ID>();
    // for (Iterator resources =
    // procedureFrame.getConnectedResources().iterator();
    // resources.hasNext();)
    // {
    // Resource resource = (Resource)resources.next();
    for (Resource resource : procedureFrame.getConnectedResources()) {
      Collection<Connection> readConnections = procedureFrame.getReadConnections(resource);
      for (Connection read : readConnections) {
        Connection duplicate = read.duplicate(call, duplicatedMap);
        mapPortsAndBuses(call, duplicate, read);
        recordRead(duplicate, call);
      }

      Collection<Connection> writeConnections = procedureFrame.getWriteConnections(resource);
      for (Connection write : writeConnections) {
        Connection duplicate = write.duplicate(call, duplicatedMap);
        mapPortsAndBuses(call, duplicate, write);
        recordWrite(duplicate, call);
      }
    }
  }
Example #2
0
  @Override
  public void filter(Module module) {
    if (_schedule.db) {
      _schedule.ln(_schedule.GVISIT, "Completing module " + module);
    }

    super.filter(module);

    ConnectionFrame frame = endFrame();
    for (Resource resource : frame.getConnectedResources()) {

      if (resource instanceof Register) {
        connectRegister(module, (Register) resource, frame);
      }
    }

    copyPinConnections(module, frame);
  }