• R/O
  • SSH

stock: コミット

definitions & routines shared by projects


コミットメタ情報

リビジョン7889ba6d0ee429c0232b690218f2399ef8f578f4 (tree)
日時2020-02-14 06:14:36
作者PJ
コミッターPJ

ログメッセージ

netlist/netlist.py

変更サマリ

差分

diff -r afedda61b8b3 -r 7889ba6d0ee4 netlist/netlist.py
--- a/netlist/netlist.py Tue Feb 11 21:13:25 2020 +0000
+++ b/netlist/netlist.py Thu Feb 13 21:14:36 2020 +0000
@@ -329,17 +329,27 @@
329329 return False
330330 print device.name, pin_name, 'connected to net', net_name, 'instances:', len(pins), pins
331331 return True
332+
333+# pin number
334+ def find_connecting_net(self, device, pin):
335+ node = Node((device.ref, pin))
336+ net_name = self.find_net(node)
337+ if net_name == None:
338+ return None # not on any net
339+ if len(self.netlist[net_name]) == 1:
340+ return None # sigle node net
341+ print device.name, pin, 'connected to', net_name, self.netlist[net_name]
342+ return net_name
343+
344+# pin name
332345 def unconnected_all(self, device, pin_name):
333346 pins = device.pinout.pins(pin_name)
334347 if pins == []:
335348 print 'no pin matches', pin_name, 'in', device.name
336349 assert(0)
337350 for pin in pins:
338- node = Node((device.ref, pin))
339- net_name = self.find_net(node)
340- if net_name == None:
341- continue # not on any net - OK
342- if len(self.netlist[net_name]) != 1:
351+ net_name = self.find_connecting_net(device, pin)
352+ if net_name != None:
343353 print device.name, pin_name, pin, 'connected to', net_name, self.netlist[net_name]
344354 return False
345355 print device.name, pin_name, 'single node nets, instances:', len(pins)
旧リポジトリブラウザで表示