source: branch/giet_vm_ioc_drivers/mappings/4c_1p_sort.xml @ 283

Last change on this file since 283 was 271, checked in by cfuguet, 10 years ago
  • Bugfix: The ISR_SWITCH index should be NB_PROCS_MAX + local_pid. This is because the first NB_PROCS_MAX indexes on the XICU in each cluster are used for the WAKEUP software interrupts.
  • Relocating the memcpy and memset functions into the giet_libs/stdlib.* files.
  • Modification of the sort application to used 8 threads instead of
    1. Modifying the mapping files to distribute the 8 threads on the available processors. (Ex. When using 4 processors, each one executes 2 threads)
File size: 18.3 KB
Line 
1<?xml version="1.0"?>
2
3<mapping_info signature    = "0xdeadbeef" 
4              name         = "4c_1p_sort" 
5              x_size       = "2" 
6              y_size       = "2" 
7              x_width      = "4"
8              y_width      = "4"
9              vspaces      = "1"
10              increment    = "0x10000" >
11
12*** The "increment" parameter is the virtual address cluster increment
13*** The physical address cluster increment is 0x10000000000 / NB_CLUSTERS
14
15*** This first section describes an instance of the "tsar_generic_iob" architecture
16*** with 4 clusters, 1 processor per cluster and 40 bits physical address.
17
18    <clusterset>
19
20        <cluster x = "0" y = "0" >
21            <pseg name = "PSEG_RAM"  type = "RAM"  base = "0x0000000000" length = "0x0001000000" />
22            <pseg name = "PSEG_XCU"  type = "PERI" base = "0x00B0000000" length = "0x0000002000" />
23            <pseg name = "PSEG_DMA"  type = "PERI" base = "0x00B1000000" length = "0x0000008000" />
24            <pseg name = "PSEG_MMC"  type = "PERI" base = "0x00B8000000" length = "0x0000001000" />
25
26*** Non replicated peripherals (including the ROM containing the preloader code)
27
28            <pseg name = "PSEG_FBF"  type = "PERI" base = "0x00B2000000" length = "0x0000004000" /> 
29            <pseg name = "PSEG_IOC"  type = "PERI" base = "0x00B3000000" length = "0x0000001000" /> 
30            <pseg name = "PSEG_TTY"  type = "PERI" base = "0x00B4000000" length = "0x0000001000" /> 
31            <pseg name = "PSEG_NIC"  type = "PERI" base = "0x00B5000000" length = "0x0000080000" />
32            <pseg name = "PSEG_CMA"  type = "PERI" base = "0x00B6000000" length = "0x0000008000" />
33            <pseg name = "PSEG_ROM"  type = "PERI" base = "0x00BFC00000" length = "0x0000004000" />
34
35            <proc index  = "0" >
36                <irq type = "SOFT" icuid = "0"  isr = "ISR_WAKUP" /> 
37                <irq type = "TIME" icuid = "1"  isr = "ISR_SWITCH" /> 
38
39                <irq type = "HARD" icuid = "16" isr = "ISR_TTY"     channel = "0" /> 
40                <irq type = "HARD" icuid = "17" isr = "ISR_TTY"     channel = "1" /> 
41                <irq type = "HARD" icuid = "18" isr = "ISR_TTY"     channel = "2" /> 
42                <irq type = "HARD" icuid = "19" isr = "ISR_TTY"     channel = "3" /> 
43                <irq type = "HARD" icuid = "20" isr = "ISR_TTY"     channel = "4" /> 
44
45                <irq type = "HARD" icuid = "31" isr = "ISR_IOC" /> 
46            </proc> 
47
48            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1"  /> 
49            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1"  />
50            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1"  />
51            <periph type = "IOC"  psegname = "PSEG_IOC"  channels = "1"  /> 
52            <periph type = "TTY"  psegname = "PSEG_TTY"  channels = "5" /> 
53            <periph type = "NIC"  psegname = "PSEG_NIC"  channels = "2"  />
54            <periph type = "CMA"  psegname = "PSEG_CMA"  channels = "4"  />
55            <periph type = "FBF"  psegname = "PSEG_FBF"  channels = "1"  />
56            <periph type = "ROM"  psegname = "PSEG_ROM"  channels = "1"  />
57
58        </cluster>
59
60        <cluster x = "0" y = "1" >
61            <pseg name = "PSEG_RAM"  type = "RAM"  base = "0x0100000000" length = "0x0001000000" />
62            <pseg name = "PSEG_XCU"  type = "PERI" base = "0x01B0000000" length = "0x0000002000" />
63            <pseg name = "PSEG_DMA"  type = "PERI" base = "0x01B1000000" length = "0x0000008000" />
64            <pseg name = "PSEG_MMC"  type = "PERI" base = "0x01B8000000" length = "0x0000001000" />
65
66            <proc index = "0" >
67                <irq type = "SOFT" icuid = "0" isr = "ISR_WAKUP" />
68                <irq type = "TIME" icuid = "1" isr = "ISR_SWITCH" />
69            </proc>
70
71            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
72            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
73            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
74        </cluster>
75
76        <cluster x = "1" y = "0" >
77            <pseg name = "PSEG_RAM"  type = "RAM"  base = "0x1000000000" length = "0x0001000000" />
78            <pseg name = "PSEG_XCU"  type = "PERI" base = "0x10B0000000" length = "0x0000002000" />
79            <pseg name = "PSEG_DMA"  type = "PERI" base = "0x10B1000000" length = "0x0000008000" />
80            <pseg name = "PSEG_MMC"  type = "PERI" base = "0x10B8000000" length = "0x0000001000" />
81
82            <proc index = "0" >
83                <irq type = "SOFT" icuid = "0" isr = "ISR_WAKUP" />
84                <irq type = "TIME" icuid = "1" isr = "ISR_SWITCH" />
85            </proc>
86
87            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
88            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
89            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
90        </cluster>
91
92        <cluster x = "1" y = "1" >
93            <pseg name = "PSEG_RAM"  type = "RAM"  base = "0x1100000000" length = "0x0001000000" />
94            <pseg name = "PSEG_XCU"  type = "PERI" base = "0x11B0000000" length = "0x0000002000" />
95            <pseg name = "PSEG_DMA"  type = "PERI" base = "0x11B1000000" length = "0x0000008000" />
96            <pseg name = "PSEG_MMC"  type = "PERI" base = "0x11B8000000" length = "0x0000001000" />
97
98            <proc index = "0" >
99                <irq type = "SOFT" icuid = "0" isr = "ISR_WAKUP" />
100                <irq type = "TIME" icuid = "1" isr = "ISR_SWITCH" />
101            </proc>
102
103            <periph type = "DMA"  psegname = "PSEG_DMA"  channels = "1" />
104            <periph type = "XCU"  psegname = "PSEG_XCU"  channels = "1" />
105            <periph type = "MMC"  psegname = "PSEG_MMC"  channels = "1" />
106        </cluster>
107    </clusterset>
108
109    <globalset> 
110
111*** Segments used by the boot code / A[31:28] = 0x0 / Identity mapping
112- seg_boot_mapping is loaded by the boot-loader. It contains the mapping info. The content is reused by the kernel.
113- seg_boot_code and seg_boot data are loaded by the preloader, used by the boot-loader The content is not reused by the kernel.
114- seg_boot_stack is contains the stacks used by all processors during reset and boot. The content is not reused by the Kernel.
115- seg_boot_buffer is used by the boot-loader. It can contain a complete .elf file. The content is not reused by the kernel.
116
117        <vseg name = "seg_boot_mapping"   vbase = "0x00000000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
118            <vobj name = "boot_mapping"   type = "BLOB"   length = "0x00010000" binpath = "map.bin" />
119        </vseg>
120        <vseg name = "seg_boot_code"      vbase = "0x00010000" mode = "CXW_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
121            <vobj name = "boot_code"      type = "BUFFER" length = "0x00020000" />
122        </vseg>
123        <vseg name = "seg_boot_data"      vbase = "0x00030000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
124            <vobj name = "boot_data"      type = "BUFFER" length = "0x00010000" />
125        </vseg>
126        <vseg name = "seg_boot_buffer"    vbase = "0x00040000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
127            <vobj name = "boot_buffer"    type = "BUFFER" length = "0x00020000" />
128        </vseg>
129        <vseg name = "seg_boot_stack"     vbase = "0x00060000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" ident = "1" >
130            <vobj name = "boot_stack"     type = "BUFFER" length = "0x00090000" />
131        </vseg>
132
133*** Segments used by the kernel / A[31:28] = 0x8
134 
135        <vseg name = "seg_kernel_code"    vbase = "0x80000000" mode = "CXW_" x = "0" y = "0" psegname = "PSEG_RAM" > 
136            <vobj name = "kernel_code"    type = "ELF" length = "0x00020000" binpath = "build/kernel/kernel.elf" />
137        </vseg>
138        <vseg name = "seg_kernel_data"    vbase = "0x80020000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" > 
139            <vobj name = "kernel_data"    type = "ELF" length = "0x00060000" binpath = "build/kernel/kernel.elf" />
140                </vseg>
141        <vseg name = "seg_kernel_uncdata" vbase = "0x80080000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_RAM" > 
142            <vobj name = "kernel_uncdata" type = "ELF" length = "0x00040000" binpath = "build/kernel/kernel.elf" />
143        </vseg>
144        <vseg name = "seg_kernel_init"    vbase = "0x800C0000" mode = "CXW_" x = "0" y = "0" psegname = "PSEG_RAM" > 
145            <vobj name = "kernel_init"    type = "ELF" length = "0x00010000" binpath = "build/kernel/kernel.elf" />
146        </vseg>
147
148*** Segments for non replicated peripherals / A[31:28] = 0xB / Identity mapping
149
150        <vseg name = "seg_fbf"            vbase = "0xB2000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_FBF" ident = "1" >
151            <vobj name = "fbf"            type = "PERI" length  = "0x00004000" /> 
152        </vseg>
153        <vseg name = "seg_ioc"            vbase = "0xB3000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_IOC" ident = "1" >
154            <vobj name = "ioc"            type = "PERI" length  = "0x00001000" /> 
155        </vseg>
156        <vseg name = "seg_tty"            vbase = "0xB4000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_TTY" ident = "1" >
157                        <vobj name = "tty"            type = "PERI" length  = "0x00001000" />
158        </vseg>
159        <vseg name = "seg_nic"            vbase = "0xB5000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_NIC" ident = "1" >
160            <vobj name = "nic"            type = "PERI" length  = "0x00080000" /> 
161        </vseg>
162        <vseg name = "seg_cma"            vbase = "0xB6000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_CMA" ident = "1" >
163            <vobj name = "cma"            type = "PERI" length  = "0x00008000" /> 
164        </vseg>
165        <vseg name = "seg_rom"            vbase = "0xBFC00000" mode = "CXW_" x = "0" y = "0" psegname = "PSEG_ROM" ident = "1" >
166            <vobj name = "rom"            type = "PERI" length  = "0x00004000" /> 
167        </vseg>
168
169*** Segments for replicated ICUS / A[31:24] = 0xB0 / Increment = 0x10000 / Identity mapping in cluster 0           
170
171        <vseg name = "seg_icu_0"          vbase = "0xB0000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_XCU" ident = "1" > 
172            <vobj name = "icu_0"          type = "PERI" length  = "0x00001000" /> 
173        </vseg>
174        <vseg name = "seg_icu_1"          vbase = "0xB0010000" mode = "__W_" x = "0" y = "1" psegname = "PSEG_XCU" > 
175            <vobj name = "icu_1"          type = "PERI" length  = "0x00001000" /> 
176        </vseg>
177        <vseg name = "seg_icu_2"          vbase = "0xB0100000" mode = "__W_" x = "1" y = "0" psegname = "PSEG_XCU" > 
178            <vobj name = "icu_2"          type = "PERI" length  = "0x00001000" /> 
179        </vseg>
180        <vseg name = "seg_icu_3"          vbase = "0xB0110000" mode = "__W_" x = "1" y = "1" psegname = "PSEG_XCU" > 
181            <vobj name = "icu_3"          type = "PERI" length  = "0x00001000" /> 
182        </vseg>
183
184*** segments for replicated DMAs / A[31:24] = 0xB1 / Increment = 0x10000 / Tdentity mapping in cluster 0
185*** The peripheral type must be entirely defined by the 8 virtual address MSB bits (mask_type = 0xFF000000)
186*** The cluster id must be encoded in the next 8 virtual address bits (cluster_mask = 0x00FF0000)
187
188        <vseg name = "seg_dma_0"          vbase = "0xB1000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_DMA" ident = "1" >
189            <vobj name = "dma_0"          type = "PERI" length  = "0x00008000" />
190        </vseg>
191        <vseg name = "seg_dma_1"          vbase = "0xB1010000" mode = "__W_" x = "0" y = "1" psegname = "PSEG_DMA" >
192            <vobj name = "dma_1"          type = "PERI" length  = "0x00008000" />
193        </vseg>
194        <vseg name = "seg_dma_2"          vbase = "0xB1100000" mode = "__W_" x = "1" y = "0" psegname = "PSEG_DMA" >
195            <vobj name = "dma_2"          type = "PERI" length  = "0x00008000" />
196        </vseg>
197        <vseg name = "seg_dma_3"          vbase = "0xB1110000" mode = "__W_" x = "1" y = "1" psegname = "PSEG_DMA" >
198            <vobj name = "dma_3"          type = "PERI" length  = "0x00008000" />
199        </vseg>
200
201*** segments for replicated MMC / A[31:24] = 0xB8 / Increment = 0x10000 / Identity mapping in cluster 0
202*** The peripheral type must be entirely defined by the 8 virtual address MSB bits (mask_type = 0xFF000000)
203*** The cluster id must be encoded in the next 8 virtual address bits (cluster_mask = 0x00FF0000)
204
205        <vseg name = "seg_memc_0"         vbase = "0xB8000000" mode = "__W_" x = "0" y = "0" psegname = "PSEG_MMC" ident = "1" >
206            <vobj name = "memc_0"         type = "PERI" length  = "0x00001000" />
207        </vseg>
208        <vseg name = "seg_memc_1"         vbase = "0xB8010000" mode = "__W_" x = "0" y = "1" psegname = "PSEG_MMC" >
209            <vobj name = "memc_1"         type = "PERI" length  = "0x00001000" />
210        </vseg>
211        <vseg name = "seg_memc_2"         vbase = "0xB8100000" mode = "__W_" x = "1" y = "0" psegname = "PSEG_MMC" >
212            <vobj name = "memc_2"         type = "PERI" length  = "0x00001000" />
213        </vseg>
214        <vseg name = "seg_memc_3"         vbase = "0xB8110000" mode = "__W_" x = "1" y = "1" psegname = "PSEG_MMC" >
215            <vobj name = "memc_3"         type = "PERI" length  = "0x00001000" />
216        </vseg>
217
218*** segments for replicated schedulers / A[31:28] = 0xF / Increment = 0x10000
219*** The type must be entirely defined by the 8 virtual address MSB bits (mask_type = 0xFF000000)
220*** The cluster id must be encoded in the next 8 virtual address bits (cluster_mask = 0x00FF0000)
221
222        <vseg name = "seg_sched_0"        vbase = "0xF0000000" mode = "C_W_" x = "0" y = "0" psegname = "PSEG_RAM" >
223            <vobj name = "sched_0"        type = "SCHED" length  = "0x00008000" />
224        </vseg>
225        <vseg name = "seg_sched_1"        vbase = "0xF0010000" mode = "C_W_" x = "0" y = "1" psegname = "PSEG_RAM" >
226            <vobj name = "sched_1"        type = "SCHED" length  = "0x00008000" />
227        </vseg>
228        <vseg name = "seg_sched_2"        vbase = "0xF0100000" mode = "C_W_" x = "1" y = "0" psegname = "PSEG_RAM" >
229            <vobj name = "sched_2"        type = "SCHED" length  = "0x00008000" />
230        </vseg>
231        <vseg name = "seg_sched_3"        vbase = "0xF0110000" mode = "C_W_" x = "1" y = "1" psegname = "PSEG_RAM" >
232            <vobj name = "sched_3"        type = "SCHED" length  = "0x00008000" />
233        </vseg>
234***
235    </globalset> 
236
237    <vspaceset>
238
239*** For each vspace, the startname field is the name of the vobj containing the start_vector (entry point array)
240*** For each task, the startid field define the task entry point as an index in the start_vector
241*** For each task, the clusterid and proclocid arguments define the task static placement
242*** For each task, the stackname field is the name of the vobj containing the task stack
243*** For each task, the heapname field is the name of the vobj containing the task heap
244
245        <vspace name = "sort" startname = "sort_data" > 
246            <vseg name = "seg_sort_code"   vbase = "0x00400000" mode = "CXWU" x = "1" y = "1" psegname = "PSEG_RAM" > 
247                <vobj name = "sort_code"   type  = "ELF" length = "0x00010000" binpath = "build/sort/sort.elf" /> 
248            </vseg>
249            <vseg name = "seg_sort_data"   vbase = "0x00500000" mode = "__WU" x = "1" y = "1" psegname = "PSEG_RAM" >
250                <vobj name = "sort_data"   type  = "ELF" length = "0x00010000" binpath = "build/sort/sort.elf" />
251            </vseg>
252            <vseg name = "seg_sort_ptab"   vbase = "0x00600000" mode = "C_W_" x = "1" y = "1" psegname = "PSEG_RAM" > 
253                <vobj name = "sort_ptab"   type  = "PTAB" length  = "0x00020000" align   = "13" />
254            </vseg>
255            <vseg name = "seg_sort_stack0" vbase = "0x00800000" mode = "C_WU" x = "0" y = "0" psegname = "PSEG_RAM" >
256                <vobj name = "sort_stack0" type  = "BUFFER" length = "0x00010000" /> 
257                <vobj name = "sort_stack1" type  = "BUFFER" length = "0x00010000" /> 
258                <vobj name = "sort_heap0"  type  = "BUFFER" length = "0x00010000" /> 
259            </vseg>
260            <vseg name = "seg_sort_stack1" vbase = "0x00A00000" mode = "C_WU" x = "0" y = "1" psegname = "PSEG_RAM" >
261                <vobj name = "sort_stack2" type  = "BUFFER" length = "0x00010000" /> 
262                <vobj name = "sort_stack3" type  = "BUFFER" length = "0x00010000" /> 
263                <vobj name = "sort_heap1"  type  = "BUFFER" length = "0x00010000" /> 
264            </vseg>
265            <vseg name = "seg_sort_stack2" vbase = "0x00C00000" mode = "C_WU" x = "1" y = "0" psegname = "PSEG_RAM" >
266                <vobj name = "sort_stack4" type  = "BUFFER" length = "0x00010000" /> 
267                <vobj name = "sort_stack5" type  = "BUFFER" length = "0x00010000" /> 
268                <vobj name = "sort_heap2"  type  = "BUFFER" length = "0x00010000" /> 
269            </vseg>
270            <vseg name = "seg_sort_stack3" vbase = "0x00E00000" mode = "C_WU" x = "1" y = "1" psegname = "PSEG_RAM" >
271                <vobj name = "sort_stack6" type  = "BUFFER" length = "0x00010000" /> 
272                <vobj name = "sort_stack7" type  = "BUFFER" length = "0x00010000" /> 
273                <vobj name = "sort_heap3"  type  = "BUFFER" length = "0x00010000" /> 
274            </vseg>
275
276            <task name = "sort_0" trdid = "0" x = "0" y = "0" proclocid = "0" stackname = "sort_stack0" heapname = "sort_heap0" startid = "0" usetty = "1" />
277            <task name = "sort_1" trdid = "1" x = "0" y = "0" proclocid = "0" stackname = "sort_stack1" heapname = "sort_heap0" startid = "0" usetty = "1" />
278            <task name = "sort_2" trdid = "2" x = "0" y = "1" proclocid = "0" stackname = "sort_stack2" heapname = "sort_heap1" startid = "0" usetty = "1" />
279            <task name = "sort_3" trdid = "3" x = "0" y = "1" proclocid = "0" stackname = "sort_stack3" heapname = "sort_heap1" startid = "0" usetty = "1" />
280            <task name = "sort_4" trdid = "4" x = "1" y = "0" proclocid = "0" stackname = "sort_stack4" heapname = "sort_heap2" startid = "0" usetty = "1" />
281            <task name = "sort_5" trdid = "5" x = "1" y = "0" proclocid = "0" stackname = "sort_stack5" heapname = "sort_heap2" startid = "0" usetty = "1" />
282            <task name = "sort_6" trdid = "6" x = "1" y = "1" proclocid = "0" stackname = "sort_stack6" heapname = "sort_heap3" startid = "0" usetty = "1" />
283            <task name = "sort_7" trdid = "7" x = "1" y = "1" proclocid = "0" stackname = "sort_stack7" heapname = "sort_heap3" startid = "0" usetty = "1" />
284        </vspace>
285    </vspaceset>
286</mapping_info>
Note: See TracBrowser for help on using the repository browser.