Changeset 140 for trunk/platforms


Ignore:
Timestamp:
Mar 9, 2011, 4:11:43 PM (13 years ago)
Author:
kane
Message:

yAjout du multi_cache : plusieurs processeur peuvent ce partager le même cache L1.
2 remarques, (1) deux nouveaux paramètres : nb_cpu, nb_cache. Pour avoir un cache dont le comportement est identique à la version d'avant, mettre ces paramètres à 1.
(2) le port d'interruption est maintenant un tableau dépendant du nombre de processeur.
Voir le fichier "platforms/caba-ring-ccxcachev4_memcachev4-mips32el/top.cpp" pour plus de détails.

--Cette ligne, et les suivantes ci-dessous, seront ignorées--

M platforms/tsarv4_dspin_generic_32/tsarv4_dspin_generic_32_top.cpp
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/segmentation.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/top.cpp
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/default.cfg
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/gen_config.sh
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/dhrystone/dhry21a.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/define.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/matrix_multiplication/matrix_multiplication.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/common/common.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying/self_code_modifying.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/self_code_modifying/self_code_modifying.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.h
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_sort.c
A platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_self_code_modifying.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_matrix_multiplication.c
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/Makefile
M platforms/caba-ring-ccxcachev4_memcachev4-mips32el/Makefile
M platforms/tsarv4_vgmn_generic_32/tsarv4_vgmn_generic_32_top.cpp
M modules/vci_cc_xcache_wrapper_v4/caba/source/include/vci_cc_xcache_wrapper_v4.h
M modules/vci_cc_xcache_wrapper_v4/caba/source/src/vci_cc_xcache_wrapper_v4.cpp
M modules/vci_mem_cache_v4/caba/source/include/vci_mem_cache_v4.h
M modules/vci_mem_cache_v4/caba/source/include/mem_cache_directory_v4.h
M modules/vci_mem_cache_v4/caba/source/src/vci_mem_cache_v4.cpp

