#NEWLINE# def getBindSubset( self , termname , visited_sources = set ( ) ) : #NEWLINE# #INDENT# term = self . getTerm ( termname ) #NEWLINE# if ( term is None ) : #NEWLINE# #INDENT# raise verror . DefinitionError ( 'No such signal' ) #NEWLINE# #UNINDENT# bindlist = self . getBindlist ( termname ) #NEWLINE# nextsources = visited_sources . copy ( ) #NEWLINE# ret_binds = collections . OrderedDict ( ) #NEWLINE# for bind in bindlist : #NEWLINE# #INDENT# if ( not ( termname in ret_binds ) ) : #NEWLINE# #INDENT# ret_binds [ termname ] = [ ] #NEWLINE# #UNINDENT# ret_binds [ termname ] . append ( bind ) #NEWLINE# if bind . isClockEdge ( ) : #NEWLINE# #INDENT# clock_name = bind . getClockName ( ) #NEWLINE# if ( clock_name != util . toTermname ( ( self . topmodule , self . clock_name ) ) ) : #NEWLINE# #INDENT# ( r_binds , r_sources ) = self . getBindSubset ( clock_name , nextsources ) #NEWLINE# nextsources |= r_sources #NEWLINE# ret_binds = util . dictlistmerge ( ret_binds , r_binds ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# sources = self . getBindSources ( termname ) #NEWLINE# for source in r_sources : #NEWLINE# #INDENT# if ( source in visited_sources ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# nextsources . add ( source ) #NEWLINE# ( r_binds , r_sources ) = self . getBindSubset ( source , nextsources ) #NEWLINE# ret_binds = util . dictlistmerge ( ret_binds , r_binds ) #NEWLINE# nextsources |= r_sources #NEWLINE# #UNINDENT# return ( ret_binds , nextsources )