Changes

Jump to navigation Jump to search
9 bytes removed ,  04:44, 5 November 2009
m
no edit summary
Line 40: Line 40:  
==== R'-packet - soft reset ====
 
==== R'-packet - soft reset ====
   −
The packet type byte (2nd in packet payload) will be a 0xD2, '''1'''101 0010 - essentially an ASCII R with the MSB flipped to '1'. This packet orders a more customized [[FPGA_Reset|"soft" reset]]. After the mandatory Location and Packet Type bytes, this packet carries the 6-byte PC MAC address (to allow the FPGA to record the address of its conversation partner) as well as a reset mask for the on-board chips. Currently the two least significant bits of this byte order reset of the ADC (bit 1) and DAC (bit 0). Another [[Ethernet_packets#"S" packet: status report|S-packet]] is returned after this stage. As with the S-packet at the end of the the hard reset stage, this packet is meant for notification. An explicit query request ([[Ethernet_packets#The query cycle - "Q" packet|Q-packet]]) is recommended for reliable voltage values on board. (Certainly the validity of the highest ADC channel 7 is not guaranteed after an ADC reset request in the R'-packet)
+
The packet type byte (2nd in packet payload) will be a 0xD2, '''1'''101 0010 - essentially an ASCII R with the MSB flipped to '1'. This packet orders a more customized [[FPGA_Reset|"soft" reset]]. After the mandatory Location and Packet Type bytes, this packet carries the 6-byte PC MAC address (to allow the FPGA to record the address of its conversation partner) as well as a reset mask for the on-board chips. Currently the two least significant bits of this byte order reset of the ADC (bit 1) and DAC (bit 0). Another [[Ethernet_packets#"S" packet: status report|S-packet]] is returned after this stage. As with the S-packet at the end of the hard reset stage, this packet is meant for notification. An explicit query request ([[Ethernet_packets#The query cycle - "Q" packet|Q-packet]]) is recommended for reliable voltage values on board. (Certainly the validity of the highest ADC channel 7 is not guaranteed after an ADC reset request in the R'-packet)
      Line 47: Line 47:  
The query cycle is a conversation regarding the status of the digital board.  It polls the sensor devices and reports back their most recent data.   
 
The query cycle is a conversation regarding the status of the digital board.  It polls the sensor devices and reports back their most recent data.   
   −
The Q-packet is sent from the PC to the FPGA to request a status report from its sensor chips. Again, there is no relevant data aside from the packet type. There is no data attached to a query packet: the FPGA triggers the [[FPGA_Querier|query module]] upon recognizing a Q-type packet, which is identifiedan ASCII '''Q''': 0x51, 0101 0001 in the packet type field (2nd byte of packet payload)
+
The Q-packet is sent from the PC to the FPGA to request a status report from its sensor chips. There is no data attached to a query packet: the FPGA triggers the [[FPGA_Querier|query module]] upon recognizing a Q-type packet, which is identified as ASCII '''Q''': 0x51, 0101 0001 in the packet type field (2nd byte of packet payload). The boards reports back in response to the query via the [[Ethernet_packets#"S" packet: status report|S-packet]].
       
=== The programming cycle - "P" Packet===
 
=== The programming cycle - "P" Packet===
   −
The programming cycle is a conversation intended to set the values of the DAC channels.  It sends programming data to the board and receives confirmation of the programming.
+
The programming cycle is a conversation intended to set the values of the DAC channels.  It sends programming data to the board and receives confirmation of the programming in the form of a [[Ethernet_packets#"D" packet: DAC setup complete|D-packet]]
   −
This is the packet sent from the PC to the FPGA to set new values to the DAC channels.  The first byte of the packet will be an ASCII '''P''': 0x50, 0101 0000.  The next four bytes (if all 32 channels are used; 3 if 24 channels, 2 bytes if 16 channels) together form a programming mask.  Any channel that is to be reprogrammed will have a 1 in the corresponding location, and any channel that is to be left alone will have a 0 in the corresponding location.  The MSB of the first byte will be channel 31 (or 23 or 15) and the LSB of the fourth (or third or second) byte will be channel 0.  Thus, if all 32 channels are to be used, but only channels 14 through 26 are to be programmed, the packet would contain:
+
The identifying (second) byte of this packet's payload is ASCII '''P''': 0x50, 0101 0000.  The next four bytes form a programming mask.  Any channel that is to be reprogrammed will have a 1 in the corresponding location, and any channel that is to be left alone will have a 0 in the corresponding location.  The MSB of the first byte refers to channel 0 and the LSB of the fourth byte will be channel 31.  Thus, if only channels 5 through 17 are to be programmed, the packet would contain:
 
[[Image:P-packetPayload.png|thumb|399px|P-type packet format]]
 
[[Image:P-packetPayload.png|thumb|399px|P-type packet format]]
 
{| align="center" cellpadding="4" border="0" cellspacing="0" style="text-align:left"
 
{| align="center" cellpadding="4" border="0" cellspacing="0" style="text-align:left"
Line 69: Line 69:  
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0
 
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0
 
|}
 
|}
Following this are 64 bytes of programming data listing the values for channels 0-31 (in that order) in 2-byte words. Each channel needs 14 bits, so the format is two leading zeros and 6 MSB of data is the first byte, then 8 LSB of data in the second byte.  All channels are present in the packet, but only those marked in the mask will be programmed; all other bytes will be ignored and can take on any value.  The total size of the data in a programming packet is:
+
Following this are 64 bytes of programming data listing the values for channels 0-31 (in that order) in 2-byte words. Each channel needs 14 bits, so the format is two leading zeros and 6 MSB of data is the first byte, then 8 LSB of data in the second byte.  Place holders for all channels must be present in the packet, but only those marked in the mask will be programmed; all other bytes will be ignored and can take on any value.  Regardless of the mask, the word corresponding to the ''last channel must be followed but another byte as padding.''
     
1,004

edits

Navigation menu