- Timestamp:
- 07/01/10 10:31:43 (14 years ago)
- Location:
- FPGA/FTU
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
FPGA/FTU/FTU_top.vhd
r207 r234 33 33 -- global control 34 34 ext_clk : IN STD_LOGIC; -- external clock from FTU board 35 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- global board address 36 35 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- geographic board/slot address 36 brd_id : in STD_LOGIC_VECTOR(7 downto 0); -- local solder-programmable board ID 37 37 38 -- rate counters LVDS inputs 38 39 -- use IBUFDS differential input buffer -
FPGA/FTU/FTU_top_tb.vhd
r207 r234 42 42 -- global control 43 43 ext_clk : IN STD_LOGIC; -- external clock from FTU board 44 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- global board address 45 44 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- geographic board/slot address 45 brd_id : in STD_LOGIC_VECTOR(7 downto 0); -- local solder-programmable board ID 46 46 47 -- rate counters LVDS inputs 47 48 -- use IBUFDS differential input buffer … … 83 84 signal ext_clk : STD_LOGIC := '0'; 84 85 signal brd_add : STD_LOGIC_VECTOR(5 downto 0) := (others => '0'); 86 signal brd_id : STD_LOGIC_VECTOR(7 downto 0) := (others => '0'); 85 87 signal patch_A_p : STD_LOGIC := '0'; 86 88 signal patch_A_n : STD_LOGIC := '0'; … … 119 121 ext_clk => ext_clk, 120 122 brd_add => brd_add, 123 brd_id => brd_id, 121 124 patch_A_p => patch_A_p, 122 125 patch_A_n => patch_A_n, -
FPGA/FTU/ftu_board.ucf
r219 r234 5 5 # Pin location constraints 6 6 # 7 # by Patrick Vogler 7 # by Patrick Vogler, Quirin Weitzel 8 # 01 July 2010 8 9 ######################################################## 9 10 … … 11 12 #Clock 12 13 ####################################################### 13 NET Clk LOC = Y11 | IOSTANDARD=LVCMOS33;14 NET ext_clk LOC = Y11 | IOSTANDARD=LVCMOS33; # Clk 14 15 15 16 16 17 # RS-485 Interface 17 18 ####################################################### 18 NET 485_RE LOC = T20 | IOSTANDARD=LVCMOS33;19 NET 485_DE LOC = U20 | IOSTANDARD=LVCMOS33;20 NET 485_DO LOC = U19 | IOSTANDARD=LVCMOS33;21 NET 485_DI LOC = R20 | IOSTANDARD=LVCMOS33;19 NET rx_en LOC = T20 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # 485_RE: enable RS-485 receiver 20 NET tx_en LOC = U20 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # 485_DE: enable RS-485 transmitter 21 NET tx LOC = U19 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # 485_DO: serial data to FTM 22 NET rx LOC = R20 | IOSTANDARD=LVCMOS33; # 485_DI: serial data from FTM 22 23 23 24 24 # Board ID - inputs 25 # Board ID - inputs 26 # local board-ID "solder programmable" 25 27 ####################################################### 26 NET P0 LOC = C4 | IOSTANDARD=LVCMOS33;27 NET P1 LOC = C5 | IOSTANDARD=LVCMOS33;28 NET P2 LOC = C6 | IOSTANDARD=LVCMOS33;29 NET P3 LOC = C7 | IOSTANDARD=LVCMOS33;30 NET P4 LOC = C8 | IOSTANDARD=LVCMOS33;31 NET P5 LOC = B8 | IOSTANDARD=LVCMOS33;32 NET P6 LOC = C9 | IOSTANDARD=LVCMOS33;33 NET P7 LOC = B9 | IOSTANDARD=LVCMOS33;28 NET brd_id<0> LOC = C4 | IOSTANDARD=LVCMOS33; # P0 29 NET brd_id<1> LOC = C5 | IOSTANDARD=LVCMOS33; # P1 30 NET brd_id<2> LOC = C6 | IOSTANDARD=LVCMOS33; # P2 31 NET brd_id<3> LOC = C7 | IOSTANDARD=LVCMOS33; # P3 32 NET brd_id<4> LOC = C8 | IOSTANDARD=LVCMOS33; # P4 33 NET brd_id<5> LOC = B8 | IOSTANDARD=LVCMOS33; # P5 34 NET brd_id<6> LOC = C9 | IOSTANDARD=LVCMOS33; # P6 35 NET brd_id<7> LOC = B9 | IOSTANDARD=LVCMOS33; # P7 34 36 35 37 36 38 # Board Addresses 39 # geographical slot address 37 40 ####################################################### 38 NET ADDR0 LOC = A15 | IOSTANDARD=LVCMOS33;39 NET ADDR1 LOC = B15 | IOSTANDARD=LVCMOS33;40 NET ADDR2 LOC = A16 | IOSTANDARD=LVCMOS33;41 NET ADDR3 LOC = A17 | IOSTANDARD=LVCMOS33;42 NET ADDR4 LOC = A18 | IOSTANDARD=LVCMOS33;43 NET ADDR5 LOC = B18 | IOSTANDARD=LVCMOS33;41 NET brd_add<0> LOC = A15 | IOSTANDARD=LVCMOS33; # ADDR0 42 NET brd_add<1> LOC = B15 | IOSTANDARD=LVCMOS33; # ADDR1 43 NET brd_add<2> LOC = A16 | IOSTANDARD=LVCMOS33; # ADDR2 44 NET brd_add<3> LOC = A17 | IOSTANDARD=LVCMOS33; # ADDR3 45 NET brd_add<4> LOC = A18 | IOSTANDARD=LVCMOS33; # ADDR4 46 NET brd_add<5> LOC = B18 | IOSTANDARD=LVCMOS33; # ADDR5 44 47 45 48 46 49 # DAC SPI Interface 47 50 ####################################################### 48 NET MOSI LOC = E20 | IOSTANDARD=LVCMOS33;49 NET SCK LOC = E19 | IOSTANDARD=LVCMOS33;50 NET DAC_CS LOC = E18 | IOSTANDARD=LVCMOS33;51 NET DAC_CRL LOC = D20 | IOSTANDARD=LVCMOS33;51 NET mosi LOC = E20 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #MOSI: serial data to DAC, master-out-slave-in 52 NET sck LOC = E19 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #SCK: serial clock to DAC 53 NET cs_ld LOC = E18 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #DAC_CS: chip select or load to DAC 54 NET clr LOC = D20 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #DAC_CRL: clear signal to DAC 52 55 53 56 … … 55 58 ###################################################### 56 59 # on Connector J5 57 NET TP 0_0 LOC = B3 | IOSTANDARD=LVCMOS33;58 NET TP 1_0 LOC = A3 | IOSTANDARD=LVCMOS33;59 NET TP 2_0 LOC = A4 | IOSTANDARD=LVCMOS33;60 NET TP 3_0 LOC = B5 | IOSTANDARD=LVCMOS33;60 NET TP_A<0> LOC = B3 | IOSTANDARD=LVCMOS33; # TP0_0 61 NET TP_A<1> LOC = A3 | IOSTANDARD=LVCMOS33; # TP1_0 62 NET TP_A<2> LOC = A4 | IOSTANDARD=LVCMOS33; # TP2_0 63 NET TP_A<3> LOC = B5 | IOSTANDARD=LVCMOS33; # TP2_0 61 64 62 65 # on Connector J6 63 NET TP 4_0 LOC = A5 | IOSTANDARD=LVCMOS33;64 NET TP 5_0 LOC = A6 | IOSTANDARD=LVCMOS33;65 NET TP 6_0 LOC = B7 | IOSTANDARD=LVCMOS33;66 NET TP 7_0 LOC = A7 | IOSTANDARD=LVCMOS33;66 NET TP_A<4> LOC = A5 | IOSTANDARD=LVCMOS33; # TP4_0 67 NET TP_A<5> LOC = A6 | IOSTANDARD=LVCMOS33; # TP5_0 68 NET TP_A<6> LOC = B7 | IOSTANDARD=LVCMOS33; # TP6_0 69 NET TP_A<7> LOC = A7 | IOSTANDARD=LVCMOS33; # TP7_0 67 70 68 71 # on Connector J7 69 NET TP 8_0 LOC = B11 | IOSTANDARD=LVCMOS33;70 NET TP 9_0 LOC = A12 | IOSTANDARD=LVCMOS33;71 NET TP 10_0 LOC = B12 | IOSTANDARD=LVCMOS33;72 NET TP 11_0 LOC = A14 | IOSTANDARD=LVCMOS33;72 NET TP_A<8> LOC = B11 | IOSTANDARD=LVCMOS33; # TP8_0 73 NET TP_A<9> LOC = A12 | IOSTANDARD=LVCMOS33; # TP9_0 74 NET TP_A<10> LOC = B12 | IOSTANDARD=LVCMOS33; # TP10_0 75 NET TP_A<11> LOC = A14 | IOSTANDARD=LVCMOS33; # TP11_0 73 76 74 77 75 # LVDS Inputs78 # Rate counter LVDS Inputs 76 79 ###################################################### 77 LVDS0_P LOC = Y4 | IOSTANDARD=LVCMOS33; # Patch 0 78 LVDS0_N LOC = Y5 | IOSTANDARD=LVCMOS33; 80 # logic signal from first trigger patch 81 NET patch_A_p LOC = Y4 | IOSTANDARD=LVDS_33 | DIFF_TERM=No; # LVDS0_P 82 NET patch_A_n LOC = Y5 | IOSTANDARD=LVDS_33 | DIFF_TERM=No; # LVDS0_N 79 83 80 LVDS1_P LOC = Y6 | IOSTANDARD=LVCMOS33; # Patch 1 81 LVDS1_N LOC = Y7 | IOSTANDARD=LVCMOS33; 84 # logic signal from second trigger patch 85 NET patch_B_p LOC = Y6 | IOSTANDARD=LVDS_33 | DIFF_TERM=No; # LVDS1_P 86 NET patch_B_n LOC = Y7 | IOSTANDARD=LVDS_33 | DIFF_TERM=No; # LVDS1_N 82 87 83 LVDS2_P LOC = Y17 | IOSTANDARD=LVCMOS33; # Patch 2 84 LVDS2_N LOC = Y18 | IOSTANDARD=LVCMOS33; 88 # logic signal from third trigger patch 89 NET patch_C_p LOC = Y17 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # LVDS2_P 90 NET patch_C_n LOC = Y18 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # LVDS2_N 85 91 86 LVDS3_P LOC = Y16 | IOSTANDARD=LVCMOS33; # Patch 3 87 LVDS3_N LOC = W16 | IOSTANDARD=LVCMOS33; 92 # logic signal from fourth trigger patch 93 NET patch_D_p LOC = Y16 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # LVDS3_P 94 NET patch_D_n LOC = W16 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # LVDS3_N 88 95 89 TRG_P+ LOC = Y13 | IOSTANDARD=LVCMOS33; #The Trigger Primitive 90 TRG_P- LOC = W13 | IOSTANDARD=LVCMOS33; 91 92 93 96 #The Trigger Primitive: logic signal from n-out-of-4 circuit 97 NET trig_prim_p LOC = Y13 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # TRG_P+ 98 NET trig_prim_n LOC = W13 | IOSTANDARD=LVDS_33 | DIFF_TERM=No ; # TRG_P- 94 99 95 100 … … 97 102 ###################################################### 98 103 # Patch 0 99 XEN0_0 LOC = D2 | IOSTANDARD=LVCMOS33; 100 XEN0_1 LOC = B1 | IOSTANDARD=LVCMOS33; 101 XEN0_2 LOC = C2 | IOSTANDARD=LVCMOS33; 102 XEN0_3 LOC = D1 | IOSTANDARD=LVCMOS33; 103 XEN0_4 LOC = C1 | IOSTANDARD=LVCMOS33; 104 XEN0_5 LOC = D4 | IOSTANDARD=LVCMOS33; 105 XEN0_6 LOC = E1 | IOSTANDARD=LVCMOS33; 106 XEN0_7 LOC = D3 | IOSTANDARD=LVCMOS33; 107 XEN0_8 LOC = E3 | IOSTANDARD=LVCMOS33; 104 NET enables_A<0> LOC = D2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_0 105 NET enables_A<1> LOC = B1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_1 106 NET enables_A<2> LOC = C2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_2 107 NET enables_A<3> LOC = D1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_3 108 NET enables_A<4> LOC = C1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_4 109 NET enables_A<5> LOC = D4 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_5 110 NET enables_A<6> LOC = E1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_6 111 NET enables_A<7> LOC = D3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_7 112 NET enables_A<8> LOC = E3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; # XEN0_8 108 113 109 # Patch 1110 XEN1_0 LOC = F2 | IOSTANDARD=LVCMOS33; 111 XEN1_1 LOC = F4 | IOSTANDARD=LVCMOS33; 112 XEN1_2 LOC = F3 | IOSTANDARD=LVCMOS33; 113 XEN1_3 LOC = F1 | IOSTANDARD=LVCMOS33; 114 XEN1_4 LOC = G3 | IOSTANDARD=LVCMOS33; 115 XEN1_5 LOC = G4 | IOSTANDARD=LVCMOS33; 116 XEN1_6 LOC = H2 | IOSTANDARD=LVCMOS33; 117 XEN1_7 LOC = H3 | IOSTANDARD=LVCMOS33; 118 XEN1_8 LOC = J3 | IOSTANDARD=LVCMOS33; 114 ## Patch 1 115 NET enables_B<0> LOC = F2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_0 116 NET enables_B<1> LOC = F4 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_1 117 NET enables_B<2> LOC = F3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_2 118 NET enables_B<3> LOC = F1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_3 119 NET enables_B<4> LOC = G3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_4 120 NET enables_B<5> LOC = G4 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_5 121 NET enables_B<6> LOC = H2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_6 122 NET enables_B<7> LOC = H3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_7 123 NET enables_B<8> LOC = J3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN1_8 119 124 120 125 # Patch 2 121 XEN2_0 LOC = N1 | IOSTANDARD=LVCMOS33; 122 XEN2_1 LOC = R1 | IOSTANDARD=LVCMOS33; 123 XEN2_2 LOC = M3 | IOSTANDARD=LVCMOS33; 124 XEN2_3 LOC = N2 | IOSTANDARD=LVCMOS33; 125 XEN2_4 LOC = P1 | IOSTANDARD=LVCMOS33; 126 XEN2_5 LOC = N3 | IOSTANDARD=LVCMOS33; 127 XEN2_6 LOC = R2 | IOSTANDARD=LVCMOS33; 128 XEN2_7 LOC = P3 | IOSTANDARD=LVCMOS33; 129 XEN2_8 LOC = T2 | IOSTANDARD=LVCMOS33; 126 NET enables_C<0> LOC = N1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_0 127 NET enables_C<1> LOC = R1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_1 128 NET enables_C<2> LOC = M3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_2 129 NET enables_C<3> LOC = N2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_3 130 NET enables_C<4> LOC = P1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_4 131 NET enables_C<5> LOC = N3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_5 132 NET enables_C<6> LOC = R2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_6 133 NET enables_C<7> LOC = P3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_7 134 NET enables_C<8> LOC = T2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN2_8 130 135 131 136 # Patch 3 132 XEN2_0 LOC = R3 | IOSTANDARD=LVCMOS33; 133 XEN2_1 LOC = T4 | IOSTANDARD=LVCMOS33; 134 XEN2_2 LOC = T3 | IOSTANDARD=LVCMOS33; 135 XEN2_3 LOC = U1 | IOSTANDARD=LVCMOS33; 136 XEN2_4 LOC = U3 | IOSTANDARD=LVCMOS33; 137 XEN2_5 LOC = V1 | IOSTANDARD=LVCMOS33; 138 XEN2_6 LOC = V2 | IOSTANDARD=LVCMOS33; 139 XEN2_7 LOC = W1 | IOSTANDARD=LVCMOS33; 140 XEN2_8 LOC = W2 | IOSTANDARD=LVCMOS33; 137 NET enables_D<0> LOC = R3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 138 NET enables_D<1> LOC = T4 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 139 NET enables_D<2> LOC = T3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 140 NET enables_D<3> LOC = U1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 141 NET enables_D<4> LOC = U3 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 142 NET enables_D<5> LOC = V1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 143 NET enables_D<6> LOC = V2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 144 NET enables_D<7> LOC = W1 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 145 NET enables_D<8> LOC = W2 | IOSTANDARD=LVCMOS33 | SLEW = SLOW; #XEN3_0 -
FPGA/FTU/test_firmware/FTU_test1/FTU_test1.vhd
r233 r234 34 34 ext_clk : IN STD_LOGIC; -- external clock from FTU board 35 35 --reset : in STD_LOGIC; -- reset 36 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- global board address (not local) 37 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 38 39 -- rate counters LVDS inputs 39 40 -- use IBUFDS differential input buffer … … 108 109 ); 109 110 111 enables_A(0) <= enable_sig; 112 enables_A(1) <= enable_sig; 113 enables_A(2) <= enable_sig; 114 enables_A(3) <= enable_sig; 115 enables_A(4) <= enable_sig; 116 enables_A(5) <= enable_sig; 117 enables_A(6) <= enable_sig; 118 enables_A(7) <= enable_sig; 110 119 enables_A(8) <= enable_sig; 120 121 enables_B(0) <= enable_sig; 122 enables_B(1) <= enable_sig; 123 enables_B(2) <= enable_sig; 124 enables_B(3) <= enable_sig; 125 enables_B(4) <= enable_sig; 126 enables_B(5) <= enable_sig; 127 enables_B(6) <= enable_sig; 128 enables_B(7) <= enable_sig; 111 129 enables_B(8) <= enable_sig; 130 131 enables_C(0) <= enable_sig; 132 enables_C(1) <= enable_sig; 133 enables_C(2) <= enable_sig; 134 enables_C(3) <= enable_sig; 135 enables_C(4) <= enable_sig; 136 enables_C(5) <= enable_sig; 137 enables_C(6) <= enable_sig; 138 enables_C(7) <= enable_sig; 112 139 enables_C(8) <= enable_sig; 140 141 enables_D(0) <= enable_sig; 142 enables_D(1) <= enable_sig; 143 enables_D(2) <= enable_sig; 144 enables_D(3) <= enable_sig; 145 enables_D(4) <= enable_sig; 146 enables_D(5) <= enable_sig; 147 enables_D(6) <= enable_sig; 148 enables_D(7) <= enable_sig; 113 149 enables_D(8) <= enable_sig; 114 150 115 151 end Behavioral; 116 152 … … 130 166 architecture RTL of Clock_Divider is 131 167 132 constant max_count : integer := 5000000/1000000; -- for simulation133 --constant max_count : integer := 5000000/1; -- for implementation134 constant final_count : integer := 3;168 --constant max_count : integer := 5000000/1000000; -- for simulation 169 constant max_count : integer := 5000000/1; -- for implementation 170 constant final_count : integer := 10; 135 171 136 172 begin -
FPGA/FTU/test_firmware/FTU_test1/FTU_test1_tb.vhd
r233 r234 43 43 ext_clk : IN STD_LOGIC; -- external clock from FTU board 44 44 --reset : in STD_LOGIC; -- reset 45 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- global board address (not local) 45 brd_add : IN STD_LOGIC_VECTOR(5 downto 0); -- geographic board/slot address 46 brd_id : IN STD_LOGIC_VECTOR(7 downto 0); -- local solder-programmable address 46 47 47 48 -- rate counters LVDS inputs
Note:
See TracChangeset
for help on using the changeset viewer.