Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp	(revision 42)
@@ -15,9 +15,9 @@
 
 
-  void Shifter::vhdl_body (Vhdl & vhdl)
+  void Shifter::vhdl_body (Vhdl * & vhdl)
   {
     //uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param._size_data)));
 
-    vhdl.set_body ("-- Compute all case of shift");
+    vhdl->set_body ("-- Compute all case of shift");
 
     for (uint32_t i=0; i<_param._nb_port; i++)
@@ -25,26 +25,26 @@
 	//-----[ Shift logic Left ]--------------------------------------------
 	if (_param._have_shift_logic_left)
-	  vhdl.set_body ("shift_logic_left_"+toString(i)+"        <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") sll CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("shift_logic_left_"+toString(i)+"        <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sll CONV_INTEGER(shift_"+toString(i)+"));");
 	//-----[ Shift logic Right ]-------------------------------------------
 	if (_param._have_shift_logic_right)
-	  vhdl.set_body ("shift_logic_right_"+toString(i)+"       <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") srl CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("shift_logic_right_"+toString(i)+"       <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) srl CONV_INTEGER(shift_"+toString(i)+"));");
 	//-----[ Shift arithmetic Left ]---------------------------------------
 	if (_param._have_shift_arithmetic_left)
-	  vhdl.set_body ("shift_arithmetic_left_"+toString(i)+"   <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") sla CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("shift_arithmetic_left_"+toString(i)+"   <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sla CONV_INTEGER(shift_"+toString(i)+"));");
 	//-----[ Shift arithmetic Right ]--------------------------------------
 	if (_param._have_shift_arithmetic_right)
-	  vhdl.set_body ("shift_arithmetic_right_"+toString(i)+"  <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") sra CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("shift_arithmetic_right_"+toString(i)+"  <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sra CONV_INTEGER(shift_"+toString(i)+"));");
 	//-----[ Rotate Left ]-------------------------------------------------
 	if (_param._have_rotate_left)
-	  vhdl.set_body ("rotate_left_"+toString(i)+"             <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") rol CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("rotate_left_"+toString(i)+"             <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) rol CONV_INTEGER(shift_"+toString(i)+"));");
 	//-----[ Rotate Right ]------------------------------------------------
 	if (_param._have_rotate_right)
-	  vhdl.set_body ("rotate_right_"+toString(i)+"            <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_DATA_"+toString(i)+") ror CONV_INTEGER(shift_"+toString(i)+"));");
+	  vhdl->set_body ("rotate_right_"+toString(i)+"            <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) ror CONV_INTEGER(shift_"+toString(i)+"));");
       }
 
     if (_param._size_data_completion > 0)
       {
-	vhdl.set_body ("");
-	vhdl.set_body ("-- Mask");
+	vhdl->set_body ("");
+	vhdl->set_body ("-- Mask");
 
 	for (uint32_t i=0; i<_param._nb_port; i++)
@@ -53,34 +53,34 @@
 	    
 	    if (_param._type_completion_bool == true)
-	      print_shifter_completion = "in_SHIFTER_CARRY_IN";
+	      print_shifter_completion = "in_SHIFTER_"+toString(i)+"_CARRY_IN";
 	    else
-	      print_shifter_completion = "in_SHIFTER_COMPLETION";
+	      print_shifter_completion = "in_SHIFTER_"+toString(i)+"_COMPLETION";
 
 	    if (_param._size_data == _param._size_data_completion)
 	      {
-		vhdl.set_body ("shifter_completion_left_"+toString(i)+"  <= "+print_shifter_completion+"_"+toString(i)+";");
-		vhdl.set_body ("shifter_completion_right_"+toString(i)+" <= "+print_shifter_completion+"_"+toString(i)+";");
+		vhdl->set_body ("shifter_completion_left_"+toString(i)+"  <= "+print_shifter_completion+";");
+		vhdl->set_body ("shifter_completion_right_"+toString(i)+" <= "+print_shifter_completion+";");
 	      }
 	    else
 	      {
-		vhdl.set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data_completion)+"  <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
-		vhdl.set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data_completion                    )+"  <= "+print_shifter_completion+"_"+toString(i)+";");
-
-		vhdl.set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+"_"+toString(i)+";");
-		vhdl.set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-_param._size_data_completion                    )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
-	      }
-	    
- 	    vhdl.set_body ("mask_completion_left_"+toString(i)+"     <= TO_STDLOGICVECTOR(TO_BITVECTOR(cst_completion) sll CONV_INTEGER(shift_"+toString(i)+"));");
- 	    vhdl.set_body ("mask_completion_right_"+toString(i)+"    <= TO_STDLOGICVECTOR(TO_BITVECTOR(cst_completion) srl CONV_INTEGER(shift_"+toString(i)+"));");
+		vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data_completion)+"  <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
+		vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data_completion                    )+"  <= "+print_shifter_completion+";");
+
+		vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+";");
+		vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-_param._size_data_completion                    )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
+	      }
+	    
+ 	    vhdl->set_body ("mask_completion_left_"+toString(i)+"     <= TO_STDLOGICVECTOR(TO_BITVECTOR(cst_completion) sll CONV_INTEGER(shift_"+toString(i)+"));");
+ 	    vhdl->set_body ("mask_completion_right_"+toString(i)+"    <= TO_STDLOGICVECTOR(TO_BITVECTOR(cst_completion) srl CONV_INTEGER(shift_"+toString(i)+"));");
 	  }
       }
 	      
 
