Changes between Version 10 and Version 11 of DsxDocumentation


Ignore:
Timestamp:
Jan 28, 2008, 6:35:17 PM (16 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DsxDocumentation

    v10 v11  
    8181footprint is reduced, at the cost of loosing the POSIX compatibility.
    8282
    83 == C)  Defining the software application ==
     83== C)  Software application definition ==
    8484
    8585This section describes the DSX/L syntax used to define the Task & Communication Graph structure.
     
    9696As a software application can instanciate several instances of the same task, we must distinguish the task, and the task model. A task model defines the code associated to the task, and the task interface (corresponding to the system resources used by the task : MWMR communications channels, synchronization barriers, locks, and memspaces).
    9797{{{
    98 Task_Model = TaskModel( 'model_name',
     98task_model = TaskModel( 'model_name',
    9999                    infifos = [ 'inport_name', ... ] ,
    100100                    outfifos = [ 'outport_name', ... ] ,
     
    122122For performances reasons the channel ''width'' itself must be a multiple of 4 bytes.
    123123{{{ 
    124 My_Channel = Mwmr( 'channel_name', width, depth )
     124my_channel = Mwmr( 'channel_name', width, depth )
    125125}}}
    126126In the mapping section of the DSX/L program, the 4 following software objects must be placed :
     
    136136is defined when the the tasks are intanciated. Exclusive access to the barrier is protected by an implicit lock.
    137137{{{
    138 My_Barrier = Barrier( 'barrier_name' )
     138my_barrier = Barrier( 'barrier_name' )
    139139}}}
    140140In the mapping section of the DSX/L program, the 3 following software objects must be placed :
     
    149149the number of bytes to be reserved.
    150150{{{
    151 My_Shared_Buffer = Memspave( ''memspace_name', size )
     151my_buffer = Memspace( ''buiffer_name', size )
    152152}}}
    153153In the mapping section of the DSX/L program, the 2 following software objects must be placed :
     
    161161has been obtained.
    162162{{{
    163 My_Lock = Lock( 'lock_name' )
     163my_lock = Lock( 'lock_name' )
    164164}}}
    165165In the mapping section of the DSX/L program, the lock can be explicitely placed in the memory space.
     
    170170''Task_Model'' (created by the TaskModel() function), and a list of resources (MWMR channels, synchronization barriers, locks or memspaces), that must be associated to the task ports. DSX performs type checking between the port name and the associated resource.
    171171{{{
    172 My_Task = Task( 'task_name',
    173                          Task_Model ,
    174                          portmap = { 'port_name' : My_Channel, 'barrier_name' : My_Barrier, ... } )
     172my_task = Task( 'task_name',
     173                         task_model ,
     174                         portmap = { 'port_name' : my_channel, 'barrier_name' : my_barrier, ... } )
    175175}}}
    176176In the mapping section of the DSX/L program, 4 software objects must be placed :
     
    184184The Task and Communication Graph must be defined : 
    185185{{{
    186 My_Tcg = Tcg(
     186my_tcg = Tcg(
    187187             Task(  'task_name1,
    188188                     Task_Model1,
     
    194194}}}
    195195
    196 == D)  Defining the hardware architecture ==
     196== D)  Hardware architecture definition ==
    197197
    198198This section describes the DSX/L syntax used to define the MP-SoC hardware architecture,
    199199using the hardware components defined in the SoCLib library.
    200200
    201 === D1) SoCLib components definition ===
     201=== D1) SoCLib components ===
    202202
    203203In the present version of DSX, each hardware component must be described by a PYTHON
     
    207207{{{
    208208# creation of a MIPS R3000 processor core
    209 My_Proc = Mips( 'proc' )
     209my_proc = Mips( 'proc' )
    210210
    211211# creation of a cache controler
    212 My_Cache = Xcache( 'cache',
     212my_Cache = Xcache( 'cache',
    213213                        dcache_lines = 32,
    214214                        dcache_words = 8,
     
    220220
    221221Hardware components have input/output ports, and are connected through signals,
    222 but those signals are implicit in the DSX/L description. To connect the port a of component c1 to the port b of component c2, DSX/L define the // operator :
     222but those signals are implicit in the DSX/L description. To connect the port '''a''' of component '''c1''' to the port '''b''' of component '''c2''', DSX/L define the // operator :
    223223{{{
    224224c1.a // c2.b
     
    230230{{{
    231231# components instanciacion
    232 My_Proc0 = Mips( 'proc0' )
    233 My_Cache0 = Xcache( 'cache0' )
    234 My_Proc1 = Mips( 'proc1' )
    235 My_Cache1 = Xcache( 'cache1' )
    236 My_Ram = MultiRam( 'ram' )
    237 My_Crossbar = LocalCrossbar( 'crossbar' )
     232my_Proc0 = Mips( 'proc0' )
     233my_Cache0 = Xcache( 'cache0' )
     234my_Proc1 = Mips( 'proc1' )
     235my_Cache1 = Xcache( 'cache1' )
     236my_Ram = MultiRam( 'ram' )
     237my_Crossbar = LocalCrossbar( 'crossbar' )
    238238                     
    239239# components connexion
    240 My_Proc0.cache // My_Cache0.cache
    241 My_Proc1.cache // My_Cache1.cache
    242 My_Crossbar.getTarget() // My_cache0.vci
    243 My_Crossbar.getTarget() // My_cache1.vci
    244 My_Crossbar.getInitiator() // My_cache0.vci
    245 
    246 
     240my_proc0.cache // my_cache0.cache
     241my_proc1.cache // my_cache1.cache
     242my_crossbar.getTarget() // my_cache0.vci
     243my_crossbar.getTarget() // my_cache1.vci
     244my_crossbar.getInitiator() // my_cache0.vci
    247245}}}
    248246}}}
     
    250248=== D3) Address space segmentation ===
    251249
     250All hardware components defining the hardware architecture should be grouped in a single object.
     251As any MP-SoC architecture build with the SoCLib library uses a VCI interconnect hardware component,
     252this component must be declared as the ''root'' of the architecture :
     253{{{
     254my_architecture = Hardware( vgmn )
     255}}}
     256
     257In any shared memory architecture, the address space is a shared resource.  This resource is structured in several segments. A segment has a name, a base address, a size
     258(number of bytes), and a cacheability attribut (Boolean). A segment is a physical entity associated to a
     259given VCI target. Several segments can be associated to the same VCI target, but a given segment cannot be distributed over several VCI targets.
     260
     261The DSX/L language allows the system designer to define the various segments used by a given application,
     262and to link those segments to the hardware components.
     263The base address and the segment size are optional parameters :
     264{{{
     265# segments definition
     266seg_data1 = Segment( 'seg1', Cached )
     267seg_data2 = Segment( 'seg2', Uncached )
     268seg_reset = Segment( 'reset', Cached, addr = 0xBFC00000 )
     269
     270# Instanciating a VCI target hardware component
     271# and Linking  the segments to this component
     272my_ram = MultiRam ( 'ram', seg_data1, seg_data2, seg_reset )
     273}}}
     274
     275As a segment is defined by the MSB bits of the VCI address, the hardware interconnect must decode those MSB bits to select the proper VCI target. The corresponding decoder is generally  implemented as a ROM. Those hardware decoders are automatically constructed using the '''Mapping Table'''. The mapping table is
     276an associative table. Each entry corresponds to a physical segment. This object must be constructed, and initialised:
     277{{{
     278# mapping table construction
     279my_mt = MappingTable()
     280# mapping table initialisation
     281my_hardware.setConfig( 'maptab', my_mt )
     282}}}
     283 
     284
    252285=== D4) Hardware architecture definition ===
    253286
     287
    254288=== D5) Mapping table ===
    255289