source: FPGA/FTU/test_firmware/FTU_test3/FTU_test3.vhd@ 9223

Last change on this file since 9223 was 240, checked in by qweitzel, 14 years ago
bug fix for FTU_test3
File size: 3.8 KB
Line 
1----------------------------------------------------------------------------------
2-- Company: ETH Zurich, Institute for Particle Physics
3-- Engineer: P. Vogler, Q. Weitzel
4--
5-- Create Date: 06/07/2010
6-- Design Name:
7-- Module Name: FTU_test3 - Behavioral
8-- Project Name:
9-- Target Devices:
10-- Tool versions:
11-- Description: Test firmware for FTU board, test the spi lines
12--
13-- Dependencies:
14--
15-- Revision:
16-- Revision 0.01 - File Created
17-- Additional Comments:
18--
19----------------------------------------------------------------------------------
20
21library IEEE;
22use IEEE.STD_LOGIC_1164.ALL;
23use IEEE.STD_LOGIC_ARITH.ALL;
24use IEEE.STD_LOGIC_UNSIGNED.ALL;
25
26---- Uncomment the following library declaration if instantiating
27---- any Xilinx primitives in this code.
28--library UNISIM;
29--use UNISIM.VComponents.all;
30
31entity FTU_test3 is
32 port(
33 -- global control
34 ext_clk : IN STD_LOGIC; -- external clock from FTU board
35 --reset : in STD_LOGIC; -- reset
36 --brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- geographic board/slot address
37 --brd_id : IN STD_LOGIC_VECTOR(7 downto 0); -- local solder-programmable board ID
38
39 -- rate counters LVDS inputs
40 -- use IBUFDS differential input buffer
41 --patch_A_p : IN STD_LOGIC; -- logic signal from first trigger patch
42 --patch_A_n : IN STD_LOGIC;
43 --patch_B_p : IN STD_LOGIC; -- logic signal from second trigger patch
44 --patch_B_n : IN STD_LOGIC;
45 --patch_C_p : IN STD_LOGIC; -- logic signal from third trigger patch
46 --patch_C_n : IN STD_LOGIC;
47 --patch_D_p : IN STD_LOGIC; -- logic signal from fourth trigger patch
48 --patch_D_n : IN STD_LOGIC;
49 --trig_prim_p : IN STD_LOGIC; -- logic signal from n-out-of-4 circuit
50 --trig_prim_n : IN STD_LOGIC;
51
52 -- DAC interface
53 -- miso : IN STD_LOGIC; -- master-in-slave-out
54 sck : OUT STD_LOGIC; -- serial clock to DAC
55 mosi : OUT STD_LOGIC; -- serial data to DAC, master-out-slave-in
56 --clr : OUT STD_LOGIC; -- clear signal to DAC
57 cs_ld : OUT STD_LOGIC -- chip select or load to DAC
58
59 -- RS-485 interface to FTM
60 --rx : IN STD_LOGIC; -- serial data from FTM
61 --tx : OUT STD_LOGIC; -- serial data to FTM
62 --rx_en : OUT STD_LOGIC; -- enable RS-485 receiver
63 --tx_en : OUT STD_LOGIC; -- enable RS-485 transmitter
64
65 -- analog buffer enable
66 --enables_A : OUT STD_LOGIC_VECTOR(8 downto 0); -- individual enables for analog inputs
67 --enables_B : OUT STD_LOGIC_VECTOR(8 downto 0); -- individual enables for analog inputs
68 --enables_C : OUT STD_LOGIC_VECTOR(8 downto 0); -- individual enables for analog inputs
69 --enables_D : OUT STD_LOGIC_VECTOR(8 downto 0); -- individual enables for analog inputs
70
71 -- testpoints
72 --TP_A : out STD_LOGIC_VECTOR(11 downto 0) -- testpoints
73 );
74end FTU_test3;
75
76architecture Behavioral of FTU_test3 is
77
78 component FTU_test3_dcm
79 port(
80 CLKIN_IN : IN STD_LOGIC;
81 CLKFX_OUT : OUT STD_LOGIC;
82 CLKIN_IBUFG_OUT : OUT STD_LOGIC
83 );
84 end component;
85
86 signal ext_clk_sig: STD_LOGIC;
87 signal clk_5M_sig : STD_LOGIC;
88
89begin
90
91 Inst_FTU_test3_dcm : FTU_test3_dcm
92 port map(
93 CLKIN_IN => ext_clk_sig,
94 CLKFX_OUT => clk_5M_sig,
95 CLKIN_IBUFG_OUT => open
96 );
97
98 ext_clk_sig <= ext_clk;
99
100 sck <= clk_5M_sig;
101 mosi <= clk_5M_sig;
102 cs_ld <= clk_5M_sig;
103
104end Behavioral;
Note: See TracBrowser for help on using the repository browser.