RE:

"Zellal B" <[email protected]> Mon, 19 Jan 2004 14:51:39 +0000
Newsgroups gmane.org.handasarabia.general
Message-ID <[email protected]>
<html><div style='background-color:'><DIV class=RTE>am sorry but am just a VHDL begginer.. i would like to know how to divide this process into sub-modules is anyone willing to help....</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>process (presState, returnState, cnt, frameDataLatch, datagramLen, headerLen, dataLen, newFrame, wrCnt,<BR>&nbsp;&nbsp;&nbsp;complete, frameType, checksum, targetIP, bufferSelectSig, targetIdent,<BR>&nbsp;&nbsp;&nbsp;position0, position1, ident0, ident1, fragmentOffset, moreFragments, timeout0, timeout1,<BR>&nbsp;&nbsp;&nbsp;endFrame, newFrameByte, frameValid)<BR>&nbsp;begin<BR>&nbsp;&nbsp;-- signal defaults<BR>&nbsp;&nbsp;wrRAM &lt;= '0';<BR>&nbsp;&nbsp;wrData &lt;= (others =&gt; '0');<BR>&nbsp;&nbsp;wrAddr &lt;= (others =&gt; '0');<BR>&nbsp;&nbsp;datagramSize &lt;= (others =&gt; '0');<BR>&nbsp;&nbsp;incCnt &lt;= '0';<BR>&nbsp;&nbsp;rstCnt &lt;= '0';<BR>&nbsp;&nbsp;incWrCnt &lt;= '0';<BR>&nbsp;&nbsp;rstWrCnt &lt;= '0';<BR>&nbsp;&nbsp;newDataGram &lt;= '0';<BR>&nbsp;&nbsp;-- the following two signals remember their previous value if not reassigned<BR>&nbsp;&nbsp;nextHeader
 Len &lt;= headerLen;<BR>&nbsp;&nbsp;nextDatagramLen &lt;= datagramLen;<BR>&nbsp;&nbsp;doWrite &lt;= '0';<BR>&nbsp;&nbsp;getNewByte &lt;= '0';<BR>&nbsp;&nbsp;latchFrameData &lt;= '0';<BR>&nbsp;&nbsp;shiftInSourceIP &lt;= '0';<BR>&nbsp;&nbsp;shiftInTargetIP &lt;= '0';<BR>&nbsp;&nbsp;latchProtocol &lt;= '0';<BR>&nbsp;&nbsp;newHeader &lt;= '0';<BR>&nbsp;&nbsp;newByte &lt;= '0';<BR>&nbsp;&nbsp;inByte &lt;= (others =&gt; '0');<BR>&nbsp;&nbsp;latchMoreFragments &lt;= '0';<BR>&nbsp;&nbsp;shiftInFragmentOffset &lt;= '0';</DIV>
