source: firmware/FTM/ftm_definitions.vhd@ 10142

Last change on this file since 10142 was 10127, checked in by weitzel, 15 years ago
ftm library file added and small bug fix in FTM test bench
File size: 1.9 KB
Line 
1----------------------------------------------------------------------------------
2-- Company: ETH Zurich, Institute for Particle Physics
3-- Engineer: Q. Weitzel
4--
5-- Create Date: February 2011
6-- Design Name:
7-- Module Name: ftm_definitions
8-- Project Name:
9-- Target Devices:
10-- Tool versions:
11-- Description: library file for FTM design
12--
13-- Dependencies:
14--
15-- Revision:
16-- Revision 0.01 - File Created
17-- Additional Comments:
18--
19----------------------------------------------------------------------------------
20
21
22library IEEE;
23use IEEE.STD_LOGIC_1164.all;
24use IEEE.STD_LOGIC_ARITH.ALL;
25use IEEE.STD_LOGIC_UNSIGNED.ALL;
26-- use IEEE.NUMERIC_STD.ALL;
27
28-- package ftm_array_types is
29-- end ftm_array_types;
30
31
32library IEEE;
33use IEEE.STD_LOGIC_1164.all;
34use IEEE.STD_LOGIC_ARITH.ALL;
35use IEEE.STD_LOGIC_UNSIGNED.ALL;
36-- use IEEE.NUMERIC_STD.ALL;
37
38package ftm_constants is
39
40 --internal FPGA clock frequencies
41 constant INT_CLK_FREQUENCY_1 : integer := 50000000; -- 50MHz
42 constant INT_CLK_FREQUENCY_2 : integer := 250000000; -- 250MHz
43
44 --FTM address and firmware ID
45 constant FTM_ADDRESS : std_logic_vector(7 downto 0) := "11000000"; -- 192
46 constant FIRMWARE_ID : std_logic_vector(7 downto 0) := "00000001"; -- firmware version
47
48 --communication with FTUs
49 constant FTU_RS485_BAUD_RATE : integer := 250000; -- bits / sec in our case
50 constant FTU_RS485_TIMEOUT : integer := (INT_CLK_FREQUENCY_1 * 5) / 1000; -- 5ms @ 50MHz (250000 clk periods)
51 constant FTU_RS485_BLOCK_WIDTH : integer := 224; -- 28 byte protocol
52 constant FTU_RS485_START_DELIM : std_logic_vector(7 downto 0) := "01000000"; -- start delimiter "@"
53
54 --CRC setup
55 constant CRC_POLYNOMIAL : std_logic_vector(7 downto 0) := "00000111"; -- 8-CCITT
56 constant CRC_INIT_VALUE : std_logic_vector(7 downto 0) := "11111111";
57
58 --DNA identifier for simulation
59 constant DNA_FOR_SIM : bit_vector := X"01710000E0000501";
60
61end ftm_constants;
Note: See TracBrowser for help on using the repository browser.