def setup_pin_list(self): print "setup pin list" pt = self.pin_tree pl = gtk.ListStore(str) pt.set_model(pl) pl.clear() # Create the columns. name_column = gtk.TreeViewColumn() name_column.set_title("Name") cell = gtk.CellRendererText() name_column.pack_start(cell, True) name_column.add_attribute(cell, "text", 0) # Add the columns if they are needed. if pt.get_column(0) is None: pt.insert_column(name_column, 0) # Get a list of the nets in the constraint file. files = self.sc.get_constraint_file_names() netnames = [] for f in files: nn = saputils.get_net_names(f) for n in nn: if n in netnames: continue netnames.append(n) # Now I have a list of net names. for net in netnames: if net == "clk" or net == "rst": continue it = pl.append() pl.set(it, 0, net)
def test_get_net_names(self): filename = "lx9.ucf" netnames = saputils.get_net_names(filename, debug=self.dbg) if self.dbg: print "net names: " for name in netnames: print "\t%s" % name self.assertIn("clk", netnames)
def test_get_net_names(self): filename = "lx9.ucf" netnames = saputils.get_net_names(filename, debug = self.dbg) if self.dbg: print "net names: " for name in netnames: print "\t%s" % name self.assertIn("clk", netnames)