Changeset 252 for trunk


Ignore:
Timestamp:
Aug 16, 2012, 2:28:51 PM (12 years ago)
Author:
meunier
Message:

Minor changes on the soft_filter. This version works on tsar (generic_mmu platform)

Location:
trunk/softs/soft_filter_giet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/soft_filter_giet/ldscript

    r248 r252  
    1010peripherals are not present in the architecture */
    1111
    12 NB_CLUSTERS             = 4;            /* number of clusters */
    13 NB_PROCS                = 4;            /* number of processors per cluster */
    14 NB_TASKS                = 1;            /* number of tasks per processor */
    15 NB_TIMERS               = 1;            /* max number of timers per processor */
    16 NB_LOCKS                = 8;            /* number of spin_locks */
     12NB_CLUSTERS = 4;                /* number of clusters */
     13NB_PROCS    = 4;                /* number of processors per cluster */
     14NB_TASKS    = 1;                /* number of tasks per processor */
     15NB_TIMERS   = 1;                /* max number of timers per processor */
     16NB_LOCKS    = 8;                /* number of spin_locks */
    1717
    1818/* definition of the base address for all segments
  • trunk/softs/soft_filter_giet/main.c

    r248 r252  
    1616#define FRAME_SIZE     ((NB_PIXELS) * (PIXEL_SIZE))
    1717
    18 #define PRINTF(...)      ({ if (proc_id == 1) { tty_printf(__VA_ARGS__); } })
     18#define PRINTF(...)      ({ if (proc_id == 0) { tty_printf(__VA_ARGS__); } })
    1919
    2020#define TA(c,l,p)  (A[c][((NP) * (l)) + (p)])
     
    116116   PRINTF("\n*** Processor %d entering main at cycle %d ***\n\n", proc_id, proctime());
    117117
    118    //*(unsigned int *) 0x60000000 = *(unsigned int *) 0x70000000;
    119    //PRINTF("apres acces illegal\n");
    120118
    121119   /////////////////////////
     
    129127   }
    130128
     129   ////////////////////////////////////////////////////////////////////////
     130   // Warning: NB_CLUSTERS must be at least 4 because of the heap size;  //
     131   //          if there are less clusters, the heap mixes with the stack //
     132   //          (the total heap size must be at least 0x01000000)         //
     133   ////////////////////////////////////////////////////////////////////////
    131134   if ((nclusters !=  4) && (nclusters !=  8) && (nclusters != 16) &&
    132135         (nclusters != 32) && (nclusters != 64) && (nclusters !=128) && (nclusters != 256)){
     
    178181   for (c = 0; c < nclusters; c++){
    179182      unsigned int offset = base + increment * c;
    180       A[c] = (unsigned short *) (offset                             );
     183      A[c] = (unsigned short *) (offset);
    181184      B[c] = (int *)            (offset + frame_size * 1 / nclusters); // We increment by 2 * frame_size
    182185      C[c] = (int *)            (offset + frame_size * 3 / nclusters); // because sizeof(int) = 2*sizeof(short)
     
    426429         TZ(cluster_id,l,p) = (unsigned char) (((TD(cluster_id,l,p) + TC(cluster_id,l,p)) >> 8) & 0xFF);
    427430      }
    428       fb_sync_write(NP * (cluster_id * lines_per_cluster + l), &TZ(cluster_id,l,0), NP);
    429    }
    430 
    431 #if 0
    432    for (l = first; l < last; l++){
    433       for (p = 0; p < NP; p++){
    434          TA(cluster_id, l, p) = (unsigned char) ((TA(cluster_id, l, p) >> 8) & 0xFF);
    435       }
    436       fb_write(NP * (cluster_id * lines_per_cluster + l), &TA(cluster_id,l,0), NP);
    437    }
    438 #endif
     431      fb_write(NP * (cluster_id * lines_per_cluster + l), &TZ(cluster_id,l,0), NP);
     432   }
    439433
    440434   date  = proctime();
Note: See TracChangeset for help on using the changeset viewer.