library ieee;
use ieee.std_logic_1164 .all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.math_real.all;

entity sinus_generator is

	generic(AMP: real;
		FREQ: real);
	
	port(sinus: out real);
	
end sinus_generator;

architecture archi of sinus_generator is

signal sinus_tmp : real := 0.0;

begin

	P1:process
	
	constant delta   : real := 1000.0e-12;
	constant fin	 : time := 1000 ps;
	
	variable t	 : real := 0.0;
	variable angle 	 : real := 0.0;
	variable sin_int : integer;
	
	begin
	
		loop
			
			angle   := math_2_pi * FREQ * t;
			t       := t + delta;
			sinus_tmp <= AMP * sin(angle);
			wait for fin;
		
		end loop;
		
		wait;
		
	end process P1;
	
	sinus <= sinus_tmp;
	
end archi;