Location:
trunk/platforms
Files:
4 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/Makefile

    r137 r140  
    11#NO_SOFT                =  1
    22ARCH                    =  mips32el
    3 #SIMULATION_ARGS        =  100000
    4 #SOCLIB_CC_ADD_ARGS     = "-DCC_XCACHE_WRAPPER_DEBUG=1"
    5 SOCLIB_CC_ADD_ARGS=-t systemcass
     3#SIMULATION_ARGS        = 
     4#SOCLIB_CC_ADD_ARGS     = -t systemc_32
     5SOCLIB_CC_ADD_ARGS      = -t systemcass
    66SOCLIB                  ?= $(shell soclib-cc --getpath)
    77export SOCLIB
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/default.cfg

    r134 r140  
    114
     21 1
    234 64 16
    344 64 16
    4 8 8 16
     54 8 16
    5616 256 16 4096
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/configuration/gen_config.sh

    r134 r140  
    11#!/bin/bash
    22
    3 #               archi1  archi2  archi3  archi4
    4 archi_name=(    "00512" "16384" "01024" "02048");
    5 iways=(         "1"     "4"     "16"    "4"    );
    6 isets=(         "8"     "64"    "1"     "8"    );
    7 iwords=(        "16"    "16"    "16"    "16"   );
    8 dways=(         "1"     "4"     "16"    "4"    );
    9 dsets=(         "8"     "64"    "1"     "8"    );
    10 dwords=(        "16"    "16"    "16"    "16"   );
    11 memc_nways=(    "4"     "16"    "8"     "2"    );
    12 memc_nsets=(    "4"     "256"   "64"    "32"   );
    13 memc_words=(    "16"    "16"    "16"    "16"   );
    14 memc_heap_size=("4096"  "4096"  "4096"  "4096" );
     3#               archi1  archi2  archi3       archi4  archi5
     4archi_name=(    "min"   "tsar"  "full_assoc" "2k"    "4k"   );
     5iways=(         "1"     "4"     "16"         "4"     "4"    );
     6isets=(         "8"     "64"    "1"          "8"     "16"   );
     7iwords=(        "16"    "16"    "16"         "16"    "16"   );
     8dways=(         "1"     "4"     "16"         "4"     "4"    );
     9dsets=(         "8"     "64"    "1"          "8"     "16"   );
     10dwords=(        "16"    "16"    "16"         "16"    "16"   );
     11memc_nways=(    "4"     "16"    "8"          "2"     "16"   );
     12memc_nsets=(    "4"     "256"   "64"         "32"    "64"   );
     13memc_words=(    "16"    "16"    "16"         "16"    "16"   );
     14memc_heap_size=("4096"  "4096"  "4096"       "4096"  "4096" );
    1515
    16 nb_proc=( "1" "15" "+1" "4");
    17 wnwords=( "1" "16" "*2" "8");
    18 wnlines=( "1" "8"  "*2" "8");
    19 wtimeout=("1" "1024" "*4" "16");
     16nb_proc=(        "1" "15"   "+1" "4");
     17nb_cpu_by_cache=("1" "15"   "*2" "1");
     18nb_cache=(       "1" "16"   "*2" "1");
     19#wnwords=(        "1" "16"   "*2" "4");
     20#wnlines=(        "1" "8"    "*2" "8");
     21#wtimeout=(       "1" "1024" "*4" "16");
     22
     23wnwords=(        "4"  "4"  "*2" "4");
     24wnlines=(        "8"  "8"  "*2" "8");
     25wtimeout=(       "16" "16" "*4" "16");
    2026
    2127archi_default="1";
     28gen_cfg=0;
    2229
    2330function gen_file ()
    2431{
    25         filename=$(printf "x%.2d-xcache_%s-wbuf_%.2d_%.2d_%.4d.cfg" ${1} ${archi_name[${2}]} ${3} ${4} ${5});
     32        filename=$(printf "archi_%s-x%.2d_%.2d_%.2d-wbuf_%.2d_%.2d_%.4d.cfg" ${archi_name[${4}]} ${1} ${2} ${3} ${5} ${6} ${7});
    2633
    2734        echo ${filename};
    2835
    29         echo "${1}" > ${filename};
    30         echo "${iways[${2}]} ${isets[${2}]} ${iwords[${2}]}" >> ${filename};
    31         echo "${dways[${2}]} ${dsets[${2}]} ${dwords[${2}]}" >> ${filename};
    32         echo "${3} ${4} ${5}" >> ${filename};
    33         echo "${memc_nways[${2}]} ${memc_nsets[${2}]} ${memc_words[${2}]} ${memc_heap_size[${2}]}" >> ${filename};
     36        echo "${1}" >  ${filename};
     37        echo "${2} ${3}" >> ${filename};
     38        echo "${iways[${4}]} ${isets[${4}]} ${iwords[${4}]}" >> ${filename};
     39        echo "${dways[${4}]} ${dsets[${4}]} ${dwords[${4}]}" >> ${filename};
     40        echo "${5} ${6} ${7}" >> ${filename};
     41        echo "${memc_nways[${4}]} ${memc_nsets[${4}]} ${memc_words[${4}]} ${memc_heap_size[${4}]}" >> ${filename};
    3442}
    3543
     
    4149        echo ${filename};
    4250
    43         echo "${nb_proc[3]}" > ${filename};
     51        echo "${nb_proc[3]}"  >  ${filename};
     52        echo "${nb_cpu_by_cache[3]} ${nb_cache[3]}" >> ${filename};
    4453        echo "${iways[${archi}]} ${isets[${archi}]} ${iwords[${archi}]}" >> ${filename};
    4554        echo "${dways[${archi}]} ${dsets[${archi}]} ${dwords[${archi}]}" >> ${filename};
     
    5059gen_default ${archi_default};
    5160
    52 nb_archi=${#iways[*]};
     61if test ${gen_cfg} -ne 0; then
     62    nb_archi=${#iways[*]};
     63   
     64    num_archi=0;
     65    while test ${num_archi} -lt ${nb_archi}; do
     66        num_proc=${nb_proc[0]};
     67        while test ${num_proc} -le ${nb_proc[1]}; do
     68            num_cpu_by_cache=${nb_cpu_by_cache[0]};
     69            while test ${num_cpu_by_cache} -le ${nb_cpu_by_cache[1]}; do
    5370
    54 num_archi=0;
    55 while test ${num_archi} -lt ${nb_archi}; do
    56     num_proc=${nb_proc[0]};
    57     while test ${num_proc} -le ${nb_proc[1]}; do
    58         num_words=${wnwords[0]};
    59         while test ${num_words} -le ${wnwords[1]}; do
    60             num_lines=${wnlines[0]};
    61             while test ${num_lines} -le ${wnlines[1]}; do
    62                 num_timeout=${wtimeout[0]};
    63                 while test ${num_timeout} -le ${wtimeout[1]}; do
     71                if test $((${num_proc} * ${num_cpu_by_cache})) -le ${nb_cpu_by_cache[1]}; then
    6472
    65                     gen_file ${num_proc} ${num_archi} ${num_words} ${num_lines} ${num_timeout};
     73                num_cache=${nb_cache[0]};
     74                while test ${num_cache} -le ${nb_cache[1]}; do
     75               
     76                    if test ${num_cache} -ge ${num_cpu_by_cache}; then
     77                    if test ${num_cpu_by_cache} -ne 1 -o ${num_cache} -eq 1; then
    6678
    67                     num_timeout=$((${num_timeout} ${wtimeout[2]}));
     79                    num_words=${wnwords[0]};
     80                    while test ${num_words} -le ${wnwords[1]}; do
     81                        num_lines=${wnlines[0]};
     82                        while test ${num_lines} -le ${wnlines[1]}; do
     83                            num_timeout=${wtimeout[0]};
     84                            while test ${num_timeout} -le ${wtimeout[1]}; do
     85                               
     86                                gen_file ${num_proc} ${num_cpu_by_cache} ${num_cache} ${num_archi} ${num_words} ${num_lines} ${num_timeout};
     87                               
     88                                num_timeout=$((${num_timeout} ${wtimeout[2]}));
     89                            done;
     90                            num_lines=$((${num_lines} ${wnlines[2]}));
     91                        done;
     92                        num_words=$((${num_words} ${wnwords[2]}));
     93                    done;
     94                    fi;
     95                    fi;
     96                    num_cache=$((${num_cache} ${nb_cache[2]}));
    6897                done;
    69                 num_lines=$((${num_lines} ${wnlines[2]}));
     98                fi;
     99                num_cpu_by_cache=$((${num_cpu_by_cache} ${nb_cpu_by_cache[2]}));
    70100            done;
    71             num_words=$((${num_words} ${wnwords[2]}));
     101            num_proc=$((${num_proc} ${nb_proc[2]}));
    72102        done;
    73         num_proc=$((${num_proc} ${nb_proc[2]}));
     103        num_archi=$((${num_archi}+1));
    74104    done;
    75     num_archi=$((${num_archi}+1));
    76 done;
     105fi;
    77106
    78 
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/segmentation.h

    r134 r140  
    3535#define MC_M_SIZE       0x000F0000
    3636
     37#define MC_R_BASE       0x20200000
     38#define MC_R_SIZE       0x00000008
     39
     40#define MC_U_BASE       0x30000000
     41#define MC_U_SIZE       0x000F0000
     42
    3743//////////////////////////////////////////////////////////
    3844//      System devices
     
    5157#define C_PROC_SIZE     0x00000010
    5258#define C_PROC_SPAN     0x01000000
    53 
    54 #define MC_R_BASE       0x20200000
    55 #define MC_R_SIZE       0x00000008
    56 
    57 //#define C_MC_M_BASE   0x00200000
    58 //#define C_MC_M_SIZE   0x00000008
    59 
    60 //#define XRAM_BASE     0xB0200000
    61 //#define XRAM_SIZE     0x00000008
    62 
    63 //#define CLEANUP_OFFSET  0x20200000
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/Makefile

    r134 r140  
    1 ADD_OBJS        =       stdio.o stdlib.o exception.o system.o \
    2                         $(patsubst %.c,%.o,$(wildcard *.c)) \
    3                         $(patsubst common/%.c,common/%.o,$(wildcard common/*.c)) \
    4                         $(patsubst irq/%.c,irq/%.o,$(wildcard irq/*.c)) \
    5                         $(patsubst benchmark/%.c,benchmark/%.o,$(wildcard benchmark/*.c)) \
     1ADD_OBJS        =       \
     2                        $(patsubst self_code_modifying/%.c,self_code_modifying/%.o,$(wildcard self_code_modifying/*.c))  \
    63                        $(patsubst matrix_multiplication/%.c,matrix_multiplication/%.o,$(wildcard matrix_multiplication/*.c)) \
    74                        $(patsubst sort/%.c,sort/%.o,$(wildcard sort/*.c)) \
    8                         $(patsubst dhrystone/%.c,dhrystone/%.o,$(wildcard dhrystone/*.c))
     5                        $(patsubst dhrystone/%.c,dhrystone/%.o,$(wildcard dhrystone/*.c)) \
     6                        $(patsubst benchmark/%.c,benchmark/%.o,$(wildcard benchmark/*.c)) \
     7                        $(patsubst irq/%.c,irq/%.o,$(wildcard irq/*.c)) \
     8                        $(patsubst common/%.c,common/%.o,$(wildcard common/*.c)) \
     9                        $(patsubst %.c,%.o,$(wildcard *.c)) \
     10                        stdio.o stdlib.o exception.o system.o
     11
    912
    1013ADD_CFLAGS      =
     14ADD_LDFLAGS     =
    1115SOCLIB          ?=      $(shell soclib-cc --getpath)
    1216
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.c

    r134 r140  
    66void benchmark (void)
    77{
    8   /* if(procnum() != 0) */
    9   /*   EXIT(0); */
    10 
    11   int result = 0;
     8  int result      = 0;
     9  int num_cpu     = procnum();
    1210  int cycle_begin = cycle_begin = cpu_cycles();
    13 
    14   switch (procnum())
    15     {
    16     default :
    17       {
     11 
     12  if (num_cpu < BENCHMARK_NB_THREAD)
     13   switch (num_cpu)
     14     {
     15     default :
     16        {
    1817#if BENCHMARK_MATRIX_MULTIPLICATION_MT
    19         int result_mm_mt = benchmark_matrix_multiplication_mt();
    20         result += result_mm_mt;
     18          int result_mm_mt = benchmark_matrix_multiplication_mt();
     19          result += result_mm_mt;
    2120#endif
    2221#if BENCHMARK_DHRYSTONE
    23         int result_dhrystone = benchmark_dhrystone();
    24         result += result_dhrystone;
     22          int result_dhrystone = benchmark_dhrystone();
     23          result += result_dhrystone;
    2524#endif
    26 #if BENCHMARK_SORT
    27         int result_sort = benchmark_sort();
    28         result += result_sort;
     25#if BENCHMARK_SORT_ALL
     26          int result_sort_all = benchmark_sort_all();
     27          result += result_sort_all;
     28#endif
     29#if BENCHMARK_SORT_BUBBLE
     30          int result_sort_bubble = benchmark_sort_bubble();
     31          result += result_sort_bubble;
     32#endif
     33#if BENCHMARK_SORT_INSERTION
     34          int result_sort_insertion = benchmark_sort_insertion();
     35          result += result_sort_insertion;
     36#endif
     37#if BENCHMARK_SORT_SELECTION
     38          int result_sort_selection = benchmark_sort_selection();
     39          result += result_sort_selection;
     40#endif
     41#if BENCHMARK_SORT_SHELL
     42          int result_sort_shell = benchmark_sort_shell();
     43          result += result_sort_shell;
    2944#endif
    3045#if BENCHMARK_MATRIX_MULTIPLICATION_ST
    31         int result_mm_st = benchmark_matrix_multiplication_st();
    32         result += result_mm_st;
     46          int result_mm_st = benchmark_matrix_multiplication_st();
     47          result += result_mm_st;
    3348#endif
    34 
    35         printf("\n");
    36         printf("--------------------------------\n");
    37         printf( "Partial results :\n");
     49#if BENCHMARK_SELF_CODE_MODIFYING
     50          int result_self_code_modifying = benchmark_self_code_modifying();
     51          result += result_self_code_modifying;
     52#endif
     53         
     54          printf("\n");
     55          printf("--------------------------------\n");
     56          printf( "Partial results :\n");
    3857#if BENCHMARK_MATRIX_MULTIPLICATION_MT
    39         printf(" * MM MT           : %d\n",result_mm_mt);
     58          printf(" * MM MT               : %d\n",result_mm_mt);
    4059#endif
    4160#if BENCHMARK_DHRYSTONE
    42         printf(" * DHRYSTONE       : %d\n",result_dhrystone);
     61          printf(" * DHRYSTONE           : %d\n",result_dhrystone);
    4362#endif
    44 #if BENCHMARK_SORT
    45         printf(" * SORT            : %d\n",result_sort);
     63#if BENCHMARK_SORT_ALL
     64          printf(" * SORT_ALL            : %d\n",result_sort_all);
     65#endif
     66#if BENCHMARK_SORT_BUBBLE
     67          printf(" * SORT_BUBBLE         : %d\n",result_sort_bubble);
     68#endif
     69#if BENCHMARK_SORT_INSERTION
     70          printf(" * SORT_INSERTION      : %d\n",result_sort_insertion);
     71#endif
     72#if BENCHMARK_SORT_SELECTION
     73          printf(" * SORT_SELECTION      : %d\n",result_sort_selection);
     74#endif
     75#if BENCHMARK_SORT_SHELL
     76          printf(" * SORT_SHELL          : %d\n",result_sort_shell);
    4677#endif
    4778#if BENCHMARK_MATRIX_MULTIPLICATION_ST
    48         printf(" * MM ST           : %d\n",result_mm_st);
     79          printf(" * MM ST               : %d\n",result_mm_st);
    4980#endif
    50         printf("--------------------------------\n");
    51        break;
     81#if BENCHMARK_SELF_CODE_MODIFYING
     82          printf(" * SELF_CODE_MODIFYING : %d\n",result_self_code_modifying);
     83#endif
     84          printf("--------------------------------\n");
     85          break;
     86        }
    5287      }
    53     }
    5488
    5589  printf("\n");
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark.h

    r134 r140  
    55
    66void benchmark                         (void);
    7 int  benchmark_sort                    (void);
     7int  benchmark_sort_all                (void);
     8int  benchmark_sort_bubble             (void);
     9int  benchmark_sort_insert             (void);
     10int  benchmark_sort_selection          (void);
     11int  benchmark_sort_shell              (void);
    812int  benchmark_dhrystone               (void);
    913int  benchmark_matrix_multiplication_st(void);
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_matrix_multiplication.c

    r134 r140  
    127127  /* matrix_multiplication_print(matrix_local_d, size); */
    128128 
     129#if VERIFICATION_MATRIX_MULTIPLICATION
    129130  printf(" * Verification... ");
    130131 
    131132  benchmark_matrix_validation (matrix_local_d, size);
     133#endif
    132134 
    133135  printf(" * Free...\n");
     
    230232  if (matrix_nb_thread_stop == matrix_nb_thread_start)
    231233    {
     234#if VERIFICATION_MATRIX_MULTIPLICATION
    232235      printf(" * Verification... ");
    233236
    234237      benchmark_matrix_validation (matrix_global_d, size);
     238#endif
    235239     
    236240      printf(" * Free...\n");
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/benchmark/benchmark_sort.c

    r134 r140  
    99static uint32_t sort_lock;
    1010
    11 int _benchmark_sort (unsigned int size)
     11int _benchmark_sort (sort_t sort_type,
     12                     unsigned int size)
     13{
     14  printf(" * Size : %d\n",size);
     15
     16  unsigned int* SortArray;
     17 
     18  int cycle_begin;
     19
     20  int num_cpu=procnum();
     21 
     22  printf(" * Algo : %s\n",sort_str(sort_type));
     23 
     24  printf("   * Init...\n");
     25 
     26  lock_lock(&sort_lock);
     27  SortArray = (unsigned int*) malloc(size*sizeof(unsigned int));
     28  lock_unlock(&sort_lock);
     29 
     30  unsigned int seed = num_cpu;
     31  int i;
     32  for (i=0; i<size; ++i)
     33    {
     34      seed = seed * 1103515245 + 12345;
     35      SortArray[i] = seed&0xff;
     36    }
     37  printf("   * Sort... \n");
     38 
     39  cycle_begin = cpu_cycles();
     40  sort((unsigned int *) (SortArray), (unsigned int) size, sort_type);
     41  int cycle_exec = cpu_cycles()-cycle_begin;
     42 
     43  printf("   * Executed in %d cycles\n",cycle_exec);
     44 
     45  int result = cycle_exec;
     46 
     47#if VERIFICATION_SORT     
     48  printf("   * Verification... ");
     49 
     50  for (i = 1; i < size; i++)
     51    {
     52      /* printf("%d ",SortArray[i-1]); */
     53     
     54      if (SortArray[i] < SortArray[i-1])
     55        {
     56          printf("KO !!!\n");
     57          EXIT(1);
     58        }
     59    }
     60  printf("OK\n");
     61#endif
     62 
     63  free (SortArray);
     64
     65  return result;
     66}
     67
     68int _benchmark_sort_all (unsigned int size)
     69{
     70  printf("\n");
     71  printf("================================\n");
     72  printf("Benchmark Sort (ALL)\n");
     73  printf("================================\n");
     74  printf("\n");
     75
     76  int result = 0;
     77  int num_cpu=procnum();
     78  sort_t _sort_type;
     79  const sort_t nb_sort_type = 4;
     80 
     81  for (_sort_type=0; _sort_type < nb_sort_type; _sort_type++)
     82    result += _benchmark_sort((_sort_type+num_cpu)%nb_sort_type,size);
     83 
     84  return result;
     85}
     86
     87int _benchmark_sort_one (sort_t sort_type,
     88                         unsigned int size)
    1289{
    1390  printf("\n");
     
    1794  printf("\n");
    1895
    19   printf(" * Size : %d\n",size);
    20 
    21   unsigned int* SortArray;
    22  
    23   int cycle_begin, result;
    24 
    25   result = 0;
    26  
    27   int p=procnum();
    28  
    29   sort_t _sort_type;
    30   const sort_t nb_sort_type = 4;
    31  
    32   for (_sort_type=0; _sort_type < nb_sort_type; _sort_type++)
    33     {
    34       sort_t sort_type = (_sort_type+p)%nb_sort_type;
    35      
    36       printf(" * Algo : %s\n",sort_str(sort_type));
    37      
    38       printf("   * Init...\n");
    39      
    40       lock_lock(&sort_lock);
    41       SortArray = (unsigned int*) malloc(size*sizeof(unsigned int));
    42       lock_unlock(&sort_lock);
    43      
    44       unsigned int seed = p;
    45       int i;
    46       for (i=0; i<size; ++i)
    47         {
    48           seed = seed * 1103515245 + 12345;
    49           SortArray[i] = seed&0xff;
    50         }
    51       printf("   * Sort... \n");
    52      
    53       cycle_begin = cpu_cycles();
    54       sort((unsigned int *) (SortArray), (unsigned int) size, sort_type);
    55       int cycle_exec = cpu_cycles()-cycle_begin;
    56      
    57       printf("   * Executed in %d cycles\n",cycle_exec);
    58      
    59       result += cycle_exec;
    60      
    61       printf("   * Verification... ");
    62      
    63       for (i = 1; i < size; i++)
    64         {
    65           /* printf("%d ",SortArray[i-1]); */
    66          
    67           if (SortArray[i] < SortArray[i-1])
    68             {
    69               printf("KO !!!\n");
    70               EXIT(1);
    71             }
    72         }
    73       printf("OK\n");
    74 
    75       free (SortArray);
    76 
    77     }
    78  
    79   return result;
     96  return _benchmark_sort(sort_type,size);
    8097}
    8198
    82 int benchmark_sort (void) { return _benchmark_sort(SORT_SIZE); }
    83 
    84  
     99int benchmark_sort_all       (void) { return _benchmark_sort_all(SORT_ALL_SIZE); }
     100int benchmark_sort_bubble    (void) { return _benchmark_sort_one(SORT_BUBBLE   ,SORT_BUBBLE_SIZE   ); }
     101int benchmark_sort_insertion (void) { return _benchmark_sort_one(SORT_INSERTION,SORT_INSERTION_SIZE); }
     102int benchmark_sort_selection (void) { return _benchmark_sort_one(SORT_SELECTION,SORT_SELECTION_SIZE); }
     103int benchmark_sort_shell     (void) { return _benchmark_sort_one(SORT_SHELL    ,SORT_SHELL_SIZE    ); }
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/common/common.c

    r134 r140  
    4141    }
    4242
     43  pause();
     44 
    4345  while(1);
    4446}
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/define.h

    r134 r140  
    33
    44// List of benchmark
     5#define BENCHMARK_NB_THREAD                   4
     6
    57#define BENCHMARK_DHRYSTONE                   0
    6 #define BENCHMARK_SORT                        0
     8#define BENCHMARK_SORT_ALL                    0
     9#define BENCHMARK_SORT_BUBBLE                 0
     10#define BENCHMARK_SORT_INSERTION              0
     11#define BENCHMARK_SORT_SELECTION              0
     12#define BENCHMARK_SORT_SHELL                  1
    713#define BENCHMARK_MATRIX_MULTIPLICATION_ST    0
    8 #define BENCHMARK_MATRIX_MULTIPLICATION_MT    1
     14#define BENCHMARK_MATRIX_MULTIPLICATION_MT    0
     15#define BENCHMARK_SELF_CODE_MODIFYING         0
    916
    1017#define VERBOSE_SORT                          0
    1118
     19#define VERIFICATION_SORT                     0
     20#define VERIFICATION_MATRIX_MULTIPLICATION    0
     21
    1222// Benchmark size
    1323#define DHRYSTONE_NB_RUNS                     5000
    14 #define SORT_SIZE                             850
     24#define SORT_ALL_SIZE                         1000
     25#define SORT_BUBBLE_SIZE                      1500
     26#define SORT_INSERTION_SIZE                   2300
     27#define SORT_SELECTION_SIZE                   1600
     28#define SORT_SHELL_SIZE                       4000
    1529#define MATRIX_MULTIPLICATION_ST_SIZE         50
    16 #define MATRIX_MULTIPLICATION_MT_SIZE         75
     30#define MATRIX_MULTIPLICATION_MT_SIZE         96
    1731#define MATRIX_MULTIPLICATION_MT_LOCK_BY_LINE 1
     32#define SELF_CODE_MODIFYING_NB_RUNS           10
    1833
    1934// Timer configuration
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/dhrystone/dhry21a.c

    r134 r140  
    7676  DOUBLE   dtime();
    7777
    78         One_Fifty       Int_1_Loc;
    79   REG   One_Fifty       Int_2_Loc;
     78        One_Fifty       Int_1_Loc = 0;
     79  REG   One_Fifty       Int_2_Loc = 0;
    8080        One_Fifty       Int_3_Loc;
    8181  REG   char            Ch_Index;
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/soft/matrix_multiplication/matrix_multiplication.c

    r134 r140  
    22#include "stdio.h"
    33#include "system.h"
     4#include "stdint.h"
    45
    56void matrix_multiplication_st (int ** a,
     
    89                               unsigned int n)
    910{
    10   int x, y;
     11  uint32_t x, y;
    1112
    1213  for (x=0; x<n; ++x)
     
    1617      for (y=0; y<n; ++y)
    1718        {
    18           int i;
     19          uint32_t i;
    1920
    2021          int tmp = 0;
     
    2829}
    2930
    30 static int lock;
    31 static int next;
     31static uint32_t lock;
     32static uint32_t next;
    3233
    3334void matrix_multiplication_mt (int ** a,
     
    3738                               int lock_by_line)
    3839{
    39   int x, y;
     40  uint32_t x, y;
    4041
    4142  while (1)
  • trunk/platforms/caba-ring-ccxcachev4_memcachev4-mips32el/top.cpp

    r137 r140  
    3131#  define PARAM_VCI                         4,8,32,1,1,1,8,4,4,1
    3232
     33#  define USE_OLD_XCACHE                    0
     34#  define USE_VGMN                          1
    3335#  define NB_PROC_MIN                       1
    3436#  define NB_PROC_MAX                       15
    35 //                                          min_latency, fifo_depth
     37//                                          fifo_depth
    3638#  define PARAM_RING_P                      2
    3739#  define PARAM_RING_C                      2
    3840#  define PARAM_RING_X                      2
    3941//                                          pti    , hwi    , wti, irq
    40 #  define PARAM_XICU                        nb_proc, nb_proc, 0  , nb_proc
     42#  define PARAM_XICU                        nb_proc*nb_cpu_by_cache, nb_proc*nb_cpu_by_cache, 0  , nb_proc*nb_cpu_by_cache
     43//#define PARAM_XICU                        nb_proc, nb_proc, 0  , nb_proc
    4144
    4245// * Debug
     
    4649                                           
    4750// * Simulation                             
    48 #  define FILE_DEFAULT                      "configuration/default.cfg"
     51#  define CONFIG_DEFAULT                      "configuration/default.cfg"
    4952#  define NCYCLES_DEFAULT                   0
    5053#  define SOFT_DEFAULT                      "soft/bin.soft"
     
    5356void usage (char * funcname)
    5457{
    55   std::cout << funcname << " [nb_cycle [file [soft]]] " << std::endl;
    56   std::cout << " * nb_cycle : number of simulated cycle, if 0 then no stop condition. (default : " << NCYCLES_DEFAULT << " cycle(s))" << std::endl;
    57   std::cout << " * file     : Configuration file : nb_proc, iways, isets, iwords, dways, dsets, dwords, wnwords, wnlines, wtimeout, memc_nways, memc_nsets, memc_words, memc_heap_size. (default : " << FILE_DEFAULT << " cycle(s))" << std::endl;
    58   std::cout << " * soft     : software executed by this platforms. (default : \"" << SOFT_DEFAULT << "\")" << std::endl;
     58  std::cout << funcname << " [option] " << std::endl;
     59  std::cout << " * -NCYCLES int : number of simulated cycle, if 0 then no stop condition." << std::endl;
     60  std::cout << "                  default : " << NCYCLES_DEFAULT << " cycle(s)" << std::endl;
     61  std::cout << " * -CFG string  : configuration file" << std::endl;
     62  std::cout << "                    - nb_proc," << std::endl;
     63  std::cout << "                    - nb_cpu_by_cache, nb_dcache," << std::endl;
     64  std::cout << "                    - iways, isets, iwords," << std::endl;
     65  std::cout << "                    - dways, dsets, dwords," << std::endl;
     66  std::cout << "                    - wnwords, wnlines, wtimeout," << std::endl;
     67  std::cout << "                    - memc_nways, memc_nsets, memc_words, memc_heap_size." << std::endl;
     68  std::cout << "                  default : \"" << CONFIG_DEFAULT << "\"" << std::endl;
     69  std::cout << " * -SOFT string : software executed by this platform." << std::endl;
     70  std::cout << "                  default : \"" << SOFT_DEFAULT << "\"" << std::endl;
    5971
    6072  exit(1);
     
    6375int _main(int argc, char *argv[])
    6476{
    65         if ((argc < 1) or (argc > 4))
    66           {
    67             std::cout << "Invalid parameters number." << std::endl;
    68             usage(argv[0]);
    69           }
    70 
    71 #if not SOCVIEW
    72         int  ncycles = 0;
    73 
    74         if (argc >= 2)
    75           ncycles = std::atoi(argv[1]);
    76         else
    77           ncycles = NCYCLES_DEFAULT;
     77        int    ncycles = NCYCLES_DEFAULT;
     78        char * config  = CONFIG_DEFAULT;
     79        char * soft    = SOFT_DEFAULT;
     80
     81        if (argc > 1)
     82          {
     83            for( int n=1 ; n<argc ; n=n+2 )
     84              {
     85                if( (strcmp(argv[n],"-NCYCLES") == 0) && (n+1<argc) )
     86                  {
     87                    ncycles = atoi(argv[n+1]);
     88                  }
     89                else if( (strcmp(argv[n],"-CFG") == 0) && (n+1<argc) )
     90                  {
     91                    // strcpy(config, argv[n+1]);
     92                    config = argv[n+1];
     93                  }
     94                else if( (strcmp(argv[n],"-SOFT") == 0) && (n+1<argc) )
     95                  {
     96                    // strcpy(soft, argv[n+1]);
     97                    soft = argv[n+1];
     98                  }
     99                else
     100                  {
     101                    usage(argv[0]);
     102                  }
     103              }
     104          }
    78105
    79106        if (ncycles == 0)
    80107          ncycles = -1;
    81 #endif
    82108
    83109        uint32_t nb_proc;
     110        uint32_t nb_cpu_by_cache;
     111        uint32_t nb_dcache;
    84112        uint32_t iways, isets, iwords;
    85113        uint32_t dways, dsets, dwords;
     
    88116
    89117        std::ifstream inFile;
    90         const char * filename = (argc>=3)?argv[2]:FILE_DEFAULT;
     118        const char * filename = config;
    91119
    92120        inFile.open(filename);
     
    102130        nb_proc         =std::atoi(str.c_str());
    103131        if (not (inFile >> str)){std::cout << "Invalid parameters number in configuration file." << std::endl; usage(argv[0]);}
     132        nb_cpu_by_cache =std::atoi(str.c_str());
     133        if (not (inFile >> str)){std::cout << "Invalid parameters number in configuration file." << std::endl; usage(argv[0]);}
     134        nb_dcache       =std::atoi(str.c_str());
     135        if (not (inFile >> str)){std::cout << "Invalid parameters number in configuration file." << std::endl; usage(argv[0]);}
    104136        iways           =std::atoi(str.c_str());
    105137        if (not (inFile >> str)){std::cout << "Invalid parameters number in configuration file." << std::endl; usage(argv[0]);}
     
    128160        memc_heap_size  =std::atoi(str.c_str());
    129161
    130         if ((nb_proc<NB_PROC_MIN) or
    131             (nb_proc>NB_PROC_MAX))
     162        if (((nb_proc*nb_cpu_by_cache)<NB_PROC_MIN) or
     163            ((nb_proc*nb_cpu_by_cache)>NB_PROC_MAX))
    132164          {
    133165            std::cout << "Parameters nb_proc is out of bound." << std::endl;
     
    135167          }
    136168
    137         char * soft;
    138 
    139         if (argc >= 4)
    140           soft = argv[3];
    141         else
    142           soft = SOFT_DEFAULT;
    143 
    144169        std::cout << "  * Parameters : " << std::endl;
    145170        std::cout << "    * nb_proc          : " << nb_proc          << std::endl;
     171        std::cout << "    * nb_cpu_by_cache  : " << nb_cpu_by_cache  << std::endl;
     172        std::cout << "    * nb_dcache        : " << nb_dcache        << std::endl;
    146173        std::cout << "    * iways            : " << iways            << std::endl;
    147174        std::cout << "    * isets            : " << isets            << std::endl;
     
    180207        maptabp.add(Segment("mc_r"     , MC_R_BASE     , MC_R_SIZE     , IntTab(2), false, true, IntTab(0)));
    181208        maptabp.add(Segment("mc_m"     , MC_M_BASE     , MC_M_SIZE     , IntTab(2), true));
    182         // maptabp.add(Segment("ptba"     , PTD_ADDR      , TAB_SIZE      , IntTab(2), true));
     209        // maptabp.add(Segment("mc_u"     , MC_U_BASE     , MC_U_SIZE     , IntTab(2), false));
     210      //maptabp.add(Segment("ptba"     , PTD_ADDR      , TAB_SIZE      , IntTab(2), true));
    183211        maptabp.add(Segment("xicu"     , XICU_BASE     , XICU_SIZE     , IntTab(3), false));
    184212        maptabp.add(Segment("simhelper", SIMHELPER_BASE, SIMHELPER_SIZE, IntTab(4), false));
     
    187215
    188216        soclib::common::MappingTable maptabc(32, IntTab(8), IntTab(8), 0x00300000);
     217        // for (uint32_t i=0; i<nb_proc; ++i)
     218        //   for (uint32_t j=0; j<nb_cpu_by_cache; ++j)
     219        //   {
     220        //     std::ostringstream str;
     221        //     str << "c_proc_" << i << "_" << j;
     222        //     maptabc.add(Segment(str.str().c_str(), C_PROC_BASE+(i*nb_cpu_by_cache+j)*C_PROC_SPAN, C_PROC_SIZE , IntTab(i), false, true, IntTab(i)));
     223        //   }
    189224        for (uint32_t i=0; i<nb_proc; ++i)
    190225        {
     
    195230        maptabc.add(Segment("mc_r"    , MC_R_BASE  , MC_R_SIZE   , IntTab(nb_proc), false, false));
    196231        maptabc.add(Segment("mc_m"    , MC_M_BASE  , MC_M_SIZE   , IntTab(nb_proc), false, false));
     232        // maptabc.add(Segment("mc_u"    , MC_U_BASE  , MC_U_SIZE   , IntTab(nb_proc), false, false));
    197233        maptabc.add(Segment("reset"   , RESET_BASE , RESET_SIZE  , IntTab(nb_proc), false, false));
    198234        maptabc.add(Segment("excep"   , EXCEP_BASE , EXCEP_SIZE  , IntTab(nb_proc), false, false));
    199235        maptabc.add(Segment("text"    , TEXT_BASE  , TEXT_SIZE   , IntTab(nb_proc), false, false));
    200         // maptabc.add(Segment("ptba"    , PTD_ADDR   , TAB_SIZE    , IntTab(nb_proc), false, false));
     236      //maptabc.add(Segment("ptba"    , PTD_ADDR   , TAB_SIZE    , IntTab(nb_proc), false, false));
    201237
    202238        std::cout << maptabc << std::endl;
     
    204240        soclib::common::MappingTable maptabx(32, IntTab(8), IntTab(8), 0x00300000);
    205241        maptabx.add(Segment("xram" , MC_M_BASE , MC_M_SIZE , IntTab(0), false));
     242        // maptabx.add(Segment("uram" , MC_U_BASE , MC_U_SIZE , IntTab(0), false));
    206243        maptabx.add(Segment("reset", RESET_BASE, RESET_SIZE, IntTab(0), false));
    207244        maptabx.add(Segment("excep", EXCEP_BASE, EXCEP_SIZE, IntTab(0), false));
     
    215252        sc_signal<bool> signal_resetn("resetn");
    216253   
    217         sc_signal<bool> ** signal_proc_it = soclib::common::alloc_elems<sc_signal<bool> >("proc_it", nb_proc, 6);
     254        sc_signal<bool> *** signal_proc_it = soclib::common::alloc_elems<sc_signal<bool> >("proc_it", nb_proc, nb_cpu_by_cache, 6);
    218255
    219256        soclib::caba::VciSignals<vci_param> * signal_vci_ini_rw_proc = soclib::common::alloc_elems<soclib::caba::VciSignals<vci_param> >("vci_ini_rw_proc", nb_proc);
     
    236273        soclib::caba::VciSignals<vci_param> signal_vci_tgt_cleanup_memc("vci_tgt_cleanup_memc");
    237274
    238         sc_signal<bool> * signal_tty_irq = soclib::common::alloc_elems<sc_signal<bool> >("signal_tty_irq", nb_proc);
     275        sc_signal<bool> ** signal_tty_irq = soclib::common::alloc_elems<sc_signal<bool> >("signal_tty_irq", nb_proc, nb_cpu_by_cache);
    239276
    240277        soclib::common::Loader loader(soft);
     
    245282        for (uint32_t i=0; i<nb_proc; ++i)
    246283          {
     284            uint32_t num_cpu = i*nb_cpu_by_cache;
     285
    247286            std::ostringstream str;
    248             str << "proc_" << i;
    249 
    250             proc[i] = new soclib::caba::VciCcXCacheWrapperV4<vci_param, proc_iss > (str.str().c_str(), i, maptabp, maptabc, IntTab(i),IntTab(i),IntTab(i)
     287            str << "proc_" << num_cpu;
     288
     289            proc[i] = new soclib::caba::VciCcXCacheWrapperV4<vci_param, proc_iss > (str.str().c_str(), num_cpu, maptabp, maptabc, IntTab(i),IntTab(i),IntTab(i)
     290#if USE_OLD_XCACHE
    251291                                                                                    ,iways, isets, iwords
    252292                                                                                    ,dways, dsets, dwords
    253                                                                                     ,wnwords, wnlines, wtimeout
     293#else
     294                                                                                    ,nb_cpu_by_cache   
     295                                                                                    ,nb_dcache
     296                                                                                    ,iways*nb_cpu_by_cache, isets, iwords
     297                                                                                    ,dways*nb_cpu_by_cache, dsets, dwords
     298                                                                                    ,wnwords, wnlines*nb_cpu_by_cache, wtimeout
     299#endif
    254300                                                                                    );
    255301
     
    267313        //                                  x_init    c_init          p_tgt     c_tgt
    268314        soclib::caba::VciMemCacheV4<vci_param>
    269           memc("memc",maptabp,maptabc,maptabx,IntTab(0),IntTab(nb_proc),IntTab(2),IntTab(nb_proc), memc_nways, memc_nsets, memc_words, memc_heap_size);
     315        memc("memc",maptabp,maptabc,maptabx,IntTab(0),IntTab(nb_proc),IntTab(2),IntTab(nb_proc), memc_nways, memc_nsets, memc_words, memc_heap_size);
    270316
    271317        std::vector<std::string> tty_name;
    272         for (uint32_t i=0; i<nb_proc; ++i)
     318        for (uint32_t i=0; i<nb_proc*nb_cpu_by_cache; ++i)
    273319          {
    274320            std::ostringstream str;
     
    308354          {
    309355            proc[i]->p_clk(signal_clk); 
    310             proc[i]->p_resetn(signal_resetn); 
    311             proc[i]->p_irq[0](signal_proc_it[i][0]);
    312             proc[i]->p_irq[1](signal_proc_it[i][1]);
    313             proc[i]->p_irq[2](signal_proc_it[i][2]);
    314             proc[i]->p_irq[3](signal_proc_it[i][3]);
    315             proc[i]->p_irq[4](signal_proc_it[i][4]);
    316             proc[i]->p_irq[5](signal_proc_it[i][5]);
     356            proc[i]->p_resetn(signal_resetn);
     357            for (uint32_t j=0; j<nb_cpu_by_cache; ++j)
     358              {
     359                proc[i]->p_irq[j][0](signal_proc_it[i][j][0]);
     360                proc[i]->p_irq[j][1](signal_proc_it[i][j][1]);
     361                proc[i]->p_irq[j][2](signal_proc_it[i][j][2]);
     362                proc[i]->p_irq[j][3](signal_proc_it[i][j][3]);
     363                proc[i]->p_irq[j][4](signal_proc_it[i][j][4]);
     364                proc[i]->p_irq[j][5](signal_proc_it[i][j][5]);
     365              }
    317366            proc[i]->p_vci_ini_rw(signal_vci_ini_rw_proc[i]);
    318367            proc[i]->p_vci_ini_c(signal_vci_ini_c_proc[i]);
     
    328377        tty.p_vci(signal_vci_tgt_tty);
    329378        for (uint32_t i=0; i<nb_proc; ++i)
    330           tty.p_irq[i](signal_tty_irq[i]);
     379          for (uint32_t j=0; j<nb_cpu_by_cache; ++j)
     380            tty.p_irq[i*nb_cpu_by_cache+j](signal_tty_irq[i][j]);
    331381
    332382        xicu.p_clk(signal_clk);
     
    334384        xicu.p_vci(signal_vci_tgt_xicu);
    335385        for (uint32_t i=0; i<nb_proc; ++i)
    336         {
    337           xicu.p_hwi[i](signal_tty_irq[i]);
    338           xicu.p_irq[i](signal_proc_it[i][0]);
    339         }
     386          for (uint32_t j=0; j<nb_cpu_by_cache; ++j)
     387          {
     388            xicu.p_hwi[i*nb_cpu_by_cache+j](signal_tty_irq[i][j]);
     389            xicu.p_irq[i*nb_cpu_by_cache+j](signal_proc_it[i][j][0]);
     390          }
    340391
    341392        simhelper.p_clk(signal_clk);
     
    392443        debug();
    393444#elif DEBUG_TOP
    394         for (int32_t i=0; i<ncycles; ++i)
     445
     446        uint32_t num_cycle=0;
     447        while(1)
    395448          {
    396449            std::cout << std::endl
    397                       << std::dec << "===== [ cycle " << i << " ]======" << std::endl
     450                      << std::dec << "===== [ cycle " << num_cycle << " ]======" << std::endl
    398451                      << std::endl;
    399452           
     
    402455            // for (uint32_t i=0; i<nb_proc; ++i)
    403456            //   proc[i]->print_trace(1);
     457            num_cycle ++;
    404458          }
    405459#else
     
    418472          proc[i]->print_stats();
    419473
    420         soclib::common::dealloc_elems<sc_signal<bool>                     >(signal_tty_irq         , nb_proc);
     474        soclib::common::dealloc_elems<sc_signal<bool>                     >(signal_tty_irq         , nb_proc, nb_cpu_by_cache);
    421475        soclib::common::dealloc_elems<soclib::caba::VciSignals<vci_param> >(signal_vci_tgt_proc    , nb_proc);
    422476        soclib::common::dealloc_elems<soclib::caba::VciSignals<vci_param> >(signal_vci_ini_c_proc  , nb_proc);
    423477        soclib::common::dealloc_elems<soclib::caba::VciSignals<vci_param> >(signal_vci_ini_rw_proc , nb_proc);
    424         soclib::common::dealloc_elems<sc_signal<bool>                     >(signal_proc_it         , nb_proc, 6);
     478        soclib::common::dealloc_elems<sc_signal<bool>                     >(signal_proc_it         , nb_proc, nb_cpu_by_cache, 6);
    425479
    426480        for (uint32_t i=0; i<nb_proc; ++i)
  • trunk/platforms/tsarv4_dspin_generic_32/tsarv4_dspin_generic_32_top.cpp

    r134 r140  
    370370    // IRQ signals (one signal per proc)
    371371
    372     sc_signal<bool>***  signal_proc_it =
    373         alloc_elems<sc_signal<bool> >("signal_proc_it", xmax, ymax, nprocs);
     372    sc_signal<bool>**** signal_proc_it =
     373      alloc_elems<sc_signal<bool> >("signal_proc_it", 1,xmax, ymax, nprocs);
    374374
    375375    sc_signal<bool>*    signal_irq_mtty =
     
    548548                    IntTab(cluster(x,y),PROC_SRCID+p),  // SRCID_C
    549549                    IntTab(cluster(x,y),PROC_SRCID+p),  // TGTID_C
     550                    1,1,
    550551                    4,64,16,4,64,16,                    // Icache and Dcache sizes
    551552                    4,8,16);
     
    743744                proc[x][y][p]->p_vci_ini_c              (signal_vci_ini_c_proc[x][y][p]);
    744745                proc[x][y][p]->p_vci_tgt                (signal_vci_tgt_c_proc[x][y][p]);
    745                 proc[x][y][p]->p_irq[0]                 (signal_proc_it[x][y][p]);
     746                proc[x][y][p]->p_irq[0][0]                      (signal_proc_it[0][x][y][p]);
    746747                for ( size_t j = 1 ; j < 6 ; j++ )
    747748                {
    748                     proc[x][y][p]->p_irq[j]             (signal_false);
     749                    proc[x][y][p]->p_irq[0][j]          (signal_false);
    749750                }
    750751            }
     
    756757            for ( size_t p = 0 ; p < nprocs ; p++ )
    757758            {
    758                 xicu[x][y]->p_irq[p]                    (signal_proc_it[x][y][p]);
     759                xicu[x][y]->p_irq[p]                    (signal_proc_it[0][x][y][p]);
    759760            }
    760761
  • trunk/platforms/tsarv4_vgmn_generic_32/tsarv4_vgmn_generic_32_top.cpp

    r134 r140  
    372372   
    373373    // IRQ signals (one signal per proc)
    374     sc_signal<bool>***  signal_proc_it =
    375         alloc_elems<sc_signal<bool> >("signal_proc_it", xmax, ymax, nprocs);
     374    sc_signal<bool>**** signal_proc_it =
     375      alloc_elems<sc_signal<bool> >("signal_proc_it", 1,xmax, ymax, nprocs);
    376376
    377377    sc_signal<bool>*    signal_irq_mtty =
     
    539539                    IntTab(cluster(x,y), PROC_SRCID+p),         // SRCID_C
    540540                    IntTab(cluster(x,y), PROC_SRCID+p),         // TGTID_C
     541                    1,1,
    541542                    4,64,16,4,64,16                             // Icache and Dcache sizes
    542543                    ,4,8,16
     
    715716                proc[x][y][p]->p_vci_ini_c              (signal_vci_ini_c_proc[x][y][p]);
    716717                proc[x][y][p]->p_vci_tgt                (signal_vci_tgt_c_proc[x][y][p]);
    717                 proc[x][y][p]->p_irq[0]                 (signal_proc_it[x][y][p]);
     718                proc[x][y][p]->p_irq[0][0]              (signal_proc_it[0][x][y][p]);
    718719                for ( size_t j = 1 ; j < 6 ; j++ )
    719720                {
    720                     proc[x][y][p]->p_irq[j]             (signal_false);
     721                    proc[x][y][p]->p_irq[0][j]          (signal_false);
    721722                }
    722723            }
     
    728729            for ( size_t p = 0 ; p < nprocs ; p++ )
    729730            {
    730                 xicu[x][y]->p_irq[p]                    (signal_proc_it[x][y][p]);
     731                xicu[x][y]->p_irq[p]                    (signal_proc_it[0][x][y][p]);
    731732            }
    732733
Note: See TracChangeset for help on using the changeset viewer.