Ignore:
Timestamp:
Mar 26, 2014, 6:44:44 PM (10 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/gameoflife/main.c

    r263 r295  
    2020
    2121giet_barrier_t barriers[2];
     22
     23unsigned int init_ok = 1;
    2224
    2325#define NEW 0
     
    8082}
    8183
     84//////////////////////////////////////////////////////
    8285void compute_new_gen(size_t base_line, size_t nb_line)
    8386{
    8487   size_t x,y;
    85    for (y = base_line; y < base_line + nb_line; y++){
    86       for(x = 0; x < WIDTH ; x++) {
     88   for (y = base_line; y < base_line + nb_line; y++)
     89   {
     90      for(x = 0; x < WIDTH ; x++)
     91      {
    8792         world[NEW][y][x] = compute_cell(x,y); 
    8893      }
     
    9095}
    9196
     97////////////////////////////////////////////////////
    9298void display_world(size_t base_line, size_t nb_line)
    9399{
     
    100106   }
    101107
    102    if (giet_fb_sync_write(base_line * WIDTH , &world[NEW][base_line][0], nb_line * WIDTH))
    103    {
    104       PRINTF("Echec fb_sync_write\n");
    105       giet_exit();
    106    }
    107    // TODO COLOR !
    108    /*if (giet_fb_sync_write(base_line * WIDTH + WIDTH*HEIGHT , &world_yuv[base_line][0], nb_line * WIDTH))
    109    {
    110       PRINTF("Echec fb_sync_write\n");
    111       giet_exit();
    112    }*/
     108   giet_fb_sync_write( base_line * WIDTH ,
     109                       &world[NEW][base_line][0],
     110                       nb_line * WIDTH);
    113111}
    114112
     113/////////////////////////////////////////////////////
    115114void grow_old_world(size_t base_line, size_t nb_line)
    116115{
    117116   size_t x,y;
    118    for (y = base_line; y < base_line + nb_line; y++){
    119       for(x = 0; x < WIDTH ; x++) {
     117   for (y = base_line; y < base_line + nb_line; y++)
     118   {
     119      for(x = 0; x < WIDTH ; x++)
     120      {
    120121         world[OLD][y][x] = world[NEW][y][x]; 
    121122      }
    122123   }
    123124}
    124 
    125 
    126125
    127126////////////////////////////////////////
     
    131130   unsigned int nlocal_procs  = NB_PROCS_MAX;               // processors per cluster
    132131   unsigned int nclusters     = X_SIZE*Y_SIZE;              // number of clusters
    133    unsigned int local_id      = proc_id % nlocal_procs;     // local processor id
    134    unsigned int cluster_id    = proc_id / nlocal_procs;     // cluster id
    135132   unsigned int nglobal_procs = nclusters * nlocal_procs;   // number of tasks
    136133   size_t i;
     
    142139
    143140   //  barriers initialization
    144    barrier_init(&barriers[0], nglobal_procs);
    145    barrier_init(&barriers[1], nglobal_procs);
     141   if ( proc_id == 0 )
     142   {
     143      barrier_init(&barriers[0], nglobal_procs);
     144      barrier_init(&barriers[1], nglobal_procs);
     145
     146      init_ok = 0;
     147   }
     148   else
     149   {
     150      while ( init_ok == 1 );
     151   }
     152
    146153   init_world(base_line, nb_line);
    147154
Note: See TracChangeset for help on using the changeset viewer.