Changeset 10121 for firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl
- Timestamp:
- 01/27/11 08:32:16 (14 years ago)
- Location:
- firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/clock_generator_var_ps_struct.vhd
r10074 r10121 3 3 -- Created: 4 4 -- by - dneise.UNKNOWN (E5B-LABOR6) 5 -- at - 1 2:35:56 04.01.20115 -- at - 11:57:15 26.01.2011 6 6 -- 7 7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 24 24 PSCLK_OUT : OUT std_logic; 25 25 PSDONE_extraOUT : OUT std_logic; 26 PSEN_OUT : OUT std_logic;27 26 PSINCDEC_OUT : OUT std_logic; 28 27 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); … … 41 40 -- Created: 42 41 -- by - dneise.UNKNOWN (E5B-LABOR6) 43 -- at - 1 2:35:56 04.01.201142 -- at - 11:57:15 26.01.2011 44 43 -- 45 44 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 50 49 USE ieee.numeric_std.all; 51 50 LIBRARY UNISIM; 52 USE UNISIM.Vcomponents.all;51 --USE UNISIM.Vcomponents.all; 53 52 54 53 LIBRARY FACT_FAD_lib; … … 131 130 PSCLK_OUT <= PSCLK_IN; 132 131 133 -- ModuleWare code(v1.9) for instance 'U_6' of 'assignment'134 PSEN_OUT <= PSEN_IN;135 136 132 -- ModuleWare code(v1.9) for instance 'U_7' of 'assignment' 137 133 PSINCDEC_OUT <= PSINCDEC_IN; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/control_unit_struct.vhd
r10073 r10121 2 2 -- 3 3 -- Created: 4 -- by - d neise.UNKNOWN (E5B-LABOR6)5 -- at - 1 7:00:23 03.01.20114 -- by - daqct3.UNKNOWN (IHP110) 5 -- at - 12:52:19 06.01.2011 6 6 -- 7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009. 2 (Build 10)7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12) 8 8 -- 9 9 LIBRARY ieee; … … 41 41 -- 42 42 -- Created: 43 -- by - d neise.UNKNOWN (E5B-LABOR6)44 -- at - 1 7:00:23 03.01.201143 -- by - daqct3.UNKNOWN (IHP110) 44 -- at - 12:52:20 06.01.2011 45 45 -- 46 -- Generated by Mentor Graphics' HDL Designer(TM) 2009. 2 (Build 10)46 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12) 47 47 -- 48 48 LIBRARY ieee; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/data_generator.vhd
r10081 r10121 58 58 adc_otr : in std_logic_vector (3 downto 0); 59 59 drs_channel_id : out std_logic_vector (3 downto 0) := (others => '0'); 60 drs_dwrite : out std_logic := '1'; 60 -- -- 61 -- drs_dwrite : out std_logic := '1'; 62 drs_readout_ready : out std_logic := '0'; 63 drs_readout_ready_ack : in std_logic; 64 -- -- 61 65 drs_clk_en, drs_read_s_cell : out std_logic := '0'; 62 66 … … 69 73 drs_s_cell_array : in drs_s_cell_array_type; 70 74 71 drs_readout_started : out std_logic 75 drs_readout_started : out std_logic := '0' 72 76 ); 73 77 end data_generator ; … … 77 81 type state_generate_type is (INIT, CONFIG, CONFIG1, CONFIG2,CONFIG3, CONFIG4, CONFIG5, CONFIG6, CONFIG7, WRITE_HEADER, WRITE_EXTERNAL_TRIGGER, WRITE_INTERNAL_TRIGGER, WRITE_BOARD_ID, WRITE_TEMPERATURES, 78 82 WRITE_DAC1, WRITE_DAC2, WRITE_CHANNEL_ID, WRITE_START_CELL, WRITE_ROI, WRITE_ADC_DATA, WRITE_DATA_END, WRITE_DATA_END_WAIT, 79 WRITE_END_FLAG, WRITE_DATA_STOP, 83 WRITE_END_FLAG, WRITE_DATA_STOP, WRITE_DATA_STOP1, 80 84 WRITE_DATA_IDLE, WAIT_FOR_ADC, WAIT_FOR_STOP_CELL, START_DRS_READING); 81 85 … … 181 185 sig_drs_readout_started <= '1'; -- is set to '0' in state WRITE_DAC1 182 186 -- stop drs, dwrite low 183 drs_dwrite <= '0';187 -- drs_dwrite <= '0'; 184 188 -- start reading of drs stop cell 185 189 drs_read_s_cell <= '1'; … … 329 333 if (ram_write_ready_ack = '0') then 330 334 -- -- 331 drs_dwrite <= '1'; 335 -- drs_dwrite <= '1'; 336 drs_readout_ready <= '1'; 332 337 data_cntr <= 0; 333 338 addr_cntr <= 0; 334 339 channel_id <= 0; 335 state_generate <= WRITE_DATA_ IDLE;340 state_generate <= WRITE_DATA_STOP1; 336 341 -- -- 337 342 end if; 338 343 -- -- 344 when WRITE_DATA_STOP1 => 345 if (drs_readout_ready_ack = '1') then 346 drs_readout_ready <= '0'; 347 state_generate <= WRITE_DATA_IDLE; 348 end if; 339 349 when others => 340 350 null; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/data_generator.vhd.bak
r10081 r10121 58 58 adc_otr : in std_logic_vector (3 downto 0); 59 59 drs_channel_id : out std_logic_vector (3 downto 0) := (others => '0'); 60 drs_dwrite : out std_logic := '1'; 60 -- -- 61 -- drs_dwrite : out std_logic := '1'; 62 drs_readout_ready : out std_logic := '0'; 63 -- -- 61 64 drs_clk_en, drs_read_s_cell : out std_logic := '0'; 62 65 … … 69 72 drs_s_cell_array : in drs_s_cell_array_type; 70 73 71 drs_readout_started : out std_logic 74 drs_readout_started : out std_logic := '0' 72 75 ); 73 76 end data_generator ; … … 77 80 type state_generate_type is (INIT, CONFIG, CONFIG1, CONFIG2,CONFIG3, CONFIG4, CONFIG5, CONFIG6, CONFIG7, WRITE_HEADER, WRITE_EXTERNAL_TRIGGER, WRITE_INTERNAL_TRIGGER, WRITE_BOARD_ID, WRITE_TEMPERATURES, 78 81 WRITE_DAC1, WRITE_DAC2, WRITE_CHANNEL_ID, WRITE_START_CELL, WRITE_ROI, WRITE_ADC_DATA, WRITE_DATA_END, WRITE_DATA_END_WAIT, 79 WRITE_END_FLAG, WRITE_DATA_STOP, 82 WRITE_END_FLAG, WRITE_DATA_STOP, WRITE_DATA_STOP1, 80 83 WRITE_DATA_IDLE, WAIT_FOR_ADC, WAIT_FOR_STOP_CELL, START_DRS_READING); 81 84 … … 181 184 sig_drs_readout_started <= '1'; -- is set to '0' in state WRITE_DAC1 182 185 -- stop drs, dwrite low 183 drs_dwrite <= '0';186 -- drs_dwrite <= '0'; 184 187 -- start reading of drs stop cell 185 188 drs_read_s_cell <= '1'; … … 272 275 when WRITE_ADC_DATA => 273 276 if (data_cntr < roi_max (channel_id)) then 274 --data_out <= "000" & adc_otr(3) & adc_data_array(3)275 --& "000" & adc_otr(2) & adc_data_array(2)276 --& "000" & adc_otr(1) & adc_data_array(1)277 --& "000" & adc_otr(0) & adc_data_array(0);278 data_out <= "00000" & conv_std_logic_vector (data_cntr, 11)279 & "00010" & conv_std_logic_vector (data_cntr, 11)280 & "00100" & conv_std_logic_vector (data_cntr, 11)281 & "00110" & conv_std_logic_vector (data_cntr, 11) ;277 data_out <= "000" & adc_otr(3) & adc_data_array(3) 278 & "000" & adc_otr(2) & adc_data_array(2) 279 & "000" & adc_otr(1) & adc_data_array(1) 280 & "000" & adc_otr(0) & adc_data_array(0); 281 -- data_out <= "00000" & conv_std_logic_vector (data_cntr, 11) 282 -- & "00010" & conv_std_logic_vector (data_cntr, 11) 283 -- & "00100" & conv_std_logic_vector (data_cntr, 11) 284 -- & "00110" & conv_std_logic_vector (data_cntr, 11) ; 282 285 addr_cntr <= addr_cntr + 1; 283 286 state_generate <= WRITE_ADC_DATA; … … 329 332 if (ram_write_ready_ack = '0') then 330 333 -- -- 331 drs_dwrite <= '1'; 334 -- drs_dwrite <= '1'; 335 drs_readout_ready <= '1'; 332 336 data_cntr <= 0; 333 337 addr_cntr <= 0; 334 338 channel_id <= 0; 335 state_generate <= WRITE_DATA_ IDLE;339 state_generate <= WRITE_DATA_STOP1; 336 340 -- -- 337 341 end if; 338 342 -- -- 343 when WRITE_DATA_STOP1 => 344 if (drs_readout_ready_ack = '1') then 345 drs_readout_ready <= '0'; 346 state_generate <= WRITE_DATA_IDLE; 347 end if; 339 348 when others => 340 349 null; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_board.ucf
r10074 r10121 35 35 36 36 # BOARD ID - inputs 37 #NET LINE<0> LOC = Y1 | IOSTANDARD=LVCMOS33; #ok 38 #NET LINE<1> LOC = Y2 | IOSTANDARD=LVCMOS33; #ok39 #NET LINE<2> LOC = AB1 | IOSTANDARD=LVCMOS33; #ok40 #NET LINE<3> LOC = AC1 | IOSTANDARD=LVCMOS33; #ok41 #NET LINE<4> LOC = AD1 | IOSTANDARD=LVCMOS33; #ok42 #NET LINE<5> LOC = AD2 | IOSTANDARD=LVCMOS33; #ok37 NET POSITION_ID<0> LOC = Y1 | IOSTANDARD=LVCMOS33; #ok name was LINE befoer i changed it 38 NET POSITION_ID<1> LOC = Y2 | IOSTANDARD=LVCMOS33; #ok 39 NET POSITION_ID<2> LOC = AB1 | IOSTANDARD=LVCMOS33; #ok 40 NET POSITION_ID<3> LOC = AC1 | IOSTANDARD=LVCMOS33; #ok 41 NET POSITION_ID<4> LOC = AD1 | IOSTANDARD=LVCMOS33; #ok 42 NET POSITION_ID<5> LOC = AD2 | IOSTANDARD=LVCMOS33; #ok 43 43 44 44 # W5300 … … 99 99 100 100 NET SRIN LOC = E1 | IOSTANDARD=LVCMOS25; #ok -- nur fuer vollauslese noetig; auf Z legen. 101 #NET REFCLK LOC = AC11 | IOSTANDARD=LVCMOS25; #ok -- listen to REFCLK possible101 NET REFCLK LOC = AC11 | IOSTANDARD=LVCMOS25; #ok -- listen to REFCLK possible 102 102 103 103 -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_board.ucf.bak
r10074 r10121 35 35 36 36 # BOARD ID - inputs 37 #NET LINE<0> LOC = Y1 | IOSTANDARD=LVCMOS33; #ok 38 #NET LINE<1> LOC = Y2 | IOSTANDARD=LVCMOS33; #ok39 #NET LINE<2> LOC = AB1 | IOSTANDARD=LVCMOS33; #ok40 #NET LINE<3> LOC = AC1 | IOSTANDARD=LVCMOS33; #ok41 #NET LINE<4> LOC = AD1 | IOSTANDARD=LVCMOS33; #ok42 #NET LINE<5> LOC = AD2 | IOSTANDARD=LVCMOS33; #ok37 NET POSITION_ID<0> LOC = Y1 | IOSTANDARD=LVCMOS33; #ok name was LINE befoer i changed it 38 NET POSITION_ID<1> LOC = Y2 | IOSTANDARD=LVCMOS33; #ok 39 NET POSITION_ID<2> LOC = AB1 | IOSTANDARD=LVCMOS33; #ok 40 NET POSITION_ID<3> LOC = AC1 | IOSTANDARD=LVCMOS33; #ok 41 NET POSITION_ID<4> LOC = AD1 | IOSTANDARD=LVCMOS33; #ok 42 NET POSITION_ID<5> LOC = AD2 | IOSTANDARD=LVCMOS33; #ok 43 43 44 44 # W5300 … … 254 254 ####################################################### 255 255 NET AMBER_LED LOC = T4 | IOSTANDARD=LVCMOS25 | DRIVE = 2; #schematic: LED_3 D3 AMBER 256 NET GREEN_LED LOC = C23 | IOSTANDARD=LVCMOS33 | DRIVE = 1; #schematic: LED_0 D1 GREEN256 NET GREEN_LED LOC = C23 | IOSTANDARD=LVCMOS33 | DRIVE = 2; #schematic: LED_0 D1 GREEN 257 257 NET RED_LED LOC = AD20 | IOSTANDARD=LVCMOS33 | DRIVE = 2;#schematic: LED_2 D2 RED 258 258 -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_board_struct.vhd
r10081 r10121 3 3 -- Created: 4 4 -- by - dneise.UNKNOWN (E5B-LABOR6) 5 -- at - 1 7:46:34 05.01.20115 -- at - 16:46:19 26.01.2011 6 6 -- 7 7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 13 13 ENTITY FAD_Board IS 14 14 PORT( 15 A0_D : IN std_logic_vector (11 DOWNTO 0); 16 A1_D : IN std_logic_vector (11 DOWNTO 0); 17 A2_D : IN std_logic_vector (11 DOWNTO 0); 18 A3_D : IN std_logic_vector (11 DOWNTO 0); 19 A_OTR : IN std_logic_vector (3 DOWNTO 0); 20 D0_SROUT : IN std_logic; 21 D1_SROUT : IN std_logic; 22 D2_SROUT : IN std_logic; 23 D3_SROUT : IN std_logic; 24 D_PLLLCK : IN std_logic_vector (3 DOWNTO 0); 25 RS485_C_DI : IN std_logic; 26 RS485_E_DI : IN std_logic; 27 RS485_E_DO : IN std_logic; 28 TRG : IN STD_LOGIC; 29 W_INT : IN std_logic; 30 X_50M : IN STD_LOGIC; 31 A0_T : OUT std_logic_vector (7 DOWNTO 0) := (others => '0'); 32 A1_T : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 33 AMBER_LED : OUT std_logic; 34 A_CLK : OUT std_logic_vector (3 DOWNTO 0); 35 D0_SRCLK : OUT STD_LOGIC; 36 D1_SRCLK : OUT STD_LOGIC; 37 D2_SRCLK : OUT STD_LOGIC; 38 D3_SRCLK : OUT STD_LOGIC; 39 DAC_CS : OUT std_logic; 40 DENABLE : OUT std_logic := '0'; 41 DWRITE : OUT std_logic := '0'; 42 D_A : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 43 D_T : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 44 D_T2 : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 45 EE_CS : OUT std_logic; 46 GREEN_LED : OUT std_logic; 47 MOSI : OUT std_logic := '0'; 48 OE_ADC : OUT STD_LOGIC; 49 RED_LED : OUT std_logic; 50 RS485_C_DE : OUT std_logic; 51 RS485_C_DO : OUT std_logic; 52 RS485_C_RE : OUT std_logic; 53 RS485_E_DE : OUT std_logic; 54 RS485_E_RE : OUT std_logic; 55 RSRLOAD : OUT std_logic := '0'; 56 SRIN : OUT std_logic := '0'; 57 S_CLK : OUT std_logic; 58 T0_CS : OUT std_logic; 59 T1_CS : OUT std_logic; 60 T2_CS : OUT std_logic; 61 T3_CS : OUT std_logic; 62 TRG_V : OUT std_logic; 63 W_A : OUT std_logic_vector (9 DOWNTO 0); 64 W_CS : OUT std_logic := '1'; 65 W_RD : OUT std_logic := '1'; 66 W_RES : OUT std_logic := '1'; 67 W_WR : OUT std_logic := '1'; 68 MISO : INOUT std_logic; 69 W_D : INOUT std_logic_vector (15 DOWNTO 0) 15 A0_D : IN std_logic_vector (11 DOWNTO 0); 16 A1_D : IN std_logic_vector (11 DOWNTO 0); 17 A2_D : IN std_logic_vector (11 DOWNTO 0); 18 A3_D : IN std_logic_vector (11 DOWNTO 0); 19 A_OTR : IN std_logic_vector (3 DOWNTO 0); 20 D0_SROUT : IN std_logic; 21 D1_SROUT : IN std_logic; 22 D2_SROUT : IN std_logic; 23 D3_SROUT : IN std_logic; 24 D_PLLLCK : IN std_logic_vector (3 DOWNTO 0); 25 POSITION_ID : IN std_logic_vector ( 5 DOWNTO 0 ); 26 REFCLK : IN std_logic; 27 RS485_C_DI : IN std_logic; 28 RS485_E_DI : IN std_logic; 29 RS485_E_DO : IN std_logic; 30 TRG : IN STD_LOGIC; 31 W_INT : IN std_logic; 32 X_50M : IN STD_LOGIC; 33 A0_T : OUT std_logic_vector (7 DOWNTO 0) := (others => '0'); 34 A1_T : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 35 AMBER_LED : OUT std_logic; 36 A_CLK : OUT std_logic_vector (3 DOWNTO 0); 37 D0_SRCLK : OUT STD_LOGIC; 38 D1_SRCLK : OUT STD_LOGIC; 39 D2_SRCLK : OUT STD_LOGIC; 40 D3_SRCLK : OUT STD_LOGIC; 41 DAC_CS : OUT std_logic; 42 DENABLE : OUT std_logic := '0'; 43 DWRITE : OUT std_logic := '0'; 44 D_A : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 45 D_T : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 46 D_T2 : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 47 EE_CS : OUT std_logic; 48 GREEN_LED : OUT std_logic; 49 MOSI : OUT std_logic := '0'; 50 OE_ADC : OUT STD_LOGIC; 51 RED_LED : OUT std_logic; 52 RS485_C_DE : OUT std_logic; 53 RS485_C_DO : OUT std_logic; 54 RS485_C_RE : OUT std_logic; 55 RS485_E_DE : OUT std_logic; 56 RS485_E_RE : OUT std_logic; 57 RSRLOAD : OUT std_logic := '0'; 58 SRIN : OUT std_logic := '0'; 59 S_CLK : OUT std_logic; 60 T0_CS : OUT std_logic; 61 T1_CS : OUT std_logic; 62 T2_CS : OUT std_logic; 63 T3_CS : OUT std_logic; 64 TRG_V : OUT std_logic; 65 W_A : OUT std_logic_vector (9 DOWNTO 0); 66 W_CS : OUT std_logic := '1'; 67 W_RD : OUT std_logic := '1'; 68 W_RES : OUT std_logic := '1'; 69 W_WR : OUT std_logic := '1'; 70 MISO : INOUT std_logic; 71 W_D : INOUT std_logic_vector (15 DOWNTO 0) 70 72 ); 71 73 … … 79 81 -- Created: 80 82 -- by - dneise.UNKNOWN (E5B-LABOR6) 81 -- at - 1 7:46:35 05.01.201183 -- at - 16:46:20 26.01.2011 82 84 -- 83 85 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 109 111 SIGNAL PSCLK_OUT : std_logic; 110 112 SIGNAL PSDONE_extraOUT : std_logic; 111 SIGNAL PSEN_OUT : std_logic;112 113 SIGNAL PSINCDEC_OUT : std_logic; 113 114 SIGNAL PS_DIR_IN : std_logic; 114 SIGNAL PS_DO_IN : std_logic;115 115 SIGNAL SRCLK : std_logic := '0'; 116 116 SIGNAL adc_clk_en : std_logic := '0'; … … 135 135 ); 136 136 PORT ( 137 CLK : IN std_logic ; 138 SROUT_in_0 : IN std_logic ; 139 SROUT_in_1 : IN std_logic ; 140 SROUT_in_2 : IN std_logic ; 141 SROUT_in_3 : IN std_logic ; 142 adc_data_array : IN adc_data_array_type ; 143 adc_otr_array : IN std_logic_vector (3 DOWNTO 0); 144 board_id : IN std_logic_vector (3 DOWNTO 0); 145 crate_id : IN std_logic_vector (1 DOWNTO 0); 146 trigger : IN std_logic ; 147 wiz_int : IN std_logic ; 148 CLK25_OUT : OUT std_logic ; 149 CLK25_PSOUT : OUT std_logic ; 150 CLK50_OUT : OUT std_logic ; 151 CLK_25_PS : OUT std_logic ; 152 CLK_50 : OUT std_logic ; 153 DCM_locked : OUT std_logic ; 154 LOCKED_extraOUT : OUT std_logic ; 155 PSCLK_OUT : OUT std_logic ; 156 PSDONE_extraOUT : OUT std_logic ; 157 PSEN_OUT : OUT std_logic ; 158 PSINCDEC_OUT : OUT std_logic ; 159 PS_DIR_IN : OUT std_logic ; 160 PS_DO_IN : OUT std_logic ; 161 RSRLOAD : OUT std_logic := '0'; 162 SRCLK : OUT std_logic := '0'; 163 SRIN_out : OUT std_logic := '0'; 164 adc_clk_en : OUT std_logic := '0'; 165 adc_oeb : OUT std_logic := '1'; 166 amber : OUT std_logic ; 167 dac_cs : OUT std_logic ; 168 denable : OUT std_logic := '0'; -- default domino wave off 169 drs_channel_id : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 170 drs_dwrite : OUT std_logic := '1'; 171 green : OUT std_logic ; 172 led : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 173 mosi : OUT std_logic := '0'; 174 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 175 ready : OUT std_logic := '0'; 176 red : OUT std_logic ; 177 sclk : OUT std_logic ; 178 sensor_cs : OUT std_logic_vector (3 DOWNTO 0); 137 CLK : IN std_logic ; 138 SROUT_in_0 : IN std_logic ; 139 SROUT_in_1 : IN std_logic ; 140 SROUT_in_2 : IN std_logic ; 141 SROUT_in_3 : IN std_logic ; 142 adc_data_array : IN adc_data_array_type ; 143 adc_otr_array : IN std_logic_vector (3 DOWNTO 0); 144 board_id : IN std_logic_vector (3 DOWNTO 0); 145 crate_id : IN std_logic_vector (1 DOWNTO 0); 146 trigger : IN std_logic ; 147 wiz_int : IN std_logic ; 148 CLK25_OUT : OUT std_logic ; 149 CLK25_PSOUT : OUT std_logic ; 150 CLK50_OUT : OUT std_logic ; 151 CLK_25_PS : OUT std_logic ; 152 CLK_50 : OUT std_logic ; 153 DCM_locked : OUT std_logic ; 154 LOCKED_extraOUT : OUT std_logic ; 155 PSCLK_OUT : OUT std_logic ; 156 PSDONE_extraOUT : OUT std_logic ; 157 PSINCDEC_OUT : OUT std_logic ; 158 PS_DIR_IN : OUT std_logic ; 159 RSRLOAD : OUT std_logic := '0'; 160 SRCLK : OUT std_logic := '0'; 161 SRIN_out : OUT std_logic := '0'; 162 adc_clk_en : OUT std_logic := '0'; 163 adc_oeb : OUT std_logic := '1'; 164 additional_flasher_out : OUT std_logic ; 165 amber : OUT std_logic ; 166 dac_cs : OUT std_logic ; 167 denable : OUT std_logic := '0'; -- default domino wave off 168 drs_channel_id : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 169 drs_dwrite : OUT std_logic := '1'; 170 green : OUT std_logic ; 171 led : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 172 mosi : OUT std_logic := '0'; 173 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 174 ready : OUT std_logic := '0'; 175 red : OUT std_logic ; 176 sclk : OUT std_logic ; 177 sensor_cs : OUT std_logic_vector (3 DOWNTO 0); 179 178 -- status: 180 shifting : OUT std_logic := '0';181 wiz_addr : OUT std_logic_vector (9 DOWNTO 0);182 wiz_cs : OUT std_logic := '1';183 wiz_rd : OUT std_logic := '1';184 wiz_reset : OUT std_logic := '1';185 wiz_wr : OUT std_logic := '1';186 sio : INOUT std_logic ;187 wiz_data : INOUT std_logic_vector (15 DOWNTO 0)179 shifting : OUT std_logic := '0'; 180 wiz_addr : OUT std_logic_vector (9 DOWNTO 0); 181 wiz_cs : OUT std_logic := '1'; 182 wiz_rd : OUT std_logic := '1'; 183 wiz_reset : OUT std_logic := '1'; 184 wiz_wr : OUT std_logic := '1'; 185 sio : INOUT std_logic ; 186 wiz_data : INOUT std_logic_vector (15 DOWNTO 0) 188 187 ); 189 188 END COMPONENT; … … 232 231 -- HDL Embedded Text Block 6 MISC 233 232 -- MISC 6 234 TRG_V <= '0';233 235 234 RS485_C_RE <= '0'; 236 235 RS485_C_DE <= '0'; 237 236 RS485_C_DO <= RS485_C_DI; 238 237 239 RS485_E_RE <= '0'; 240 RS485_E_DE <= '0'; 241 --RS485_E_DO <= RS485_E_DI; 238 242 239 243 240 -- DENABLE <= '0'; -- domino wave stopped … … 246 243 247 244 EE_CS <= '1'; 248 249 -- HDL Embedded Text Block 7 eb1250 D_T2 <= D_PLLLCK;251 245 252 246 -- HDL Embedded Text Block 8 eb2 … … 256 250 -- HDL Embedded Text Block 9 eb3 257 251 -- eb3 9 258 A0_T(0) <= ready;259 A0_T(1) <= shifting;260 A0_T(2) <= CLK25_PSOUT;261 A0_T(3) <= PS_DIR_IN;262 A0_T(4) <= PS_DO_IN;263 A0_T(5) <= PSINCDEC_OUT;264 A0_T(6) <= PSEN_OUT;265 A0_T(7) <= DCM_locked;252 --A0_T(0) <= ready; 253 --A0_T(1) <= shifting; 254 --A0_T(2) <= CLK25_PSOUT; 255 --A0_T(3) <= PS_DIR_IN; 256 --A0_T(4) <= PS_DO_IN; 257 --A0_T(5) <= PSINCDEC_OUT; 258 259 266 260 267 261 A1_T(0) <= SRIN_internal; … … 274 268 A1_T(6) <= drs_channel_id(2); 275 269 A1_T(7) <= drs_channel_id(3); 270 271 A0_T(5 downto 0) <= POSITION_ID; 272 A0_T(6) <= REFCLK; 273 A0_T(7) <= RS485_E_DI; 274 RS485_E_RE <= '0'; 275 RS485_E_DE <= '0'; 276 277 D_T2 <= D_PLLLCK; 276 278 277 279 … … 288 290 ) 289 291 PORT MAP ( 290 CLK => X_50M, 291 SROUT_in_0 => D0_SROUT, 292 SROUT_in_1 => D1_SROUT, 293 SROUT_in_2 => D2_SROUT, 294 SROUT_in_3 => D3_SROUT, 295 adc_data_array => adc_data_array, 296 adc_otr_array => A_OTR, 297 board_id => board_id, 298 crate_id => crate_id, 299 trigger => TRG, 300 wiz_int => W_INT, 301 CLK25_OUT => CLK25_OUT, 302 CLK25_PSOUT => CLK25_PSOUT, 303 CLK50_OUT => CLK50_OUT, 304 CLK_25_PS => CLK_25_PS1, 305 CLK_50 => CLK_50, 306 DCM_locked => DCM_locked, 307 LOCKED_extraOUT => LOCKED_extraOUT, 308 PSCLK_OUT => PSCLK_OUT, 309 PSDONE_extraOUT => PSDONE_extraOUT, 310 PSEN_OUT => PSEN_OUT, 311 PSINCDEC_OUT => PSINCDEC_OUT, 312 PS_DIR_IN => PS_DIR_IN, 313 PS_DO_IN => PS_DO_IN, 314 RSRLOAD => RSRLOAD, 315 SRCLK => SRCLK, 316 SRIN_out => SRIN_internal, 317 adc_clk_en => adc_clk_en, 318 adc_oeb => OE_ADC, 319 amber => AMBER_LED, 320 dac_cs => dummy, 321 denable => DENABLE, 322 drs_channel_id => drs_channel_id, 323 drs_dwrite => DWRITE, 324 green => RED_LED, 325 led => D_T, 326 mosi => MOSI, 327 offset => OPEN, 328 ready => ready, 329 red => GREEN_LED, 330 sclk => S_CLK, 331 sensor_cs => sensor_cs, 332 shifting => shifting, 333 wiz_addr => W_A, 334 wiz_cs => W_CS, 335 wiz_rd => W_RD, 336 wiz_reset => W_RES, 337 wiz_wr => W_WR, 338 sio => MISO, 339 wiz_data => W_D 292 CLK => X_50M, 293 SROUT_in_0 => D0_SROUT, 294 SROUT_in_1 => D1_SROUT, 295 SROUT_in_2 => D2_SROUT, 296 SROUT_in_3 => D3_SROUT, 297 adc_data_array => adc_data_array, 298 adc_otr_array => A_OTR, 299 board_id => board_id, 300 crate_id => crate_id, 301 trigger => TRG, 302 wiz_int => W_INT, 303 CLK25_OUT => CLK25_OUT, 304 CLK25_PSOUT => CLK25_PSOUT, 305 CLK50_OUT => CLK50_OUT, 306 CLK_25_PS => CLK_25_PS1, 307 CLK_50 => CLK_50, 308 DCM_locked => DCM_locked, 309 LOCKED_extraOUT => LOCKED_extraOUT, 310 PSCLK_OUT => PSCLK_OUT, 311 PSDONE_extraOUT => PSDONE_extraOUT, 312 PSINCDEC_OUT => PSINCDEC_OUT, 313 PS_DIR_IN => PS_DIR_IN, 314 RSRLOAD => RSRLOAD, 315 SRCLK => SRCLK, 316 SRIN_out => SRIN_internal, 317 adc_clk_en => adc_clk_en, 318 adc_oeb => OE_ADC, 319 additional_flasher_out => TRG_V, 320 amber => AMBER_LED, 321 dac_cs => dummy, 322 denable => DENABLE, 323 drs_channel_id => drs_channel_id, 324 drs_dwrite => DWRITE, 325 green => RED_LED, 326 led => D_T, 327 mosi => MOSI, 328 offset => OPEN, 329 ready => ready, 330 red => GREEN_LED, 331 sclk => S_CLK, 332 sensor_cs => sensor_cs, 333 shifting => shifting, 334 wiz_addr => W_A, 335 wiz_cs => W_CS, 336 wiz_rd => W_RD, 337 wiz_reset => W_RES, 338 wiz_wr => W_WR, 339 sio => MISO, 340 wiz_data => W_D 340 341 ); 341 342 -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_definitions.vhd
r10081 r10121 23 23 24 24 -- @ ETH zurich 25 -- 26 -- 27 -- 25 -- constant NETMASK : ip_type := (255, 255, 248, 0); 26 -- constant IP_ADDRESS : ip_type := (192, 33, 99, 225); 27 -- constant GATEWAY : ip_type := (192, 33, 96, 1); 28 28 29 29 -- @ TU Dortmund … … 138 138 constant CMD_SRCLK_OFF : std_logic_vector := X"16"; 139 139 140 constant CMD_TRIGGERS_ON : std_logic_vector := X"18"; 141 constant CMD_TRIGGERS_OFF : std_logic_vector := X"19"; 142 140 143 constant CMD_PS_RESET : std_logic_vector := X"17"; 144 145 constant CMD_SET_TRIGGER_MULT : std_logic_vector := X"21"; 146 141 147 -- DRS Registers 142 148 constant DRS_CONFIG_REG : std_logic_vector := "1100"; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_definitions.vhd.bak
r10081 r10121 23 23 24 24 -- @ ETH zurich 25 -- 26 -- 27 -- 25 -- constant NETMASK : ip_type := (255, 255, 248, 0); 26 -- constant IP_ADDRESS : ip_type := (192, 33, 99, 225); 27 -- constant GATEWAY : ip_type := (192, 33, 96, 1); 28 28 29 29 -- @ TU Dortmund … … 138 138 constant CMD_SRCLK_OFF : std_logic_vector := X"16"; 139 139 140 constant CMD_TRIGGERS_ON : std_logic_vector := X"18"; 141 constant CMD_TRIGGERS_OFF : std_logic_vector := X"19"; 142 140 143 constant CMD_PS_RESET : std_logic_vector := X"17"; 141 144 -- DRS Registers 145 constant DRS_CONFIG_REG : std_logic_vector := "1100"; 142 146 constant DRS_WRITE_SHIFT_REG : std_logic_vector := "1101"; 143 147 constant DRS_WRITE_CONFIG_REG : std_logic_vector := "1110"; 148 constant DRS_DISABLE_ALL_OUTS : std_logic_vector := "1111"; 144 149 145 150 -- Declare functions and procedure -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/fad_main_struct.vhd
r10081 r10121 3 3 -- Created: 4 4 -- by - dneise.UNKNOWN (E5B-LABOR6) 5 -- at - 1 7:46:33 05.01.20115 -- at - 16:46:18 26.01.2011 6 6 -- 7 7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 18 18 ); 19 19 PORT( 20 CLK : IN std_logic; 21 SROUT_in_0 : IN std_logic; 22 SROUT_in_1 : IN std_logic; 23 SROUT_in_2 : IN std_logic; 24 SROUT_in_3 : IN std_logic; 25 adc_data_array : IN adc_data_array_type; 26 adc_otr_array : IN std_logic_vector (3 DOWNTO 0); 27 board_id : IN std_logic_vector (3 DOWNTO 0); 28 crate_id : IN std_logic_vector (1 DOWNTO 0); 29 trigger : IN std_logic; 30 wiz_int : IN std_logic; 31 CLK25_OUT : OUT std_logic; 32 CLK25_PSOUT : OUT std_logic; 33 CLK50_OUT : OUT std_logic; 34 CLK_25_PS : OUT std_logic; 35 CLK_50 : OUT std_logic; 36 DCM_locked : OUT std_logic; 37 LOCKED_extraOUT : OUT std_logic; 38 PSCLK_OUT : OUT std_logic; 39 PSDONE_extraOUT : OUT std_logic; 40 PSEN_OUT : OUT std_logic; 41 PSINCDEC_OUT : OUT std_logic; 42 PS_DIR_IN : OUT std_logic; 43 PS_DO_IN : OUT std_logic; 44 RSRLOAD : OUT std_logic := '0'; 45 SRCLK : OUT std_logic := '0'; 46 SRIN_out : OUT std_logic := '0'; 47 adc_clk_en : OUT std_logic := '0'; 48 adc_oeb : OUT std_logic := '1'; 49 amber : OUT std_logic; 50 dac_cs : OUT std_logic; 51 denable : OUT std_logic := '0'; -- default domino wave off 52 drs_channel_id : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 53 drs_dwrite : OUT std_logic := '1'; 54 green : OUT std_logic; 55 led : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 56 mosi : OUT std_logic := '0'; 57 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 58 ready : OUT std_logic := '0'; 59 red : OUT std_logic; 60 sclk : OUT std_logic; 61 sensor_cs : OUT std_logic_vector (3 DOWNTO 0); 20 CLK : IN std_logic; 21 SROUT_in_0 : IN std_logic; 22 SROUT_in_1 : IN std_logic; 23 SROUT_in_2 : IN std_logic; 24 SROUT_in_3 : IN std_logic; 25 adc_data_array : IN adc_data_array_type; 26 adc_otr_array : IN std_logic_vector (3 DOWNTO 0); 27 board_id : IN std_logic_vector (3 DOWNTO 0); 28 crate_id : IN std_logic_vector (1 DOWNTO 0); 29 trigger : IN std_logic; 30 wiz_int : IN std_logic; 31 CLK25_OUT : OUT std_logic; 32 CLK25_PSOUT : OUT std_logic; 33 CLK50_OUT : OUT std_logic; 34 CLK_25_PS : OUT std_logic; 35 CLK_50 : OUT std_logic; 36 DCM_locked : OUT std_logic; 37 LOCKED_extraOUT : OUT std_logic; 38 PSCLK_OUT : OUT std_logic; 39 PSDONE_extraOUT : OUT std_logic; 40 PSINCDEC_OUT : OUT std_logic; 41 PS_DIR_IN : OUT std_logic; 42 RSRLOAD : OUT std_logic := '0'; 43 SRCLK : OUT std_logic := '0'; 44 SRIN_out : OUT std_logic := '0'; 45 adc_clk_en : OUT std_logic := '0'; 46 adc_oeb : OUT std_logic := '1'; 47 additional_flasher_out : OUT std_logic; 48 amber : OUT std_logic; 49 dac_cs : OUT std_logic; 50 denable : OUT std_logic := '0'; -- default domino wave off 51 drs_channel_id : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 52 drs_dwrite : OUT std_logic := '1'; 53 green : OUT std_logic; 54 led : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 55 mosi : OUT std_logic := '0'; 56 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); 57 ready : OUT std_logic := '0'; 58 red : OUT std_logic; 59 sclk : OUT std_logic; 60 sensor_cs : OUT std_logic_vector (3 DOWNTO 0); 62 61 -- status: 63 shifting : OUT std_logic := '0';64 wiz_addr : OUT std_logic_vector (9 DOWNTO 0);65 wiz_cs : OUT std_logic := '1';66 wiz_rd : OUT std_logic := '1';67 wiz_reset : OUT std_logic := '1';68 wiz_wr : OUT std_logic := '1';69 sio : INOUT std_logic;70 wiz_data : INOUT std_logic_vector (15 DOWNTO 0)62 shifting : OUT std_logic := '0'; 63 wiz_addr : OUT std_logic_vector (9 DOWNTO 0); 64 wiz_cs : OUT std_logic := '1'; 65 wiz_rd : OUT std_logic := '1'; 66 wiz_reset : OUT std_logic := '1'; 67 wiz_wr : OUT std_logic := '1'; 68 sio : INOUT std_logic; 69 wiz_data : INOUT std_logic_vector (15 DOWNTO 0) 71 70 ); 72 71 … … 80 79 -- Created: 81 80 -- by - dneise.UNKNOWN (E5B-LABOR6) 82 -- at - 1 7:46:34 05.01.201181 -- at - 16:46:19 26.01.2011 83 82 -- 84 83 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10) … … 93 92 94 93 library UNISIM; 95 use UNISIM.VComponents.all;94 --use UNISIM.VComponents.all; 96 95 USE IEEE.NUMERIC_STD.all; 97 96 USE IEEE.std_logic_signed.all; … … 109 108 SIGNAL adc_otr : std_logic_vector(3 DOWNTO 0); 110 109 SIGNAL addr_out : std_logic_vector(RAMADDRWIDTH64b-1 DOWNTO 0); 110 SIGNAL c_trigger_enable : std_logic := '0'; 111 SIGNAL c_trigger_mult : std_logic_vector(7 DOWNTO 0) := (OTHERS => '1'); --subject to changes 111 112 SIGNAL config_addr : std_logic_vector(7 DOWNTO 0); 112 113 SIGNAL config_busy : std_logic; … … 131 132 SIGNAL dac_array : dac_array_type; 132 133 SIGNAL data_out : std_logic_vector(63 DOWNTO 0); 134 SIGNAL dout : std_logic; 135 SIGNAL dout1 : std_logic; 133 136 SIGNAL drs_address : std_logic_vector(3 DOWNTO 0) := (others => '0'); 134 137 SIGNAL drs_address_mode : std_logic; … … 137 140 SIGNAL drs_read_s_cell : std_logic := '0'; 138 141 SIGNAL drs_read_s_cell_ready : std_logic; 142 -- -- 143 -- drs_dwrite : out std_logic := '1'; 144 SIGNAL drs_readout_ready : std_logic := '0'; 145 SIGNAL drs_readout_ready_ack : std_logic; 139 146 SIGNAL drs_readout_started : std_logic; 140 147 SIGNAL drs_s_cell_array : drs_s_cell_array_type; … … 157 164 SIGNAL roi_max : roi_max_type; 158 165 SIGNAL s_trigger : std_logic; 166 SIGNAL s_trigger_0 : std_logic; 159 167 SIGNAL sclk1 : std_logic; 160 168 SIGNAL sclk_enable : std_logic; … … 167 175 SIGNAL srin_write_ready : std_logic := '0'; 168 176 SIGNAL start_srin_write_8b : std_logic; 177 SIGNAL trigger1 : std_logic; 178 SIGNAL trigger_enable : std_logic; 169 179 SIGNAL trigger_id : std_logic_vector(47 DOWNTO 0); 170 180 SIGNAL trigger_out : std_logic; … … 207 217 PSCLK_OUT : OUT std_logic ; 208 218 PSDONE_extraOUT : OUT std_logic ; 209 PSEN_OUT : OUT std_logic ;210 219 PSINCDEC_OUT : OUT std_logic ; 211 220 offset : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '0'); … … 213 222 -- status: 214 223 shifting : OUT std_logic := '0' 224 ); 225 END COMPONENT; 226 COMPONENT continous_pulser 227 GENERIC ( 228 MINIMAL_TRIGGER_WAIT_TIME : integer := 250000 229 ); 230 PORT ( 231 CLK : IN std_logic; 232 enable : IN std_logic; 233 multiplier : IN std_logic_vector (7 DOWNTO 0); 234 trigger : OUT std_logic 215 235 ); 216 236 END COMPONENT; … … 291 311 adc_otr : IN std_logic_vector (3 DOWNTO 0); 292 312 drs_channel_id : OUT std_logic_vector (3 DOWNTO 0) := (others => '0'); 293 drs_dwrite : OUT std_logic := '1'; 313 -- -- 314 -- drs_dwrite : out std_logic := '1'; 315 drs_readout_ready : OUT std_logic := '0'; 316 drs_readout_ready_ack : IN std_logic ; 317 -- -- 294 318 drs_clk_en : OUT std_logic := '0'; 319 -- -- 295 320 drs_read_s_cell : OUT std_logic := '0'; 296 321 drs_srin_write_8b : OUT std_logic := '0'; … … 300 325 drs_read_s_cell_ready : IN std_logic ; 301 326 drs_s_cell_array : IN drs_s_cell_array_type ; 302 drs_readout_started : OUT std_logic 327 drs_readout_started : OUT std_logic := '0' 303 328 ); 304 329 END COMPONENT; … … 325 350 COMPONENT led_controller 326 351 GENERIC ( 327 HEARTBEAT_PWM_DIVIDER : integer := 500; -- 1kHz @ 50 MHz 328 MAX_DELAY : integer := 100; 329 WAITING_DIVIDER : integer := 500000000 -- 1Hz @ 50 MHz 330 ); 331 PORT ( 332 CLK : IN std_logic; 333 socks_connected : IN std_logic; 334 socks_waiting : IN std_logic; 335 trigger : IN std_logic; 336 amber : OUT std_logic; 337 green : OUT std_logic; 338 red : OUT std_logic 352 HEARTBEAT_PWM_DIVIDER : integer := 500; 353 MAX_DELAY : integer := 100; --not used anymore at all :-( 354 WAITING_DIVIDER : integer := 500000000 355 ); 356 PORT ( 357 CLK : IN std_logic; 358 socks_connected : IN std_logic; 359 socks_waiting : IN std_logic; 360 trigger : IN std_logic; 361 additional_flasher_out : OUT std_logic; 362 amber : OUT std_logic; 363 green : OUT std_logic; 364 red : OUT std_logic 339 365 ); 340 366 END COMPONENT; … … 389 415 trigger : IN std_logic ; 390 416 clk : IN std_logic 417 ); 418 END COMPONENT; 419 COMPONENT trigger_manager 420 PORT ( 421 clk : IN std_logic; 422 drs_readout_ready : IN std_logic; 423 trigger_in : IN std_logic; 424 drs_readout_ready_ack : OUT std_logic := '0'; 425 drs_write : OUT std_logic := '1'; 426 trigger_out : OUT std_logic := '0' 391 427 ); 392 428 END COMPONENT; … … 415 451 write_end_flag : IN std_logic ; 416 452 fifo_channels : IN std_logic_vector (3 DOWNTO 0); 453 -- softtrigger: 417 454 s_trigger : OUT std_logic := '0'; 455 c_trigger_enable : OUT std_logic := '0'; 456 c_trigger_mult : OUT std_logic_vector (7 DOWNTO 0) := (OTHERS => '1'); --subject TO changes 457 -- 418 458 new_config : OUT std_logic := '0'; 419 459 config_started : IN std_logic ; … … 428 468 -- -- 429 469 config_busy : IN std_logic ; 430 denable : OUT std_logic := '0'; -- default domino wave off 431 dwrite_enable : OUT std_logic := '0'; -- default DWRITE low. 432 sclk_enable : OUT std_logic := '1'; -- default DWRITE HIGH. 433 ps_direction : OUT std_logic := '1'; -- default phase shift upwards 434 ps_do_phase_shift : OUT std_logic := '0'; --pulse this TO phase shift once 435 ps_reset : OUT std_logic := '0'; -- pulse this TO reset the variable phase shift 436 srclk_enable : OUT std_logic := '1'; -- default SRCLK on. 470 denable : OUT std_logic := '0'; -- default domino wave off 471 dwrite_enable : OUT std_logic := '0'; -- default DWRITE low. 472 sclk_enable : OUT std_logic := '1'; -- default DWRITE HIGH. 473 ps_direction : OUT std_logic := '1'; -- default phase shift upwards 474 ps_do_phase_shift : OUT std_logic := '0'; --pulse this TO phase shift once 475 ps_reset : OUT std_logic := '0'; -- pulse this TO reset the variable phase shift 476 srclk_enable : OUT std_logic := '1'; -- default SRCLK on. 477 trigger_enable : OUT std_logic := '0'; -- default triggers are NOT accepted 437 478 socks_waiting : OUT std_logic ; 438 479 socks_connected : OUT std_logic … … 444 485 FOR ALL : adc_buffer USE ENTITY FACT_FAD_lib.adc_buffer; 445 486 FOR ALL : clock_generator_var_ps USE ENTITY FACT_FAD_lib.clock_generator_var_ps; 487 FOR ALL : continous_pulser USE ENTITY FACT_FAD_lib.continous_pulser; 446 488 FOR ALL : control_unit USE ENTITY FACT_FAD_lib.control_unit; 447 489 FOR ALL : dataRAM_64b_16b_width14_5 USE ENTITY FACT_FAD_lib.dataRAM_64b_16b_width14_5; … … 452 494 FOR ALL : spi_interface USE ENTITY FACT_FAD_lib.spi_interface; 453 495 FOR ALL : trigger_counter USE ENTITY FACT_FAD_lib.trigger_counter; 496 FOR ALL : trigger_manager USE ENTITY FACT_FAD_lib.trigger_manager; 454 497 FOR ALL : w5300_modul USE ENTITY FACT_FAD_lib.w5300_modul; 455 498 -- pragma synthesis_on … … 467 510 sclk <= sclk_enable AND sclk1; 468 511 469 -- ModuleWare code(v1.9) for instance 'U_ 3' of 'assignment'470 PS_DO_IN <= ps_do_phase_shift;512 -- ModuleWare code(v1.9) for instance 'U_11' of 'and' 513 dout1 <= dout AND trigger_enable; 471 514 472 515 -- ModuleWare code(v1.9) for instance 'U_5' of 'assignment' … … 494 537 495 538 -- ModuleWare code(v1.9) for instance 'U_9' of 'or' 496 trigger_out <= s_trigger OR trigger; 539 dout <= s_trigger OR trigger; 540 541 -- ModuleWare code(v1.9) for instance 'U_13' of 'or' 542 s_trigger <= s_trigger_0 OR trigger1; 497 543 498 544 -- Instance port mappings. … … 518 564 PSCLK_OUT => PSCLK_OUT, 519 565 PSDONE_extraOUT => PSDONE_extraOUT, 520 PSEN_OUT => PSEN_OUT,521 566 PSINCDEC_OUT => PSINCDEC_OUT, 522 567 offset => offset, 523 568 ready => ready, 524 569 shifting => shifting 570 ); 571 U_3 : continous_pulser 572 GENERIC MAP ( 573 MINIMAL_TRIGGER_WAIT_TIME => 250000 574 ) 575 PORT MAP ( 576 CLK => CLK_25, 577 enable => c_trigger_enable, 578 multiplier => c_trigger_mult, 579 trigger => trigger1 525 580 ); 526 581 I_main_control_unit : control_unit … … 590 645 adc_otr => adc_otr, 591 646 drs_channel_id => drs_channel_internal, 592 drs_dwrite => dwrite, 647 drs_readout_ready => drs_readout_ready, 648 drs_readout_ready_ack => drs_readout_ready_ack, 593 649 drs_clk_en => drs_clk_en, 594 650 drs_read_s_cell => drs_read_s_cell, … … 627 683 ) 628 684 PORT MAP ( 629 CLK => CLK_50_internal, 630 green => green, 631 amber => amber, 632 red => red, 633 trigger => drs_readout_started, 634 socks_waiting => socks_waiting, 635 socks_connected => socks_connected 685 CLK => CLK_50_internal, 686 green => green, 687 amber => amber, 688 red => red, 689 additional_flasher_out => additional_flasher_out, 690 trigger => drs_readout_started, 691 socks_waiting => socks_waiting, 692 socks_connected => socks_connected 636 693 ); 637 694 I_main_memory_manager : memory_manager … … 682 739 clk => CLK_25_PS_internal 683 740 ); 741 U_12 : trigger_manager 742 PORT MAP ( 743 clk => CLK_25, 744 trigger_in => dout1, 745 trigger_out => trigger_out, 746 drs_write => dwrite, 747 drs_readout_ready => drs_readout_ready, 748 drs_readout_ready_ack => drs_readout_ready_ack 749 ); 684 750 I_main_ethernet : w5300_modul 685 751 GENERIC MAP ( … … 706 772 write_end_flag => wiz_write_end, 707 773 fifo_channels => wiz_number_of_channels, 708 s_trigger => s_trigger, 774 s_trigger => s_trigger_0, 775 c_trigger_enable => c_trigger_enable, 776 c_trigger_mult => c_trigger_mult, 709 777 new_config => new_config, 710 778 config_started => config_started, … … 723 791 ps_reset => ps_reset, 724 792 srclk_enable => srclk_enable, 793 trigger_enable => trigger_enable, 725 794 socks_waiting => socks_waiting, 726 795 socks_connected => socks_connected -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/led_controller_bahavior.vhd
r10075 r10121 21 21 ENTITY led_controller IS 22 22 GENERIC( 23 HEARTBEAT_PWM_DIVIDER : integer := 500; -- 1kHz @ 50 MHz24 MAX_DELAY : integer := 100; 25 WAITING_DIVIDER : integer := 500000000 -- 1Hz @ 50 MHz23 HEARTBEAT_PWM_DIVIDER : integer := 500; 24 MAX_DELAY : integer := 100; --not used anymore at all :-( 25 WAITING_DIVIDER : integer := 500000000 26 26 ); 27 27 PORT( … … 32 32 amber : OUT std_logic; 33 33 red : OUT std_logic; 34 additional_flasher_out : OUT std_logic; 34 35 35 36 … … 61 62 amber <= not amber_loc; 62 63 red <= not red_loc; 64 additional_flasher_out <= flasher; 63 65 64 66 -- MAIN FSM: go to next state if rising edge -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/spi_interface_struct.vhd
r10073 r10121 2 2 -- 3 3 -- Created: 4 -- by - d neise.UNKNOWN (E5B-LABOR6)5 -- at - 1 4:00:24 01.10.20104 -- by - daqct3.UNKNOWN (IHP110) 5 -- at - 12:52:20 06.01.2011 6 6 -- 7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009. 2 (Build 10)7 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12) 8 8 -- 9 9 LIBRARY ieee; … … 37 37 -- 38 38 -- Created: 39 -- by - d neise.UNKNOWN (E5B-LABOR6)40 -- at - 1 4:00:25 01.10.201039 -- by - daqct3.UNKNOWN (IHP110) 40 -- at - 12:52:20 06.01.2011 41 41 -- 42 -- Generated by Mentor Graphics' HDL Designer(TM) 2009. 2 (Build 10)42 -- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12) 43 43 -- 44 44 LIBRARY ieee; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/w5300_modul.vhd
r10078 r10121 53 53 write_header_flag, write_end_flag : IN std_logic; 54 54 fifo_channels : IN std_logic_vector (3 downto 0); 55 -- softtrigger: 55 56 s_trigger : OUT std_logic := '0'; 57 c_trigger_enable: out std_logic := '0'; 58 c_trigger_mult: out std_logic_vector (7 DOWNTO 0) := (OTHERS => '1'); --subject to changes 59 -- 56 60 new_config : OUT std_logic := '0'; 57 61 config_started : in std_logic; … … 75 79 76 80 srclk_enable : out std_logic := '1'; -- default SRCLK on. 81 82 trigger_enable : out std_logic := '0'; -- default triggers are NOT accepted 77 83 78 84 socks_waiting : out std_logic; … … 593 599 state_read_data <= RD_5; 594 600 when CMD_TRIGGER_C => 595 trigger_stop <= '0'; 596 s_trigger <= '1'; 601 c_trigger_enable <= '1'; 602 --trigger_stop <= '0'; 603 --s_trigger <= '1'; 597 604 state_read_data <= RD_5; 598 605 when CMD_TRIGGER_S => 599 trigger_stop <= '1'; 600 state_read_data <= RD_5; 606 c_trigger_enable <= '0'; 607 --trigger_stop <= '1'; 608 state_read_data <= RD_5; 609 when CMD_SET_TRIGGER_MULT => 610 c_trigger_mult <= data_read (7 downto 0); 611 state_read_data <= RD_5; 612 601 613 -- phase shift commands here: 602 614 when CMD_PS_DO => … … 609 621 ps_reset <= '1'; 610 622 state_read_data <= RD_5; 623 611 624 when CMD_SRCLK_ON => 612 625 srclk_enable <= '1'; … … 615 628 srclk_enable <= '0'; 616 629 state_read_data <= RD_5; 630 631 when CMD_TRIGGERS_ON => 632 trigger_enable <= '1'; 633 state_read_data <= RD_5; 634 when CMD_TRIGGERS_OFF => 635 trigger_enable <= '0'; 636 state_read_data <= RD_5; 637 638 617 639 when CMD_PS_DIRDEC => 618 640 ps_direction <= '0'; -
firmware/FAD/FACT_FAD_20MHz_VAR_PS/FACT_FAD_lib/hdl/w5300_modul.vhd.bak
r10078 r10121 53 53 write_header_flag, write_end_flag : IN std_logic; 54 54 fifo_channels : IN std_logic_vector (3 downto 0); 55 -- softtrigger: 55 56 s_trigger : OUT std_logic := '0'; 57 c_trigger_enable: out std_logic := '0'; 58 c_trigger_mult: out std_logic_vector (7 DOWNTO 0) := (OTHERS => '1'); --subject to changes 59 -- 56 60 new_config : OUT std_logic := '0'; 57 61 config_started : in std_logic; … … 75 79 76 80 srclk_enable : out std_logic := '1'; -- default SRCLK on. 81 82 trigger_enable : out std_logic := '0'; -- default triggers are NOT accepted 77 83 78 84 socks_waiting : out std_logic; … … 243 249 -- reset W5300 244 250 when RESET => 251 socket_send_mode <= '0'; 245 252 busy <= '1'; 246 253 zaehler <= zaehler + 1; … … 561 568 case data_read (15 downto 8) is 562 569 563 when CMD_START => -- all data will be send via socket 0570 when CMD_START => -- all data will be send via socket 1..7 564 571 socket_send_mode <= '1'; 565 572 state_read_data <= RD_5; 566 when CMD_STOP => -- all data will be send via socket 1..7573 when CMD_STOP => -- all data will be send via socket 0 567 574 socket_send_mode <= '0'; 568 575 state_read_data <= RD_5; … … 592 599 state_read_data <= RD_5; 593 600 when CMD_TRIGGER_C => 594 trigger_stop <= '0'; 595 s_trigger <= '1'; 601 c_trigger_enable <= '1'; 602 --trigger_stop <= '0'; 603 --s_trigger <= '1'; 596 604 state_read_data <= RD_5; 597 605 when CMD_TRIGGER_S => 598 trigger_stop <= '1'; 606 c_trigger_enable <= '0'; 607 --trigger_stop <= '1'; 599 608 state_read_data <= RD_5; 600 609 -- phase shift commands here: … … 608 617 ps_reset <= '1'; 609 618 state_read_data <= RD_5; 619 610 620 when CMD_SRCLK_ON => 611 621 srclk_enable <= '1'; … … 614 624 srclk_enable <= '0'; 615 625 state_read_data <= RD_5; 626 627 when CMD_TRIGGERS_ON => 628 trigger_enable <= '1'; 629 state_read_data <= RD_5; 630 when CMD_TRIGGERS_OFF => 631 trigger_enable <= '0'; 632 state_read_data <= RD_5; 633 634 616 635 when CMD_PS_DIRDEC => 617 636 ps_direction <= '0';
Note:
See TracChangeset
for help on using the changeset viewer.