#ifdef VHDL

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

#include "Behavioural/include/Vhdl.h"

#include <sstream>
using namespace std;

namespace morpheo              {
namespace behavioural          {
  
#undef  FUNCTION
#define FUNCTION "Vhdl::get_package"
  string Vhdl::get_package(uint32_t depth       ,
			   string   filename    ,
			   string   package_name,
			   string   entity_name )
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    string        tab = string(depth,'\t');
    ostringstream text;

    text << tab << get_header       (depth,filename)                      << endl
	 << tab << get_library_ieee (depth)                               << endl
	 << tab << "package " << package_name << " is"                    << endl
	 << tab << get_component    (depth+1,entity_name)                 << endl
	 << tab << "end " << package_name << ";"                          << endl;

    log_printf(FUNC,Behavioural,FUNCTION,"End");
    
    return text.str();
  };
  
}; // end namespace behavioural          
}; // end namespace morpheo              

#endif
