Logo Search packages:      
Sourcecode: fauhdlc version File versions

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

Visit a SigAssignStat

Parameters:
node SigAssignStat node that gets visited.

Reimplemented from ast::TopDownVisitor.

Definition at line 422 of file GenCode.cpp.

References ast::AstNode::accept(), assignExpression, container, dataOp, destRegs, ast::RegisterSet::getValue(), intermediate::ImmediateOperand::getZero(), isTarget, sourceRegs, ast::SigAssignStat::target, and ast::SigAssignStat::waveForm.

{
      this->sourceRegs = RegisterSet(*this->container);
      this->destRegs = RegisterSet(*this->container);

      assert(node.target);
      assert(node.waveForm);

      this->isTarget = true;
      this->assignExpression = false;
      node.target->accept(*this);
      this->destRegs = this->sourceRegs;

      this->isTarget = false;

      //traverse to waveform elements
      for (std::list<WaveFormElem*>::const_iterator i = 
            node.waveForm->begin(); i != node.waveForm->end(); i++) {
      
            this->sourceRegs = RegisterSet(*this->container);
            if ((*i)->delay != NULL) {
                  (*i)->accept(*this);
                  this->dataOp = 
                        this->sourceRegs.getValue(
                                    (*i)->delay->baseType);
                  this->sourceRegs = RegisterSet(*this->container);
            } else {
                  this->dataOp = ImmediateOperand::getZero();
            }
            this->assignExpression = true;
            assert((*i)->value != NULL);
            (*i)->value->accept(*this);   
      }

      this->dataOp = NULL;
}


Generated by  Doxygen 1.6.0   Back to index