Changes

Jump to navigation Jump to search
929 bytes added ,  19:33, 2 June 2008
m
no edit summary
Line 1: Line 1: −
== (011) Read Packet ==
+
= (011) Read Packet =
 +
 
 +
This block performs the initial reading of the packet. It skips through the packet header and reads the first two bytes of the payload, which contain the target location and packet type. (The latter is not to be confused with the packet type specified in the packet header. Our packets have a separate branding convention.) Based on these, the module will reject the packet (request a "skip" of the packet in the receive FIFO buffer) if the packet's contents will not be necessary further. The Reader will return control to the [[FPGA_Idler|Idler (010)]] if the packet is not addressed to its location or the packet type is invalid. Otherwise it will yield control to the module relevant to the packet type.
 +
 
 +
[[Image:ReaderProcess.png|frame]]
    
Block 011 is the only block with switching between following states.  Its first task is to load the MAC data of the packet.  If filtering inside of the FPGA is required, this block is responsible for it.  The only MAC filtering likely to be needed is a check to see if the destination MAC address matches the MAC address of the CP2200/1, but the CP2200/1 should filter this itself (verify in the data sheet).  If the packet is bad, this block tells the CP2200/1 to skip the packet and returns to block 010.  The MAC filter would be the first substate.
 
Block 011 is the only block with switching between following states.  Its first task is to load the MAC data of the packet.  If filtering inside of the FPGA is required, this block is responsible for it.  The only MAC filtering likely to be needed is a check to see if the destination MAC address matches the MAC address of the CP2200/1, but the CP2200/1 should filter this itself (verify in the data sheet).  If the packet is bad, this block tells the CP2200/1 to skip the packet and returns to block 010.  The MAC filter would be the first substate.
Line 18: Line 22:  
|}
 
|}
 
Anything other than the three defined packets is considered a bad packet and is discarded in the CP2200/1 before transitioning back to state 010.  An "R" packet obtains the reset mask from the second byte then discards the packet before transitioning to state 000.  State 000 assumes that the reset mask is held, so this output needs to be latched in place until the next time this block activates.  A query has no switches or masks on it, so a "Q" packet will be discarded from the CP2200/1 before continuing on.  A "P" packet has a large amount of data attached to it, so that is the only packet not discarded before continuing to the next state.  This allows later states to access the packet data, but also puts on those later states the responsibility for discarding the packet once finished with it.
 
Anything other than the three defined packets is considered a bad packet and is discarded in the CP2200/1 before transitioning back to state 010.  An "R" packet obtains the reset mask from the second byte then discards the packet before transitioning to state 000.  State 000 assumes that the reset mask is held, so this output needs to be latched in place until the next time this block activates.  A query has no switches or masks on it, so a "Q" packet will be discarded from the CP2200/1 before continuing on.  A "P" packet has a large amount of data attached to it, so that is the only packet not discarded before continuing to the next state.  This allows later states to access the packet data, but also puts on those later states the responsibility for discarding the packet once finished with it.
 +
 +
 +
Stepping through the 14 bytes of the packet header and reading the first two bytes of the payload it leaves the receive (Rx) buffer pointer on the 17th byte (or 3rd byte of payload).
 +
    
inputs
 
inputs
1,004

edits

Navigation menu