#ifdef VHDL

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

#include "Behavioural/include/Vhdl.h"

#include <sstream>
using namespace std;

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

    text <<                                      endl
	 << tab << "entity " << name << " is" << endl;

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

#endif
