<s> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> class CoramBase ( object ) : <EOL> def __init__ ( self , idx , datawidth , size , length , scattergather , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> self . idx = idx <EOL> self . datawidth = datawidth <EOL> self . size = size <EOL> self . length = length <EOL> self . scattergather = scattergather <EOL> self . name = '<STR_LIT>' . join ( ( self . __class__ . __name__ . lower ( ) , '<STR_LIT:_>' , str ( self . idx ) ) ) <EOL> self . addrwidth = addrwidth <EOL> self . addroffset = addroffset <EOL> self . loglength = loglength <EOL> self . ext_datawidth = ext_datawidth <EOL> self . numranks = numranks <EOL> self . lognumranks = lognumranks <EOL> self . numpages = numpages <EOL> self . lognumpages = lognumpages <EOL> def __repr__ ( self ) : <EOL> ret = [ ] <EOL> ret . append ( self . __class__ . __name__ ) <EOL> ret . append ( '<STR_LIT>' ) <EOL> ret . append ( str ( self . idx ) ) <EOL> if self . length is not None : <EOL> ret . append ( '<STR_LIT>' ) <EOL> ret . append ( str ( self . length ) ) <EOL> ret . append ( '<STR_LIT>' ) <EOL> ret . append ( str ( self . addrwidth ) ) <EOL> ret . append ( '<STR_LIT>' ) <EOL> ret . append ( str ( self . datawidth ) ) <EOL> ret . append ( '<STR_LIT:)>' ) <EOL> return '<STR_LIT>' . join ( ret ) <EOL> class CoramMemory ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self , ram_addr , mem_addr , size ) : <EOL> pass <EOL> def write ( self , ram_addr , mem_addr , size ) : <EOL> pass <EOL> def read_nonblocking ( self , ram_addr , mem_addr , size ) : <EOL> pass <EOL> def write_nonblocking ( self , ram_addr , mem_addr , size ) : <EOL> pass <EOL> def wait ( self ) : <EOL> pass <EOL> def test ( self ) : <EOL> return True <EOL> class CoramStream ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self , mem_addr , size ) : <EOL> pass <EOL> def write ( self , mem_addr , size ) : <EOL> pass <EOL> def read_nonblocking ( self , mem_addr , size ) : <EOL> pass <EOL> def write_nonblocking ( self , mem_addr , size ) : <EOL> pass <EOL> def wait ( self ) : <EOL> pass <EOL> def test ( self ) : <EOL> return True <EOL> class CoramInStream ( CoramStream ) : pass <EOL> class CoramOutStream ( CoramStream ) : pass <EOL> class CoramChannel ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self ) : <EOL> return <NUM_LIT:0> <EOL> def write ( self , value ) : <EOL> pass <EOL> class CoramRegister ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self ) : <EOL> return <NUM_LIT:0> <EOL> def write ( self , value ) : <EOL> pass <EOL> class CoramIoChannel ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self ) : <EOL> return <NUM_LIT:0> <EOL> def write ( self , value ) : <EOL> pass <EOL> class CoramIoRegister ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self ) : <EOL> return <NUM_LIT:0> <EOL> def write ( self , value ) : <EOL> pass <EOL> class CoramSlaveStream ( CoramBase ) : <EOL> def __init__ ( self , idx , datawidth = None , size = None , length = None , scattergather = None , <EOL> addrwidth = None , addroffset = None , loglength = None , <EOL> ext_datawidth = None , numranks = None , lognumranks = None , <EOL> numpages = None , lognumpages = None ) : <EOL> CoramBase . __init__ ( self , idx = idx , datawidth = datawidth , size = size , length = length , scattergather = scattergather , <EOL> addrwidth = addrwidth , addroffset = addroffset , loglength = loglength , <EOL> ext_datawidth = ext_datawidth , numranks = numranks , lognumranks = lognumranks , <EOL> numpages = numpages , lognumpages = lognumpages ) <EOL> def read ( self ) : <EOL> return <NUM_LIT:0> <EOL> def write ( self , value ) : <EOL> pass <EOL> class ControlThread ( object ) : <EOL> def __init__ ( self , name , memories , instreams , outstreams , <EOL> channels , registers , iochannels , ioregisters ) : <EOL> self . name = name <EOL> self . memories = memories <EOL> self . instreams = instreams <EOL> self . outstreams = outstreams <EOL> self . channels = channels <EOL> self . registers = registers <EOL> self . iochannels = iochannels <EOL> self . ioregisters = ioregisters </s>
