Changeset 736 for soft/giet_vm/applications/mjpeg/mjpeg.py
- Timestamp:
- Dec 3, 2015, 4:40:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/mjpeg/mjpeg.py
r723 r736 32 32 nprocs = mapping.nprocs 33 33 34 assert (nprocs >= 1) 34 assert (nprocs >= 1) and (nprocs <= 4) 35 35 36 36 # define vsegs base & size … … 42 42 43 43 heap_base = 0x30000000 44 heap_size = 0x00 100000 # 1Mbytes (per cluster)44 heap_size = 0x00200000 # 2 Mbytes (per cluster) 45 45 46 46 stack_base = 0x40000000 … … 49 49 # create vspace 50 50 vspace = mapping.addVspace( name = 'mjpeg', 51 startname = ' data',51 startname = 'mjpeg_data', 52 52 active = True ) 53 53 54 54 # data vseg : shared / cluster[0][0] 55 mapping.addVseg( vspace, ' data', data_base , data_size,55 mapping.addVseg( vspace, 'mjpeg_data', data_base , data_size, 56 56 'C_WU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 57 57 binpath = 'bin/mjpeg/appli.elf', … … 66 66 base = heap_base + (cluster_id * size) 67 67 68 mapping.addVseg( vspace, ' heap_%d_%d' %(x,y), base , size,68 mapping.addVseg( vspace, 'mjpeg_heap_%d_%d' %(x,y), base , size, 69 69 'C_WU', vtype = 'HEAP', x = x, y = y, pseg = 'RAM', 70 70 local = False, big = True ) … … 76 76 if ( mapping.clusters[cluster_id].procs ): 77 77 78 mapping.addVseg( vspace, ' code_%d_%d' %(x,y),78 mapping.addVseg( vspace, 'mjpeg_code_%d_%d' %(x,y), 79 79 code_base , code_size, 80 80 'CXWU', vtype = 'ELF', x = x, y = y, pseg = 'RAM', … … 85 85 # ... plus main_stack and tg_stack in cluster[0][0] 86 86 base = stack_base 87 mapping.addVseg( vspace, 'm ain_stack',87 mapping.addVseg( vspace, 'mjpeg_main_stack', 88 88 base, stack_size, 'C_WU', vtype = 'BUFFER', 89 89 x = 0 , y = 0 , pseg = 'RAM', … … 92 92 base += stack_size 93 93 94 mapping.addVseg( vspace, ' tg_stack',94 mapping.addVseg( vspace, 'mjpeg_tg_stack', 95 95 base , stack_size, 'C_WU', vtype = 'BUFFER', 96 96 x = 0 , y = 0 , pseg = 'RAM', … … 103 103 if ( mapping.clusters[cluster_id].procs ): 104 104 105 mapping.addVseg( vspace, ' demux_stack_%d_%d' % (x,y),106 base, stack_size, 'C_WU', vtype = 'BUFFER', 107 x = x , y = y , pseg = 'RAM', 108 local = True ) 109 110 base += stack_size 111 112 mapping.addVseg( vspace, ' vld_stack_%d_%d' % (x,y),113 base, stack_size, 'C_WU', vtype = 'BUFFER', 114 x = x , y = y , pseg = 'RAM', 115 local = True ) 116 117 base += stack_size 118 119 mapping.addVseg( vspace, ' iqzz_stack_%d_%d' % (x,y),120 base, stack_size, 'C_WU', vtype = 'BUFFER', 121 x = x , y = y , pseg = 'RAM', 122 local = True ) 123 124 base += stack_size 125 126 mapping.addVseg( vspace, ' idct_stack_%d_%d' % (x,y),127 base, stack_size, 'C_WU', vtype = 'BUFFER', 128 x = x , y = y , pseg = 'RAM', 129 local = True ) 130 131 base += stack_size 132 133 mapping.addVseg( vspace, ' libu_stack_%d_%d' % (x,y),105 mapping.addVseg( vspace, 'mjpeg_demux_stack_%d_%d' % (x,y), 106 base, stack_size, 'C_WU', vtype = 'BUFFER', 107 x = x , y = y , pseg = 'RAM', 108 local = True ) 109 110 base += stack_size 111 112 mapping.addVseg( vspace, 'mjpeg_vld_stack_%d_%d' % (x,y), 113 base, stack_size, 'C_WU', vtype = 'BUFFER', 114 x = x , y = y , pseg = 'RAM', 115 local = True ) 116 117 base += stack_size 118 119 mapping.addVseg( vspace, 'mjpeg_iqzz_stack_%d_%d' % (x,y), 120 base, stack_size, 'C_WU', vtype = 'BUFFER', 121 x = x , y = y , pseg = 'RAM', 122 local = True ) 123 124 base += stack_size 125 126 mapping.addVseg( vspace, 'mjpeg_idct_stack_%d_%d' % (x,y), 127 base, stack_size, 'C_WU', vtype = 'BUFFER', 128 x = x , y = y , pseg = 'RAM', 129 local = True ) 130 131 base += stack_size 132 133 mapping.addVseg( vspace, 'mjpeg_libu_stack_%d_%d' % (x,y), 134 134 base, stack_size, 'C_WU', vtype = 'BUFFER', 135 135 x = x , y = y , pseg = 'RAM', … … 139 139 140 140 # threads mapping: demux, vld, iqzz, idct, libu replicated in all clusters 141 # ... plus main & tg on P[0,0,0]141 # main & tg are mapped in cluster[0,0] 142 142 mapping.addThread( vspace, 'main', True, 0, 0, 0, 143 'm ain_stack',144 ' heap_0_0',143 'mjpeg_main_stack', 144 'mjpeg_heap_0_0', 145 145 0 ) # index in start_vector 146 146 … … 162 162 p_tg = 0 163 163 p_demux = 1 164 p_vld = 1164 p_vld = 2 165 165 p_iqzz = 1 166 p_idct = 2166 p_idct = 1 167 167 p_libu = 1 168 168 elif ( nprocs == 4 ): 169 169 p_tg = 0 170 170 p_demux = 1 171 p_vld = 2171 p_vld = 3 172 172 p_iqzz = 2 173 173 p_idct = 3 174 174 p_libu = 2 175 elif ( nprocs == 5 ):176 p_tg = 0177 p_demux = 1178 p_vld = 2179 p_iqzz = 3180 p_idct = 4181 p_libu = 3182 else:183 p_tg = 0184 p_demux = 1185 p_vld = 2186 p_iqzz = 3187 p_idct = 4188 p_libu = 5189 175 190 176 mapping.addThread( vspace, 'tg', False, 0, 0, p_tg, 191 ' tg_stack',192 ' heap_0_0',177 'mjpeg_tg_stack', 178 'mjpeg_heap_0_0', 193 179 1 ) # index in start_vector 194 180 … … 198 184 199 185 mapping.addThread( vspace, 'demux_%d_%d' % (x,y), False , x, y, p_demux, 200 ' demux_stack_%d_%d' % (x,y),201 ' heap_%d_%d' % (x,y),186 'mjpeg_demux_stack_%d_%d' % (x,y), 187 'mjpeg_heap_%d_%d' % (x,y), 202 188 2 ) # start_index 203 189 204 190 mapping.addThread( vspace, 'vld_%d_%d' % (x,y), False , x, y, p_vld, 205 ' vld_stack_%d_%d' % (x,y),206 ' heap_%d_%d' % (x,y),191 'mjpeg_vld_stack_%d_%d' % (x,y), 192 'mjpeg_heap_%d_%d' % (x,y), 207 193 3 ) # start_index 208 194 209 195 mapping.addThread( vspace, 'iqzz_%d_%d' % (x,y), False , x, y, p_iqzz, 210 ' iqzz_stack_%d_%d' % (x,y),211 ' heap_%d_%d' % (x,y),196 'mjpeg_iqzz_stack_%d_%d' % (x,y), 197 'mjpeg_heap_%d_%d' % (x,y), 212 198 4 ) # start_index 213 199 214 200 mapping.addThread( vspace, 'idct_%d_%d' % (x,y), False , x, y, p_idct, 215 ' idct_stack_%d_%d' % (x,y),216 ' heap_%d_%d' % (x,y),201 'mjpeg_idct_stack_%d_%d' % (x,y), 202 'mjpeg_heap_%d_%d' % (x,y), 217 203 5 ) # start_index 218 204 219 205 mapping.addThread( vspace, 'libu_%d_%d' % (x,y), False , x, y, p_libu, 220 ' libu_stack_%d_%d' % (x,y),221 ' heap_%d_%d' % (x,y),206 'mjpeg_libu_stack_%d_%d' % (x,y), 207 'mjpeg_heap_%d_%d' % (x,y), 222 208 6 ) # start_index 223 209
Note: See TracChangeset
for help on using the changeset viewer.