-    vhdl.set_body ("");
-    vhdl.set_body ("-- Multiplexor");
+    vhdl->set_body ("");
+    vhdl->set_body ("-- Multiplexor");
 
     for (uint32_t i=0; i<_param._nb_port; i++)
       {
-	vhdl.set_body ("out_SHIFTER_DATA_"+toString(i)+"       <=");
+	vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA       <=");
 	string print_else = "    ";
 
@@ -95,11 +95,11 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_left ";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_shift ";
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_left ";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_shift ";
 		print_and = " and ";
 	      }
@@ -107,11 +107,11 @@
 	      {
 		have_when = true;
-		print_when += print_and+" in_SHIFTER_CARRY_"+toString(i)+" = cst_is_carry_arithmetic";
-	      }
-
-	    if (have_when)
-	      print_when = "when " + print_when;
-
-	    vhdl.set_body ("\t"+print_else+" shift_arithmetic_left_"+toString(i)+"   "+print_when);
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_CARRY = cst_is_carry_arithmetic";
+	      }
+
+	    if (have_when)
+	      print_when = "when " + print_when;
+
+	    vhdl->set_body ("\t"+print_else+" shift_arithmetic_left_"+toString(i)+"   "+print_when);
 	    print_else = "else";
 	  }
@@ -126,11 +126,11 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_right";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_shift ";
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_right";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_shift ";
 		print_and = " and ";
 	      }
@@ -138,11 +138,11 @@
 	      {
 		have_when = true;
-		print_when += print_and+" in_SHIFTER_CARRY_"+toString(i)+" = cst_is_carry_arithmetic";
-	      }
-
-	    if (have_when)
-	      print_when = "when " + print_when;
-
-	    vhdl.set_body ("\t"+print_else+" shift_arithmetic_right_"+toString(i)+"  "+print_when);
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_CARRY = cst_is_carry_arithmetic";
+	      }
+
+	    if (have_when)
+	      print_when = "when " + print_when;
+
+	    vhdl->set_body ("\t"+print_else+" shift_arithmetic_right_"+toString(i)+"  "+print_when);
 	    print_else = "else";
 	  }
@@ -157,11 +157,11 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_left ";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_shift ";
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_left ";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_shift ";
 		print_and = " and ";
 	      }
@@ -169,5 +169,5 @@
 	      {
 		have_when = true;
-		print_when += print_and+" in_SHIFTER_CARRY_"+toString(i)+" = cst_is_carry_logic     ";
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_CARRY = cst_is_carry_logic     ";
 	      }
 
@@ -182,5 +182,5 @@
 	      print_expr_completion = "(shift_logic_left_"+toString(i)+"  and mask_completion_left_"+toString(i)+" ) or ( shifter_completion_left_"+toString(i)+"  and not mask_completion_left_"+toString(i)+" )";
 
-	    vhdl.set_body ("\t"+print_else+" "+print_expr_completion+"        "+print_when);
+	    vhdl->set_body ("\t"+print_else+" "+print_expr_completion+"        "+print_when);
 	    print_else = "else";
 	  }
@@ -195,11 +195,11 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_right";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_shift ";
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_right";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_shift ";
 		print_and = " and ";
 	      }
@@ -207,5 +207,5 @@
 	      {
 		have_when = true;
-		print_when += print_and+" in_SHIFTER_CARRY_"+toString(i)+" = cst_is_carry_logic     ";
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_CARRY = cst_is_carry_logic     ";
 	      }
 
@@ -220,5 +220,5 @@
 	      print_expr_completion = "(shift_logic_right_"+toString(i)+" and mask_completion_right_"+toString(i)+") or ( shifter_completion_right_"+toString(i)+" and not mask_completion_right_"+toString(i)+")";
 
-	    vhdl.set_body ("\t"+print_else+" "+print_expr_completion+"        "+print_when);
+	    vhdl->set_body ("\t"+print_else+" "+print_expr_completion+"        "+print_when);
 	    print_else = "else";
 	  }
@@ -233,18 +233,18 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_left ";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_rotate";
-		print_and = " and ";
-	      }
-
-	    if (have_when)
-	      print_when = "when " + print_when;
-
-	    vhdl.set_body ("\t"+print_else+" rotate_left_"+toString(i)+"             "+print_when);
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_left ";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_rotate";
+		print_and = " and ";
+	      }
+
+	    if (have_when)
+	      print_when = "when " + print_when;
+
+	    vhdl->set_body ("\t"+print_else+" rotate_left_"+toString(i)+"             "+print_when);
 	    print_else = "else";
 	  }
@@ -259,21 +259,21 @@
 	      {
 		have_when = true;
-		print_when += " in_SHIFTER_DIRECTION_"+toString(i)+" = cst_is_direction_right";
-		print_and = " and ";
-	      }
-	    if (_param._rotate      == external_rotate)
-	      {
-		have_when = true;
-		print_when += print_and+" in_SHIFTER_TYPE_"+toString(i)+" = cst_is_type_rotate";
-		print_and = " and ";
-	      }
-
-	    if (have_when)
-	      print_when = "when " + print_when;
-
-	    vhdl.set_body ("\t"+print_else+" rotate_right_"+toString(i)+"            "+print_when);
-	    print_else = "else";
-	  }
-	vhdl.set_body (";");
+		print_when += " in_SHIFTER_"+toString(i)+"_DIRECTION = cst_is_direction_right";
+		print_and = " and ";
+	      }
+	    if (_param._rotate      == external_rotate)
+	      {
+		have_when = true;
+		print_when += print_and+" in_SHIFTER_"+toString(i)+"_TYPE = cst_is_type_rotate";
+		print_and = " and ";
+	      }
+
+	    if (have_when)
+	      print_when = "when " + print_when;
+
+	    vhdl->set_body ("\t"+print_else+" rotate_right_"+toString(i)+"            "+print_when);
+	    print_else = "else";
+	  }
+	vhdl->set_body (";");
       }
     
