FPGA Querier


 * 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