<s> DSIZE = <NUM_LIT:4> <EOL> RAMSIZE = <NUM_LIT> <EOL> iochannel = CoramIoChannel ( idx = <NUM_LIT:0> , datawidth = <NUM_LIT:32> ) <EOL> ram = CoramMemory ( idx = <NUM_LIT:0> , datawidth = DSIZE * <NUM_LIT:8> , size = RAMSIZE , length = <NUM_LIT:1> , scattergather = False ) <EOL> channel = CoramChannel ( idx = <NUM_LIT:0> , datawidth = <NUM_LIT:32> , size = <NUM_LIT:16> ) <EOL> def body ( ) : <EOL> src = iochannel . read ( ) <EOL> dst = iochannel . read ( ) <EOL> size = iochannel . read ( ) <EOL> while True : <EOL> chunk_size = size if size < RAMSIZE * DSIZE else RAMSIZE * DSIZE <EOL> ram . write ( <NUM_LIT:0> , src , chunk_size / DSIZE ) <EOL> ram . read ( <NUM_LIT:0> , dst , chunk_size / DSIZE ) <EOL> size -= chunk_size <EOL> src += chunk_size <EOL> dst += chunk_size <EOL> if size == <NUM_LIT:0> : break <EOL> iochannel . write ( <NUM_LIT:1> ) <EOL> while True : <EOL> body ( ) </s>
