/media/sda-magnetic/david/Dok-15-2023-11-27/informatik/vhdl-2023-12-31/automat0057.vhdl


library ieee;
use ieee.std_logic_1164.all;

entity meinautomat0057uebergangsschaltnetz is
port (
	b, a, x: in std_logic;
	bout, aout: out std_logic
);
end;

architecture verhalten of meinautomat0057uebergangsschaltnetz is
begin
		bout <= (not b and not a and x) or
			(b and a and not x);
		aout <= (not b and not a and x) or
			(a and not x) or
			(b and not x);
end;

library ieee;
use ieee.std_logic_1164.all;

entity meinautomat0057ausgangsschaltnetz is
port (
	b, a, x: in std_logic;
	y: out std_logic
);
end;

architecture verhalten of meinautomat0057ausgangsschaltnetz is
begin
		y <= (a xor x) or (b and x);
end;

library ieee;
use ieee.std_logic_1164.all;

entity meinautomat0057testbench is
port (
	bout, aout: out std_logic;
	y: out std_logic
);
end;

architecture verhalten of meinautomat0057testbench is
	component meinautomat0057uebergangsschaltnetz
	port (
		bout, aout: out std_logic;
		b, a, x: in std_logic
	);
	end component;
	component meinautomat0057ausgangsschaltnetz
	port (
		b, a, x: in std_logic;
		y: out std_logic
	);
	end component;
	signal b, a, x: std_logic;
begin
	sn1: meinautomat0057uebergangsschaltnetz PORT MAP (bout=>bout, aout=>aout, b=>b, a=>a, x=>x);
	sn2: meinautomat0057ausgangsschaltnetz PORT MAP (y=>y, b=>b, a=>a, x=>x);
	x <= '0' after 0 ns, '1' after 10 ns, '0' after 20 ns, '1' after 30 ns, '0' after 40 ns, '1' after 50 ns, '0' after 60 ns, '1' after 70 ns, '0' after 80 ns;

	a <= '0' after 0 ns, '0' after 10 ns, '1' after 20 ns, '1' after 30 ns, '0' after 40 ns, '0' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns;

	b <= '0' after 0 ns, '0' after 10 ns, '0' after 20 ns, '0' after 30 ns, '1' after 40 ns, '1' after 50 ns, '1' after 60 ns, '1' after 70 ns, '0' after 80 ns;
end;