Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp	(revision 118)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp	(revision 123)
@@ -43,4 +43,68 @@
     else
       {
+#ifdef DEBUG_TEST
+        {
+          uint32_t free_list_nb_gpr_free     = PORT_READ(in_INFO_NB_GPR_FREE);
+          uint32_t free_list_nb_spr_free     = PORT_READ(in_INFO_NB_SPR_FREE);
+          uint32_t stat_list_nb_gpr_free     = 0;
+          uint32_t stat_list_nb_spr_free     = 0;
+          uint32_t stat_list_nb_gpr_can_free = 0;
+          uint32_t stat_list_nb_spr_can_free = 0;
+          uint32_t stat_list_nb_gpr_link     = 0;
+          uint32_t stat_list_nb_spr_link     = 0;
+          uint32_t stat_list_nb_gpr_use      = 0;
+          uint32_t stat_list_nb_spr_use      = 0;
+
+          for (uint32_t i=0; i<_param->_nb_bank; i++)
+            {
+              for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
+                {
+                  if (gpr_stat_list [i][j]._is_free)
+                    stat_list_nb_gpr_free ++;
+                  if (gpr_stat_list [i][j]._is_link)
+                    stat_list_nb_gpr_link ++;
+                  if (gpr_stat_list [i][j]._is_use)
+                    stat_list_nb_gpr_use ++;
+                  if (gpr_stat_list [i][j].can_free())
+                    stat_list_nb_gpr_can_free ++;
+                }
+              for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
+                {
+                  if (spr_stat_list [i][j]._is_free)
+                    stat_list_nb_spr_free ++;
+                  if (spr_stat_list [i][j]._is_link)
+                    stat_list_nb_spr_link ++;
+                  if (spr_stat_list [i][j]._is_use)
+                    stat_list_nb_spr_use ++;
+                  if (spr_stat_list [i][j].can_free())
+                    stat_list_nb_spr_can_free ++;
+                }
+            }
+
+          uint32_t  nb_gpr_free = stat_list_nb_gpr_free+stat_list_nb_gpr_can_free;
+          uint32_t  nb_spr_free = stat_list_nb_spr_free+stat_list_nb_spr_can_free;
+          uint32_t _nb_gpr_free = (_param->_nb_general_register - _param->_nb_gpr_use_init); 
+          uint32_t _nb_spr_free = (_param->_nb_special_register - _param->_nb_spr_use_init); 
+          uint32_t  nb_gpr_link = stat_list_nb_gpr_link - _param->_nb_gpr_use_init;
+          uint32_t  nb_spr_link = stat_list_nb_spr_link - _param->_nb_spr_use_init;
+          uint32_t  nb_gpr_use  = stat_list_nb_gpr_use - _param->_nb_gpr_use_init;
+          uint32_t  nb_spr_use  = stat_list_nb_spr_use - _param->_nb_spr_use_init;
+
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"  * nb_gpr_free : stat_list %d - free_list %d - free %d, link %d (%d), use %d (%d)",stat_list_nb_gpr_free,free_list_nb_gpr_free,nb_gpr_free,nb_gpr_link,stat_list_nb_gpr_link,nb_gpr_use,stat_list_nb_gpr_use);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"  * nb_spr_free : stat_list %d - free_list %d - free %d, link %d (%d), use %d (%d)",stat_list_nb_spr_free,free_list_nb_spr_free,nb_spr_free,nb_spr_link,stat_list_nb_spr_link,nb_spr_use,stat_list_nb_spr_use);
+
+          if (free_list_nb_gpr_free != stat_list_nb_gpr_free)
+            throw ERRORMORPHEO(FUNCTION,toString(_("Number of free general register is not valid. %d in Stat_List and %d in Free_list.\n"),stat_list_nb_gpr_free,free_list_nb_gpr_free));
+          if (free_list_nb_spr_free != stat_list_nb_spr_free)
+            throw ERRORMORPHEO(FUNCTION,toString(_("Number of free general register is not valid. %d in Stat_List and %d in Free_list.\n"),stat_list_nb_spr_free,free_list_nb_spr_free));
+
+          if (PORT_READ(in_INFO_ROB_EMPTY) and (nb_gpr_free != _nb_gpr_free))
+            throw ERRORMORPHEO(FUNCTION,toString(_("Rob is empty but they have %d general registers free or can_free and must be %d registers."),nb_gpr_free,_nb_gpr_free));
+
+          if (PORT_READ(in_INFO_ROB_EMPTY) and (nb_spr_free != _nb_spr_free))
+            throw ERRORMORPHEO(FUNCTION,toString(_("Rob is empty but they have %d special registers free or can_free and must be %d registers."),nb_spr_free,_nb_spr_free));
+        }
+#endif
+
 	// =====================================================
 	// =====[ INSERT ]======================================
@@ -256,10 +320,11 @@
       for (uint32_t i=0; i<_param->_nb_bank; i++)
         for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
-          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * GPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d",
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * GPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d",
                      i,
                      j,
                      (i<<_param->_shift_gpr)|j,
                      gpr_stat_list[i][j]._is_free,
-                     gpr_stat_list[i][j]._is_link// ,
+                     gpr_stat_list[i][j]._is_link,
+                     gpr_stat_list[i][j]._is_use// ,
 //                      gpr_stat_list[i][j]._is_valid,
 //                      gpr_stat_list[i][j]._counter
@@ -267,10 +332,11 @@
       for (uint32_t i=0; i<_param->_nb_bank; i++)
         for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
-          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * SPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d",
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * SPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, use %.1d",
                      i,
                      j,
                      (i<<_param->_shift_spr)|j,
                      spr_stat_list[i][j]._is_free,
-                     spr_stat_list[i][j]._is_link// ,
+                     spr_stat_list[i][j]._is_link,
+                     spr_stat_list[i][j]._is_use// ,
 //                      spr_stat_list[i][j]._is_valid,
 //                      spr_stat_list[i][j]._counter
