Changeset 356 for soft/giet_vm/giet_python
- Timestamp:
- Jul 3, 2014, 4:50:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_python/mapping.py
r348 r356 144 144 y_io = 0, # cluster_io y coordinate 145 145 peri_increment = 0x10000, # address increment for globals 146 reset_address = 0xBFC00000 ): # Processor wired boot_address 146 reset_address = 0xBFC00000, # Processor wired boot_address 147 ram_base = 0, # RAM physical base address in cluster[0,0] 148 ram_size = 0 ): # RAM size in each cluster (bytes) 147 149 148 150 self.signature = 0xDACE2014 … … 161 163 self.peri_increment = peri_increment 162 164 self.reset_address = reset_address 165 self.ram_base = ram_base 166 self.ram_size = ram_size 167 163 168 164 169 self.total_vspaces = 0 … … 193 198 194 199 # check coordinates (obtained from the base address) 195 cluster_xy = base >> (self.paddr_width - self.x_width - self.y_width) 200 paddr_lsb_width = self.paddr_width - self.x_width - self.y_width 201 cluster_xy = base >> paddr_lsb_width 196 202 x = cluster_xy >> (self.y_width); 197 203 y = cluster_xy & ((1 << self.y_width) - 1) … … 201 207 assert (x < self.x_size) and (y < self.y_size) 202 208 209 assert ( (base & ((1<<paddr_lsb_width)-1)) == self.ram_base ) 210 211 assert ( size == self.ram_size ) 212 203 213 cluster_id = (x * self.y_size) + y 204 214 … … 1118 1128 s += '\n' 1119 1129 1120 s += '/* physical base addresses for peripherals */\n' 1130 s += '/* base addresses and sizes for physical segments */\n' 1131 s += '\n' 1132 s += '#define SEG_RAM_BASE 0x%x\n' % self.ram_base 1133 s += '#define SEG_RAM_SIZE 0x%x\n' % self.ram_size 1121 1134 s += '\n' 1122 1135 s += '#define SEG_CMA_BASE 0x%x\n' % seg_cma_base
Note: See TracChangeset
for help on using the changeset viewer.