-- PROJECT: D0 Run IIb Trigger L1 Calorimeter upgrade -- -- MODULE: RS232 to generic bus converter -- -- ELEMENT: constant_package -- -- DESCRIPTION: definition of various constants -- -- AUTHOR: J.Marquet marquet@efrei.fr -- -- DATE AND HISTORY: -- July 2004: created -- September 2004: revised by D.Calvet -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- library ieee; use IEEE.STD_LOGIC_1164.all; use IEEE.NUMERIC_BIT.all; package constant_package is -------------------------------------------------------------------------------------- -- The DEFAULT_BAUD_RATE is the value used by gate synthesizer. -- It should be set to the desired value before compiling the FPGA code driving -- the real hardware. A different baud rate is set for simulation only in the -- appropriate testbench. -- constant DEFAULT_BAUD_RATE : integer := 57600; -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- -- The FREQ_REF is the reference clock for the setting the baud rate to -- the correct value. The 24 MHz on-board oscillator of the actual hardware is used. -- This value must not be modified unless another reference clock is used. constant FREQ_REF : integer := 24000000; -- 24 MHz reference clock -------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------- -- -- Code of ASCII characters used -- constant ascii_I : std_logic_vector(7 downto 0) := "01001001"; -- Code ascii de I constant ascii_R : std_logic_vector(7 downto 0) := "01010010"; -- Code ascii de R constant ascii_W : std_logic_vector(7 downto 0) := "01010111"; -- Code ascii de W constant ascii_Q : std_logic_vector(7 downto 0) := "01010001"; -- Code ascii de Q constant ascii_question : std_logic_vector(7 downto 0) := "00111111"; -- Code ascii de ? constant ascii_space : std_logic_vector(7 downto 0) := "00100000"; -- Code ascii de " " constant ascii_cr : std_logic_vector(7 downto 0) := "00001101"; -- Code ascii de "cr" constant ascii_lf : std_logic_vector(7 downto 0) := "00001010"; -- Code ascii de "lf" constant ascii_0 : std_logic_vector(7 downto 0) := "00110000"; -- Code ascii de 0 constant ascii_1 : std_logic_vector(7 downto 0) := "00110001"; -- Code ascii de 1 constant ascii_2 : std_logic_vector(7 downto 0) := "00110010"; -- Code ascii de 2 constant ascii_3 : std_logic_vector(7 downto 0) := "00110011"; -- Code ascii de 3 constant ascii_4 : std_logic_vector(7 downto 0) := "00110100"; -- Code ascii de 4 constant ascii_5 : std_logic_vector(7 downto 0) := "00110101"; -- Code ascii de 5 constant ascii_6 : std_logic_vector(7 downto 0) := "00110110"; -- Code ascii de 6 constant ascii_7 : std_logic_vector(7 downto 0) := "00110111"; -- Code ascii de 7 constant ascii_8 : std_logic_vector(7 downto 0) := "00111000"; -- Code ascii de 8 constant ascii_9 : std_logic_vector(7 downto 0) := "00111001"; -- Code ascii de 9 constant ascii_A : std_logic_vector(7 downto 0) := "01000001"; -- Code ascci de A constant ascii_B : std_logic_vector(7 downto 0) := "01000010"; -- Code ascii de B constant ascii_C : std_logic_vector(7 downto 0) := "01000011"; -- Code ascii de C constant ascii_D : std_logic_vector(7 downto 0) := "01000100"; -- Code ascii de D constant ascii_E : std_logic_vector(7 downto 0) := "01000101"; -- Code ascii de E constant ascii_F : std_logic_vector(7 downto 0) := "01000110"; -- Code ascii de F -------------------------------------------------------------------------------------- end constant_package; package body constant_package is end constant_package;