Difference between revisions of "FPGA Querier"

From UConn PAN
Jump to navigation Jump to search
m
 
Line 10: Line 10:
 
== Programming Details ==
 
== Programming Details ==
  
The Querier polls the [[Programming_the_SPI|SPI module]] to poll the Temperature sensor chip and then the 8 channels of the ADC. The channels are shuffled by means of a simple counter (possibly starting from 111 then 000, 001 etc.) Each "Done" signal from the [[Programming_the_SPI|SPI module]] is passed back as a "Go" signal for the next poll. The [[FPGA_Registers#Temperature Register|appropriate registers]] are pulsed simultaneously to record the values for later transmission. As mentioned above, the ADC address returned by the SPI Module along with the voltage data is checked against the requested address. Mismatch results in the error value of 0xFFF recorded in lieu of the returned value.
+
The Querier polls the [http://zeus.phys.uconn.edu/wiki/index.php/SiPM_digital_control_board#Temperature_sensor Temperature Sensor] and the 8 channels of the [http://zeus.phys.uconn.edu/wiki/index.php/SiPM_digital_control_board#The_ADC ADC], by shuffling down in channel number and polling child modules that handle the chip interfacing.
 +
 
  
  
Line 19: Line 20:
  
  
[[Programming_the_SPI|SPI module]]'s return values
+
SPI bus lines
* ''Done'': [in] ;  "Done" signal from the SPI Module
+
* ''SPI_SCLK'': [out] 5MHz clock feed-through
* ''Temp_in'': [in ] SPI module's latched 10-bit temperature output bus
+
* ''SPI_T_CE'': [out] Temp. sensor chip enable
* ''ADC_in'': [in ] SPI module's latched 12-bit ADC output bus
+
* ''SPI_A_iCS'': [out] ADC active-low chips select
* ''ADC_Ain'': [in ] SPI module's latched 3-bit ADC address output bus
+
* ''SPI_SDI'': [out] SPI (Temp sensor/ADC) input line
 
+
* ''SPI_SDO'': [in] SPI output - return values for the FPGA
 
 
Data request signals for the [[Programming_the_SPI|SPI module]]
 
* ''Go'': [out] "Go" signal
 
* ''T_iA'': [out] active-high Temp. sensor, active-low ADC selection line
 
* ''ADC_Aout'': [out] 3-bit ADC address line
 
  
  
 
Temperature and ADC value storage
 
Temperature and ADC value storage
* ''ADCregEn'': [out] write signal to ADC register
+
* ''ADCreg_En'': [out] write signal to ADC register
* ''ADCregA '': [out] 3-bit address selection for ADC register
+
* ''ADCreg_A '': [out] 3-bit address selection for ADC register
* ''TempregEn'': [out] write signal to Temperature register
+
* ''ADCred_D'': [out] 12-bit ADC value output to the ADC register
* ''Temp'': [out] Temperature value output to the Temperature register
+
* ''Tempreg_En'': [out] write signal to Temperature register
* ''ADC'': [out] ADC value output to the ADC register
+
* ''Tempreg_D'': [out] 10-bit Temperature value output to the Temperature register
  
  

Latest revision as of 19:23, 12 October 2010

See also Programming the Ethernet Controller for a survey of modules and a general discussion of FPGA design approach.

(100) Query Sensor Chips

The Querier performs a poll of the sensor chips: Temperature Sensor and the 8-channel ADC. The returned values from these combined nine polls are stored in the Temperature and ADC registers. The Querier always passes control to the Transmitter in order to relay an S (status) packet to the PC with the polled values.

Minor error-handling is built into this module. When the 3-bit ADC address returned from the SPI module after a query does not match the requested channel, a 0xFFF value is written for that voltage value.


Programming Details

The Querier polls the Temperature Sensor and the 8 channels of the ADC, by shuffling down in channel number and polling child modules that handle the chip interfacing.


Ports

  • Clk: [in] clock
  • Rst: [in] asynchronous reset


SPI bus lines

  • SPI_SCLK: [out] 5MHz clock feed-through
  • SPI_T_CE: [out] Temp. sensor chip enable
  • SPI_A_iCS: [out] ADC active-low chips select
  • SPI_SDI: [out] SPI (Temp sensor/ADC) input line
  • SPI_SDO: [in] SPI output - return values for the FPGA


Temperature and ADC value storage

  • ADCreg_En: [out] write signal to ADC register
  • ADCreg_A : [out] 3-bit address selection for ADC register
  • ADCred_D: [out] 12-bit ADC value output to the ADC register
  • Tempreg_En: [out] write signal to Temperature register
  • Tempreg_D: [out] 10-bit Temperature value output to the Temperature register


State Register Control Lines

  • state_En: [out] state register enable (write) signal
  • state_D: [out] (3-bit) state register input
  • state_Q: [in] (3-bit) state register output