--------------------------------------------- --Project Gump --Marc Binette --Ralph Nevins --Lambert Lo ---------------------------------------------- --servo_controller_comp.vhd --This makes a package with all the components --used in the servo controller --these are a counter, a hold register, a register, --and a comparator LIBRARY ieee; USE ieee.std_logic_1164.ALL; PACKAGE servo_controller_package IS --constants are used to set up the generic --components CONSTANT count : positive := 12; CONSTANT holdreg : positive := 8; --counter component COMPONENT servo_controller_counter PORT(clock : IN std_logic; overflow : BUFFER std_logic; topfourbits : BUFFER std_logic_vector(3 DOWNTO 0); count_out : BUFFER std_logic_vector(count-1 DOWNTO 0)); END COMPONENT; --hold register component COMPONENT servo_controller_8bithold PORT(load, reset : IN std_logic; data : IN std_logic_vector(holdreg-1 DOWNTO 0); hold_out : BUFFER std_logic_vector(holdreg-1 DOWNTO 0)); END COMPONENT; --register component COMPONENT servo_controller_register8bit PORT(load, reset : IN std_logic; data_in : IN std_logic_vector(holdreg-1 DOWNTO 0); register_out : buffer std_logic_vector(holdreg-1 DOWNTO 0)); END COMPONENT ; --comparator component COMPONENT servo_controller_comparator PORT(reg_in : IN std_logic_vector(holdreg-1 DOWNTO 0); cnt_in : IN std_logic_vector(count-1 DOWNTO 0); compare_out : buffer std_logic); END COMPONENT; --dflipflop component COMPONENT servo_controller_dflip IS PORT(load, datain : IN std_logic; dataout : OUT std_logic); END COMPONENT; END PACKAGE;