#ifdef VHDL

/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Vhdl.h"

#include <sstream>
using namespace std;

namespace morpheo              {
namespace behavioural          {
  
  string Vhdl::get_component(uint32_t depth,
			     string   name)
  {
    string        tab = string(depth,'\t');
    ostringstream text;

    text <<                                      endl
	 << tab << "component " << name       << endl;
    if (_list_port.empty() == false)
      text << tab << "\tport ("                 << endl
	   << tab << get_port(depth+1)          << endl
	   << tab << "\t     );"                << endl;
    text << tab << "end component;"           << endl;
    
    return text.str();
  };
  
}; // end namespace behavioural          
}; // end namespace morpheo              

#endif
