Changeset 642 for soft/giet_vm/giet_python
- Timestamp:
- Jul 22, 2015, 12:53:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_python/mapping.py
r633 r642 365 365 def addVspace( self, 366 366 name, # vspace name 367 startname ): # name of vseg containing start_vector 367 startname, # name of vseg containing start_vector 368 active = False ): # default value is not active at boot 368 369 369 370 # add one vspace into mapping 370 vspace = Vspace( name, startname )371 vspace = Vspace( name, startname, active ) 371 372 self.vspaces.append( vspace ) 372 373 vspace.index = self.total_vspaces … … 1917 1918 def __init__( self, 1918 1919 name, 1919 startname ): 1920 startname, 1921 active ): 1920 1922 1921 1923 self.index = 0 # global index ( set by addVspace() ) 1922 1924 self.name = name # vspace name 1923 1925 self.startname = startname # name of vseg containing the start_vector 1926 self.active = active # active at boot if true 1924 1927 self.vsegs = [] 1925 1928 self.tasks = [] … … 1930 1933 def xml( self ): # xml for one vspace 1931 1934 1932 s = ' <vspace name="%s" startname="%s" >\n' % ( self.name, self.startname ) 1935 s = ' <vspace name="%s" startname="%s" active="%d" >\n' \ 1936 %(self.name , self.startname , self.active) 1933 1937 for vseg in self.vsegs: s += vseg.xml() 1934 1938 for task in self.tasks: s += task.xml() … … 1976 1980 byte_stream += mapping.int2bytes(4, first_vseg_id) # global index 1977 1981 byte_stream += mapping.int2bytes(4, first_task_id) # global index 1982 byte_stream += mapping.int2bytes(4, self.active) # always active if non zero 1978 1983 1979 1984 if ( verbose ): … … 1983 1988 print 'vseg_id = %d' % first_vseg_id 1984 1989 print 'task_id = %d' % first_task_id 1990 print 'active = %d' % self.active 1985 1991 1986 1992 return byte_stream
Note: See TracChangeset
for help on using the changeset viewer.