-- Model Name : Reduced Activity - Parwan Accumulator -- Author : Zainalabedin Navabi -- Last Updated : 09 / 15 / 1996 -- This document is © copyrighted by the Author.
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
--
LIBRARY EXEMPLAR;
USE EXEMPLAR.exemplar_1164.ALL;
USE EXEMPLAR.exemplar.ALL;
--
LIBRARY WORK;
USE WORK.synthesis_parameters.ALL;
USE WORK.synthesis_utilities.ALL;
USE WORK.global_environment.ALL;
--
ENTITY program_counter_unit IS
    PORT (increment, load_page, load_offset, reset : IN std_logic);
END program_counter_unit;
--
ARCHITECTURE synthesizable_behavioral OF program_counter_unit IS
BEGIN
    PROCESS (reset, increment, load_page, load_offset)
    BEGIN
      IF reset'EVENT THEN
        pc_out := zero_12;
      ELSIF increment'EVENT THEN
        pc_out := pc_out + "01";
      END IF;
      IF load_offset'EVENT THEN
        pc_out (7 DOWNTO 0) := mar_out (7 DOWNTO 0);
      END IF;
      IF load_page'EVENT THEN
        pc_out (11 DOWNTO 8) := mar_out (11 DOWNTO 8);
      END IF;
    END PROCESS;
END synthesizable_behavioral;