<DIV class=RTE>&nbsp;&nbsp;shiftInIdentification &lt;= '0';&nbsp;&nbsp;<BR>&nbsp;&nbsp;nextBufferSelect &lt;= bufferSelectSig;<BR>&nbsp;&nbsp;latchIdent &lt;= '0';<BR>&nbsp;&nbsp;resetIdent &lt;= '0';<BR>&nbsp;&nbsp;updatePosition &lt;= '0';<BR>&nbsp;&nbsp;resetPosition &lt;= '0';<BR>&nbsp;&nbsp;resetTimeout &lt;= '0';<BR>&nbsp;<BR>&nbsp;&nbsp;case presState is<BR>&nbsp;&nbsp;&nbsp;when stIdle =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- wait for the arrival of a new frame that has a frameType of 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;if newFrame = '0' or frameType = '0' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- reset the counters for the next datagram<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rstCnt &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rstWrCnt &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newHeader &lt;= '1';<BR>&nbsp;&nb
 sp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetHeaderLen;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- get header length and version information<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getNewByte &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;end if;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;when stGetHeaderLen =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- check ip version<BR>&nbsp;&nbsp;&nbsp;&nbsp;if frameDataLatch (7 downto 4) /= 4 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetHeaderByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- send data to checksum machine<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inByte &lt;= frameDataLatch;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newByte &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- get the header length in bytes, rather than 32-bit words<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextHeaderLen &lt;= frameDataLatch (3 downto 0) &amp; "00";<BR>&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;when stGetHeaderByte =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- if we've finished getting the headers and processing them, start on th
 e data<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- once finished, refragmenting will come next<BR>&nbsp;&nbsp;&nbsp;&nbsp;if cnt = headerLen then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- only operate on data meant for us, or broadcast data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if checksum = 0 and (targetIP = DEVICE_IP or targetIP = x"FFFFFFFF") then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- determine which buffer should be used to handle the data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ident0 = targetIdent and timeout0 /= FULLTIME then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- the ident matches and the timeout counter has not expired<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextBufferSelect &lt;= '0';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- accept the frame if its offset matches what we think it should be<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- thi
 s drops out of order and duplicate frames.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if position0 = fragmentOffset &amp; "000" then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elsif ident1 = targetIdent and timeout1 /= FULLTIME then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- the ident matches and the timeout counter has not expired&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextBufferSelect &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- accept the frame if its offset matches what we think it should be<
 BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- this drops out of order and duplicate frames.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if position1 = fragmentOffset &amp; "000" then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elsif (ident0 = 0 or timeout0 = FULLTIME) and fragmentOffset = 0 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- The ident doesn't match either of the buffers so check if buffer 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- is free.&nbsp; If ident = 0 or the timeout has expired then the buffer is free<BR>&nbsp;&nbsp;&nbsp;&nbsp;&n
 bsp;&nbsp;&nbsp;-- This must be the first fragment if it is to go here so also check the offset<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextBufferSelect &lt;= '0';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elsif (ident1 = 0 or timeout1 = FULLTIME) and fragmentOffset = 0 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- The ident doesn't match either of the buffers so check if buffer 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- is free.&nbsp; If ident = 0 or the timeout has expired then the buffer is free<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- This must be the first fragment if it is to go here so also check the offset<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextBufferSelect &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&
 nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- ignore frame as it wasn't for us<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- otherwise get the next header byte from RAM<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stStoreHeaderByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getNewByte &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;when stStoreHeaderByte =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetHeaderByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- operate on each value of the header received according to count<BR>&nbsp;&nbsp;&nbs
 p;&nbsp;-- count will be one higher than the last byte received, as it is incremented<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- at the same time as the data is streamed in, so<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- when the data is seen to be available, count should also be one higher<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- Send data to checksum process<BR>&nbsp;&nbsp;&nbsp;&nbsp;newByte &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;inByte &lt;= frameDataLatch;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- Operate on data in the header<BR>&nbsp;&nbsp;&nbsp;&nbsp;case cnt(4 downto 0) is&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "00011" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextDatagramLen (10 downto 8) &lt;= frameDataLatch (2 downto 0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "00100" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextDatagramLen (7 downto 0) &lt;
 = frameDataLatch;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "00101" | "00110" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shiftInIdentification &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "00111" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shiftInFragmentOffset &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latchMoreFragments &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "01000" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shiftInFragmentOffset &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "01010" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latchProtocol &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "01101" | "01110" | "01111" | "10000" =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shiftInSourceIP &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when "10001" | "10010" | "10011" | "10100" =&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shiftInTargetI
 P &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when others =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;end case;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;when stGetDataByte =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- if we haven't finished receiving the data, then<BR>&nbsp;&nbsp;&nbsp;&nbsp;if cnt /= datagramLen then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stSetupWriteDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- read an IP data byte from the data stream...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getNewByte &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;elsif endFrame = '1' and frameValid = '1' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- this means that the frame is finished and was valid<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- so update the buffer data and go to final state<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stCompleteFragment;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resetTimeout &lt;= '1';&nbsp;-- start/rest
 art timer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latchIdent &lt;= '1';&nbsp;&nbsp;-- allocate buffer to data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if fragmentOffset = 0 then&nbsp;-- check if this is the first fragment<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resetPosition &lt;= '1';&nbsp;-- give position initial value<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;updatePosition &lt;= '1';&nbsp; -- or add to the amount of data stored<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;elsif endFrame = '1' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- the frame is complete but not valid so ignore it<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- the frame is not complete so keep looping until it is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;
 &nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;when stSetupWriteDataByte =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stGetDataByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;--Set up to write the byte that was read in stGetDataByte to RAM<BR>&nbsp;&nbsp;&nbsp;&nbsp;doWrite &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;wrData &lt;= frameDataLatch;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;when stCompleteFragment =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- Signal the transport protocols if the datagram is finished<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- or await next frame.<BR>&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stIdle;<BR>&nbsp;&nbsp;&nbsp;&nbsp;if moreFragments = '0' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Last frame so :<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newDatagram &lt;= '1';&nbsp;&nbsp;-- notify higher protocols it's ready<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resetIdent &lt;= '1';&nbsp;&nbsp;-- free buffer for next time<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if bufferSelectSig = '0' then&nbsp;-- output datagram size from correct buffer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datagramSize &lt;= position0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datagramSize &lt;= position1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&
 nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;when stDoWrite =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;-- Wait for RAM write request to be serviced<BR>&nbsp;&nbsp;&nbsp;&nbsp;if complete = '0' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- keep signals asserted until complete is high<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stDoWrite;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wrRAM &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- The address is based on the fragment offset and buffer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if bufferSelectSig = '0' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wrAddr &lt;= "001" &amp; (wrCnt + (fragmentOffset &amp; "000"));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wrAddr &lt;= "010" &amp; (wrCnt + (fragmentOffset &amp; "000"));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wrData &lt;= fra
 meDataLatch;<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- when write is finished, go to returnState<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= returnState;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;incWrCnt &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;end if;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;when stGetNewByte =&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;if newFrameByte = '0' then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- wait for new byte to arrive<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= stgetNewByte;<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- latch new byte and go to returnState<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nextState &lt;= returnState;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;incCnt &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latchFrameData &lt;= '1';<BR>&nbsp;&nbsp;&nbsp;&nbsp;end if;<BR>&nbsp;&nbsp;&nbsp;when others =&gt;<BR>&nbsp;&nbsp;end case;<BR>&nbsp;end process;</DIV></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMBEN/2746??PS=">MSN 8.</a> Get 2 months FREE*.</html>

----------------------------------
General Handasa Arabia Mailinglist
http://www.handasarabia.org
[email protected] for help

Message number 71