Changeset 9939 for firmware/FTU/rs485
- Timestamp:
- 09/22/10 18:08:06 (14 years ago)
- Location:
- firmware/FTU/rs485
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FTU/rs485/FTU_rs485_control.vhd
r9928 r9939 3 3 -- Engineer: Q. Weitzel, P. Vogler 4 4 -- 5 -- Create Date: 09/13/2010 5 -- Create Date: 09/13/2010 6 6 -- Design Name: 7 -- Module Name: FTU_rs485_control - Behavioral 7 -- Module Name: FTU_rs485_control - Behavioral 8 8 -- Project Name: 9 9 -- Target Devices: … … 11 11 -- Description: top level entity of FTU RS485 module 12 12 -- 13 -- Dependencies: 13 -- Dependencies: 14 14 -- 15 15 -- Revision: … … 50 50 tx_d : OUT std_logic; 51 51 tx_en : OUT std_logic; 52 new_DACs : OUT std_logic; -- new DACs arrived via RS485 53 new_enables : OUT std_logic; -- new enables arrived via RS485 54 new_prescaling : OUT std_logic; -- new prescaling arrived via RS485 55 read_rates : OUT std_logic; -- FTM wants to read rates 56 read_DACs : OUT std_logic; -- FTM wants to read DACs 57 read_enables : OUT std_logic; -- FTM wants to read enable pattern 58 read_prescaling : OUT std_logic; -- FTM wants to read prescaling value 59 --rs485_error : OUT std_logic; -- to be discussed! 52 new_DACs : OUT std_logic := '0'; -- new DACs arrived via RS485 53 new_enables : OUT std_logic := '0'; -- new enables arrived via RS485 54 new_prescaling : OUT std_logic := '0'; -- new prescaling arrived via RS485 55 read_rates : OUT std_logic := '0'; -- FTM wants to read rates 56 read_DACs : OUT std_logic := '0'; -- FTM wants to read DACs 57 read_enables : OUT std_logic := '0'; -- FTM wants to read enable pattern 58 read_prescaling : OUT std_logic := '0'; -- FTM wants to read prescaling value 60 59 dac_array_rs485_out : OUT dac_array_type; 61 60 enable_array_rs485_out : OUT enable_array_type; … … 278 277 when SET_DAC_WAIT=> -- wait until FTU control says "done" and then answer to FTM 279 278 if (DACs_ready = '1') then 280 new_DACs <= '0'; 279 new_DACs <= '0'; 281 280 FTU_rs485_control_State <= SET_DAC_TRANSMIT; 282 281 else … … 288 287 if (enables_ready = '1') then 289 288 new_enables <= '0'; 290 FTU_rs485_control_State <= RECEIVE;289 FTU_rs485_control_State <= SET_ENABLE_TRANSMIT; 291 290 else 292 291 new_enables <= '1'; … … 297 296 if (prescaling_ready = '1') then 298 297 new_prescaling <= '0'; 299 FTU_rs485_control_State <= RECEIVE;298 FTU_rs485_control_State <= SET_PRESCALING_TRANSMIT; 300 299 else 301 300 new_prescaling <= '1'; … … 306 305 if (rates_ready = '1') then 307 306 read_rates <= '0'; 308 FTU_rs485_control_State <= RE CEIVE;307 FTU_rs485_control_State <= READ_RATES_TRANSMIT; 309 308 else 310 309 read_rates <= '1'; … … 315 314 if (DACs_ready = '1') then 316 315 read_DACs <= '0'; 317 FTU_rs485_control_State <= RE CEIVE;316 FTU_rs485_control_State <= READ_DAC_TRANSMIT; 318 317 else 319 318 read_DACs <= '1'; … … 324 323 if (enables_ready = '1') then 325 324 read_enables <= '0'; 326 FTU_rs485_control_State <= RE CEIVE;325 FTU_rs485_control_State <= READ_ENABLE_TRANSMIT; 327 326 else 328 327 read_enables <= '1'; … … 333 332 if (prescaling_ready = '1') then 334 333 read_prescaling <= '0'; 335 FTU_rs485_control_State <= RE CEIVE;334 FTU_rs485_control_State <= READ_PRESCALING_TRANSMIT; 336 335 else 337 336 read_prescaling <= '1'; -
firmware/FTU/rs485/FTU_rs485_interpreter.vhd
r9928 r9939 110 110 int_read_enables <= '0'; 111 111 int_read_prescaling <= '0'; 112 dac_array_rs485_out_sig <= (conv_integer(unsigned(data_block(47 downto 32))), 113 conv_integer(unsigned(data_block(63 downto 48))), 114 conv_integer(unsigned(data_block(79 downto 64))), 115 conv_integer(unsigned(data_block(95 downto 80))), 116 0,0,0, 117 conv_integer(unsigned(data_block(111 downto 96))) 112 dac_array_rs485_out_sig <= (conv_integer(unsigned(data_block(43 downto 32))), 113 conv_integer(unsigned(data_block(59 downto 48))), 114 conv_integer(unsigned(data_block(75 downto 64))), 115 conv_integer(unsigned(data_block(91 downto 80))), 116 DEFAULT_DAC(4), 117 DEFAULT_DAC(5), 118 DEFAULT_DAC(6), 119 conv_integer(unsigned(data_block(107 downto 96))) 118 120 ); 119 121 FTU_rs485_interpreter_State <= WAIT_FOR_DATA;
Note:
See TracChangeset
for help on using the changeset viewer.