Changes between Version 12 and Version 13 of DsxDocumentation
- Timestamp:
- Jan 28, 2008, 7:28:38 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DsxDocumentation
v12 v13 289 289 290 290 As an example we define a parameterized multi-processors architecture, called MultiProc, and containing 291 a variable number of processors. The parameter(s) must be named, and the actual parameter value is defined when the architecture is instanciated. The parameter is referenced with the ''getParam()'' method :292 {{{ 293 ########################## 291 a variable number of processors. The parameter(s) must be named, and the actual parameter value is defined when the architecture is instanciated. The parameter is referenced with the ''getParam()'' method, and it is possible to define a default value. 292 {{{ 293 ################################# 294 294 # generic architecture definition 295 ################################# 295 296 class MultiProc(Architecture) : 296 297 defaults = { ’nbcpu’ : 2 } … … 323 324 self.setConfig(’mapping_table’, MappingTable() ) 324 325 325 ############################ 326 #################################### 326 327 # generic architecture instanciation 328 #################################### 327 329 my_board = MultiProc( nbcpu = 4 ) 328 330 }}}