Difference between revisions of "FPGA Querier"
Senderovich (talk | contribs) m |
Senderovich (talk | contribs) m |
||
Line 5: | Line 5: | ||
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 [[FPGA_Registers#Temperature Register|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. | 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 [[FPGA_Registers#Temperature Register|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 [[Programming_the_SPI|SPI module]] after a query does not match the requested channel a 0xFFF value is written for that voltage value. | + | Minor error-handling is built into this module. When the 3-bit ADC address returned from the [[Programming_the_SPI|SPI module]] after a query does not match the requested channel, a 0xFFF value is written for that voltage value. |
Revision as of 15:43, 3 June 2008
- 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 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 SPI module is passed back as a "Go" signal for the next poll. The 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.
Ports
- Clk: [in] clock
- Rst: [in] asynchronous reset
SPI module's return values
- Done: [in] ; "Done" signal from the SPI Module
- Temp_in: [in ] SPI module's latched 10-bit temperature output bus
- ADC_in: [in ] SPI module's latched 12-bit ADC output bus
- ADC_Ain: [in ] SPI module's latched 3-bit ADC address output bus
Data request signals for the 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
- ADCregEn: [out] write signal to ADC register
- ADCregA : [out] 3-bit address selection for ADC register
- TempregEn: [out] write signal to Temperature register
- Temp: [out] Temperature value output to the Temperature register
- ADC: [out] ADC value output to the ADC 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