gnucap-devel
[Top][All Lists]
Advanced

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

[Gnucap-devel] lang_geda: node order/sckt declaration.


From: Felix Salfelder
Subject: [Gnucap-devel] lang_geda: node order/sckt declaration.
Date: Sat, 15 Dec 2012 10:50:43 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Al.

the following makes trouble:
i'm trying to read in a .sch file as a subckt. think of an
invocation
> geda-sckt my_schematic.sch
i have implemented a DEV_PORT that handles the external connections. in
particular a plugin is responsible for how those ports are supposed to
look like. i see no reason, why the user should know about the number or
names of connections, expecially when (s)he is about to do
> verilog
> list > my_schematic.v
afterwards. semantically, "geda-sckt" is a sort of "include", which is
not supposed to know (from the user), how many ports potential
subcircuits have.

now consider:
CARD_LIST::map_sckt_nodes does
for (i=1; i <= model->net_nodes(); ++i) {
  [...]
  map[i] = [..]
}
(the lower part of) map is used later on to map the e_()'s of the
node_t's of subdevices to the number of the node allocated already.
my understanding is, that this requires the external nodes to be
numbered up from 1.

here the node number originates from how_many() in NODE_MAP::new_node,
which is called when nodes inside of a subckt-declaration are parsed.
in particular, external nodes need to be registered first (which is not
possible here).

in order to make the above "geda-sckt" command work one would either
have to
- change CARD_LIST::map_sckt_nodes. something like 
  map[theactualnumber] = [...]
  is this the only code where the positional number must equal the
  user_number?
- align the nodenumbers after parsing the .sch (which is a huge mess --
  but could finally work out).

is there anything else?

regards
felix



reply via email to

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