示例#1
0
  /**
   * The Design should be the first Visitable that is visited by the GlobalConnector, indicating the
   * initialization of processing.
   *
   * @param design Description of Parameter
   */
  @Override
  public void visit(Design design) {
    if (_schedule.db) {
      _schedule.ln(_schedule.GVISIT, "visiting design " + design);
    }
    final GenericJob job = EngineThread.getGenericJob();

    this.design = design;

    beginFrame();
    traverse(design);
    connectGlobalRegisters(design, getFrame());
    generateKickers();

    if (job.getUnscopedBooleanOptionValue(OptionRegistry.NO_BLOCK_IO)) {
      connectTasks(design);
    }

    design.accept(new MemoryConnectionVisitor());
    // Connect all SimplePinRead and SimplePinWrite accesses to
    // their targetted pins.
    design.accept(new SimplePinConnector());

    // Connect clock and reset to all design module elements. Do
    // this last in case any of the other connectors add global
    // level stuff.
    for (Component designComp : design.getDesignModule().getComponents()) {
      // Find the clock domain for each design level element and
      // connect the clock and/or reset pins.
      final String domainSpec =
          (String)
              ((OptionString) EngineThread.getGenericJob().getOption(OptionRegistry.CLOCK_DOMAIN))
                  .getValue(designComp.getSearchLabel());
      assert domainSpec != null : "No clock domain specifier found for " + designComp;
      design.getClockDomain(domainSpec).connectComponentToDomain(designComp);
    }
  }