-- Interactive Audio Manipulation Processor -- -- file: constants.vhd -- status: compiled - no errors -- -- author: Stephen Tang -- -- Constants_Pkg contains constants that are used throughout the iAMP design library ieee; use ieee.std_logic_1164.all; package Constants_Pkg is -- mouse constants constant MOUSEWIDTH: positive := 9; -- video constants constant DISPLAY_X: positive := 10; constant DISPLAY_Y: positive := 10; constant MIN_X_COORD: std_logic_vector(DISPLAY_X-1 downto 0) := "0000000000"; constant MIN_Y_COORD: std_logic_vector(DISPLAY_X-1 downto 0) := "0000000000"; constant MAX_X_COORD: std_logic_vector(DISPLAY_X-1 downto 0) := "1001111111"; -- X"27F", 640-1 constant MAX_Y_COORD: std_logic_vector(DISPLAY_X-1 downto 0) := "0111011111"; -- X"1DF", 480-1 -- audio constants constant SOURCE_WIDTH: positive := 4; constant MIN_SOUND: positive := 1; constant MAX_SOUND: positive := 15; constant MIN_SOUND_COORD:std_logic_vector(SOURCE_WIDTH-1 downto 0):="0001"; -- 1 constant MAX_SOUND_COORD:std_logic_vector(SOURCE_WIDTH-1 downto 0):="1111"; -- 15 constant SAMPLE_WIDTH: positive := 24; -- ADC provides a 24-bit sample, but... constant EFFECTIVE_SAMPLE_WIDTH: positive := 8; -- ...we only use the 8 most significant bits. constant DELAY_WIDTH: positive := 5; constant NO_DELAY: std_logic_vector(DELAY_WIDTH-1 downto 0) := "00000"; -- RAM constants constant RAM_ADDRESS_WIDTH: positive := 18; constant RAM_DATA_WIDTH: positive := 8; constant RAM_MAX_ADDRESS: std_logic_vector(RAM_ADDRESS_WIDTH-1 downto 0) := "000000000000000100"; -- temp maximum of 4 addresses, for testing -- := "000000000100000000"; -- RAM is 512x8, so max address is 512 constant RAM_ADDRESS_UNDERFLOW: std_logic_vector(RAM_ADDRESS_WIDTH-1 downto 0) := "111111111111111111"; -- if address is "000000000000001000", subtracting '1' will give this -- value, which is NOT the same as RAM_MAX_ADDRESS in general; this -- number indicates an arithmetic underflow end Constants_Pkg;