Logo Search packages:      
Sourcecode: fauhdlc version File versions

void ast::GenCode::visit ( Architecture node  )  [private, virtual]

Visit an Architecture node.

Parameters:
node Architecture node that gets visited.

Reimplemented from ast::TopDownVisitor.

Definition at line 141 of file GenCode.cpp.

References archComponents, ast::Architecture::concurrentStats, container, createInitFunction(), intermediate::CodeContainer::DATA_STACK, intermediate::CodeContainer::DATA_TRANSFER, intermediate::CodeContainer::dataMode, ast::LibUnit::declarations, ast::Architecture::entity, ast::Entity::generics, ast::SymbolDeclaration::getICName(), ast::Visitor::listTraverse(), and ast::Entity::ports.

{
      assert(node.entity != NULL);
      assert(this->archComponents.empty());
      CodeContainer *current = this->container;
      this->container = new CodeContainer(node.entity->getICName());

      // handle entity specific parts.
      // FIXME: in case more than one architecture per entity is present,
      //        this won't work! (however that should actually be filtered
      //        out with configurations)
      this->container->dataMode = CodeContainer::DATA_TRANSFER;
      if (node.entity->generics != NULL) {
            this->listTraverse(*node.entity->generics);
      }
      if (node.entity->ports != NULL) {
            this->listTraverse(*node.entity->ports);
      }

      this->container->dataMode = CodeContainer::DATA_STACK;
      if (node.entity->declarations != NULL) {
            this->listTraverse(*node.entity->declarations);
      }

      // FIXME what creation/deletion functions must be present
      //       for a corresponding component instantiation statement?
      // there should be at least an architecture_name_init function
      // that runs the subhierarchy
      // eventually an architecture_name_create function would be
      // suitable as well.
      if (node.declarations != NULL) {
            this->listTraverse(*node.declarations);
      }

      if (node.concurrentStats != NULL) {
            this->listTraverse(*node.concurrentStats);
      }

      this->createInitFunction(node);

      current->addChild(this->container);
      this->container = current;
      this->archComponents.clear();
}


Generated by  Doxygen 1.6.0   Back to index