library ieee; --tex comment use ieee.std_logic_1164.all; --tex comment use work.nondeterminism.all; --tex comment use work.handshake.all; --tex comment entity shopPA_bundled is --tex comment port(req_wine:in std_logic; --tex comment ack_wine:buffer std_logic:='0'; --tex comment bottle:in std_logic_vector(2 downto 0); --tex comment req_patron:buffer std_logic:='0'; --tex comment ack_patron:in std_logic; --tex comment shelf:buffer std_logic_vector(2 downto 0)); --tex comment end shopPA_bundled; --tex comment architecture four_phase of shopPA_bundled is --tex comment begin --tex comment --\begin{algorithm} --\small shop_bundled_4phase:process begin guard(req_wine,'1'); -- winery calls --@synthesis_off shelf <= bottle after delay(2,4); wait for delay(5,10); --@synthesis_on assign(ack_wine,'1',1,3); -- shop receives wine guard(req_wine,'0'); -- req_wine resets assign(ack_wine,'0',1,3); -- reset ack_wine assign(req_patron,'1',1,3); -- call patron guard(ack_patron,'1'); -- patron buys wine assign(req_patron,'0',1,3); -- reset req_patron guard(ack_patron,'0'); -- ack_patron resets end process; --\end{algorithm} end four_phase; --tex comment