#ifndef _BLACKBOX_BT_H_
#define _BLACKBOX_BT_H_


#include <systemc.h>
#include "Precision.h"
#include "sc_float.h"

// Deklarácia modulu pre generovanie aproximovaných hodnôt 
// exponenciálne funkcie
class BlackBox_BT : public sc_module //MODULE DECLARATION
{
public:

//Definovanie portov modulu
  //Vstupné konštanty
	sc_in<sc_float<E, M> > coef0_sc_fl;
	sc_in<sc_float<E, M> > coef1_sc_fl;
	sc_in<sc_float<E, M> > coef2_sc_fl;
	sc_in<sc_float<E, M> > Uz_sc_fl;
  //Vstupy
	sc_in_clk clk;
	sc_in<bool> rst;
	sc_in<bool> en;
  //Výstupy
	sc_out<sc_float<E, M> > outp;

  //"Handshaking"
		sc_in<bool>		inp_vld;
		sc_out<bool>	inp_rdy;
		sc_in<bool>		outp_rdy;
		sc_out<bool>	outp_vld;

//sc_exp funkcie
#include "sc_exp.inc"

//Funkcia modulu
void expFUNC();

//Konštruktor modulu
SC_HAS_PROCESS( BlackBox_BT );
BlackBox_BT(sc_module_name nm): sc_module(nm),
	//Vstupné konštanty
		coef0_sc_fl		("coef0_sc_fl"),	
		coef1_sc_fl		("coef1_sc_fl"),
		coef2_sc_fl		("coef2_sc_fl"),
		Uz_sc_fl		("Uz_sc_fl"),
	//Vstupy
		clk		("clk"),
		rst		("rst"),
		en		("en"),
	//Výstupy
		outp	("outp"),
	//"Handshaking"
		inp_vld		("inp_vld"),
		inp_rdy		("inp_rdy"),
		outp_rdy	("outp_rdy"),
		outp_vld	("outp_vld")
	{
		SC_CTHREAD( expFUNC,  clk.pos());
			reset_signal_is( rst, true );
	}
};//Ukončenie deklarácie modulu

#endif
