Ignore:
Timestamp:
Mar 26, 2014, 6:44:44 PM (11 years ago)
Author:
alain
Message:

Introducing a major release, to suppoort the tsar_generic_leti platform
and the various (external or internal) peripherals configurations.
The map.xml format has been modified, in order to support the new
vci_iopic componentand a new policy for peripherals initialisation.
The IRQs are nom described in the XICU and IOPIC components
(and not anymore in the processors).
To enforce this major change, the map.xml file signature changed:
The signature value must be: 0xDACE2014

This new release has been tested on the tsar_generic_leti platform
for the following mappings:

  • 4c_4p_sort_leti
  • 4c_4p_sort_leti_ext
  • 4c_4p_transpose_leti
  • 4c_4p_transpose_leti_ext
  • 4c_1p_four_leti_ext
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/router/main.c

    r264 r295  
    22#include "mwmr_channel.h"
    33#include "mapping_info.h"
     4#include "hard_config.h"
    45
    5 #define NMAX 200
     6#define NMAX 50
    67
    78/////////////////////////////////////////////
     
    1314    mwmr_channel_t*     mwmr;
    1415
    15     giet_tty_printf( "*** Starting task producer on processor %d", giet_procid() );
    16     giet_tty_printf( " at cycle %d ***\n\n", giet_proctime() );
     16    unsigned int    procid     = giet_procid();
     17    unsigned int    cluster_xy = procid/NB_PROCS_MAX;
     18    unsigned int    lpid       = procid%NB_PROCS_MAX;
     19    unsigned int    x          = cluster_xy >> Y_WIDTH;
     20    unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
    1721
    18     if( giet_vobj_get_vbase( "router" ,
    19                              "mwmr_in",
    20                              VOBJ_TYPE_MWMR,
    21                              (void*)&mwmr ) )
    22     {
    23         giet_tty_printf( "\n[ERROR] in producer task :\n");
    24         giet_tty_printf( "          undefined <mwmr_in> channel: %d\n", mwmr);
    25         giet_tty_printf( "*** &mwmr_in = %x\n\n", (unsigned int)mwmr );
    26         giet_exit();
    27     }
     22    giet_tty_printf( "*** Starting task producer on processor[%d,%d,%d] at cycle %d\n\n",
     23                      x, y, lpid, giet_proctime() );
     24
     25    giet_vobj_get_vbase( "router" ,
     26                         "mwmr_in",
     27                         (void*)&mwmr );
    2828
    2929    // main loop : display token value = source index
     
    3535    }
    3636
    37     giet_tty_printf( "\n*** Completing producer task at cycle %d ***\n", giet_proctime());
    38     giet_exit();
     37    giet_exit( "Producer task completed");
    3938
    4039} // end producer()
     
    4746    mwmr_channel_t*     mwmr;
    4847
    49     giet_tty_printf( "*** Starting task consumer on processor %d", giet_procid() );
    50     giet_tty_printf( " at cycle %d ***\n\n", giet_proctime() );
     48    unsigned int    procid     = giet_procid();
     49    unsigned int    cluster_xy = procid/NB_PROCS_MAX;
     50    unsigned int    lpid       = procid%NB_PROCS_MAX;
     51    unsigned int    x          = cluster_xy >> Y_WIDTH;
     52    unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
    5153
    52     if ( giet_vobj_get_vbase( "router" ,
    53                               "mwmr_out",
    54                               VOBJ_TYPE_MWMR,
    55                               (void*)&mwmr ) )
    56     {
    57         giet_tty_printf( "\n[ERROR] in consumer task :\n");
    58         giet_tty_printf( "          undefined <mwmr_out> channel\n");
    59         giet_exit();
    60     }
     54    giet_tty_printf( "*** Starting task consumer on processor[%d,%d,%d] at cycle %d\n\n",
     55                      x, y, lpid, giet_proctime() );
     56
     57    giet_vobj_get_vbase( "router" ,
     58                         "mwmr_out",
     59                         (void*)&mwmr );
    6160
    6261    // main loop : display token arrival index and value
     
    6766    }
    6867
    69     giet_tty_printf( "\n*** Completing consumer task at cycle %d ***\n", giet_proctime());
    70     giet_exit();
     68    giet_exit( "Consumer task completed");
    7169
    7270} // end consumer()
     
    7674{
    7775    unsigned int        buf;
    78     unsigned int        x;
     76    unsigned int        n;
    7977    unsigned int        tempo;
    8078    mwmr_channel_t*     mwmr_in ;
    8179    mwmr_channel_t* mwmr_out ;
    8280
    83    
    84     giet_tty_printf( "*** Starting task router on processor %d", giet_procid() );
    85     giet_tty_printf( " at cycle %d ***\n\n", giet_proctime() );
     81    unsigned int    procid     = giet_procid();
     82    unsigned int    cluster_xy = procid/NB_PROCS_MAX;
     83    unsigned int    lpid       = procid%NB_PROCS_MAX;
     84    unsigned int    x          = cluster_xy >> Y_WIDTH;
     85    unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
    8686
    87     if ( giet_vobj_get_vbase( "router" ,
    88                               "mwmr_out",
    89                               VOBJ_TYPE_MWMR,
    90                               (void*)&mwmr_out ) )
    91     {
    92         giet_tty_printf( "\n[ERROR] in router task :\n");
    93         giet_tty_printf( "          undefined <mwmr_in> channel\n");
    94         giet_exit();
    95     }
     87    giet_tty_printf( "*** Starting task router on processor[%d,%d,%d] at cycle %d\n\n",
     88                      x, y, lpid, giet_proctime() );
    9689
    97     if (  giet_vobj_get_vbase( "router" ,
    98                                "mwmr_in",
    99                                VOBJ_TYPE_MWMR,
    100                                (void*)&mwmr_in ) )
    101     {
    102         giet_tty_printf( "\n[ERROR] in router task :\n");
    103         giet_tty_printf( "          undefined <mwmr_out> channel\n");
    104         giet_exit();
    105     }
     90    giet_vobj_get_vbase( "router" ,
     91                         "mwmr_out",
     92                         (void*)&mwmr_out );
    10693
     94    giet_vobj_get_vbase( "router" ,
     95                         "mwmr_in",
     96                         (void*)&mwmr_in );
    10797    // main loop
    10898    while(1)
     
    110100        mwmr_read( mwmr_in , &buf , 1 );
    111101        tempo = giet_rand() >> 6;
    112         for ( x = 0 ; x < tempo ; x++ ) asm volatile ("");
     102        for ( n = 0 ; n < tempo ; n++ ) asm volatile ("");
    113103        giet_tty_printf( "token value : %d / temporisation = %d\n", buf, tempo);
    114104        mwmr_write( mwmr_out, &buf , 1 );
Note: See TracChangeset for help on using the changeset viewer.