gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnucap-devel] collapsing nodes. was: Re: Summer of code: Gschem analysi


From: Felix Salfelder
Subject: [Gnucap-devel] collapsing nodes. was: Re: Summer of code: Gschem analysis for parsing
Date: Thu, 17 May 2012 11:25:59 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 16, 2012 at 11:06:14PM -0400, al davis wrote:
> or eventually with the right model compiler:
> 
> module net(pin1,pin2);
>   output pin1,pin2;
>   electrical pin1,pin2;
>   analog
>     V(pin1,pin2) <+ 0;
> endmodule

i was wondering, how this can be implemented. it seems to me, that
something similar to

void node_t::collapse(CARD* d, string to)
{
  assert(d);

  NODE_MAP* Map = d->scope()->nodes();
  assert(Map);
  NODE* targetnode = dynamic_cast<NODE*>((*Map)[to]);
  if (_nnn._user_number != targetnode._user_number){
    collapsed_nodes.push_back(_nnn._user_number);
    _nnn._user_number = targetnode._user_number;
  }
}

needs to be added to the node interface (where collapsed_nodes must be taken
care of later during node allocation/mapping).

depending on how involved this is, i might give it a try. collapsing
zero resistors would be fine anyway. am i missing something?

regards
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]