title: Is it possible to create several instances of the same component using a loop?
body: <p>I have a component:</p>
  
  <pre><code>Component CAU is
      port 
      (
          CLK              : in std_logic;
          RESET            : in std_logic;
          START            : in std_logic;
          V_DIRECTION      : in vector_3d;
          P_ORIGIN         : in vector_3d;      
          V_NORMAL_IN      : in vector_3d;
          DOT_A            : in vector_3d;
          DOT_B            : in vector_3d;
          DOT_C            : in vector_3d;
          ID_DATA_IN       : in scalar;
  
          ID_DATA_OUT      : out scalar;
          V_REFLECT        : out vector_3d;          
          V_PASS           : out vector_3d;        
          P_INTERSECT      : out vector_3d;
          V_NORMAL_OUT     : out vector_3d;
          T_OUT            : out scalar;
          SUCCESS          : out std_logic; 
          FINISH           : out std_logic
      );   
  end  Component; 
  </code></pre>
  
  <p>And I want to create 8 instances of it. each is called <code>CAU_inst0</code>, <code>CAU_inst1</code>, and so on. Each of the instances is connected the following way:</p>
  
  <pre><code>CAU_inst0 : CAU
   PORT MAP
   (
      CLK              =&gt; CLK_CAU,
      RESET            =&gt; RESET,
      START            =&gt; start_0_sig,
      V_DIRECTION      =&gt; v_direction_0_sig,
      P_ORIGIN         =&gt; p_origin_0_sig,
      V_NORMAL_IN      =&gt; v_normal_in_0_sig,
      DOT_A            =&gt; dot_a_0_sig,
      DOT_B            =&gt; dot_b_0_sig,
      DOT_C            =&gt; dot_c_0_sig,
      ID_DATA_IN       =&gt; id_data_in_0_sig,
  
      ID_DATA_OUT      =&gt; id_data_out_0_sig
      V_REFLECT        =&gt; v_reflect_0_sig,
      V_PASS           =&gt; v_pass_0_sig,
      P_INTERSECT      =&gt; p_intersect_0_sig,
      V_NORMAL_OUT     =&gt; v_normal_out_0_sig,
      T_OUT            =&gt; t_0_sig,
      SUCCESS          =&gt; success_0_sig,
      FINISH           =&gt; finish_0_sig
   );
  </code></pre>
  
  <p>where for each instance <code>i</code> the number <code>0</code> is replaced with <code>i</code>. What I did was to create a Matlab script that created the 8 different instances with the correct number. But it's an ugly solution as it takes 170 lines of just the same code with little changes. Is there a way to create the components (and if possible the appropriate signals) in a loop inside the code to reduce cluter and line?</p>