OpenCores
URL https://opencores.org/ocsvn/usbhostslave/usbhostslave/trunk

Subversion Repositories usbhostslave

[/] [usbhostslave/] [trunk/] [RTL/] [serialInterfaceEngine/] [processRxByte.asf] - Rev 40

Compare with Previous | Blame | View Log

VERSION=1.21
HEADER
FILE="processRxByte.asf"
FID=4094ffa4
LANGUAGE=VERILOG
ENTITY="processRxByte"
FREEOID=384
"LIBRARIES=//////////////////////////////////////////////////////////////////////\n////                                                              ////\n//// processRxByte\n////                                                              ////\n//// This file is part of the usbhostslave opencores effort.\n//// http://www.opencores.org/cores/usbhostslave/                 ////\n////                                                              ////\n//// Module Description:                                          ////\n//// \n////                                                              ////\n//// To Do:                                                       ////\n//// \n////                                                              ////\n//// Author(s):                                                   ////\n//// - Steve Fielding, sfielding@base2designs.com                 ////\n////                                                              ////\n//////////////////////////////////////////////////////////////////////\n////                                                              ////\n//// Copyright (C) 2004 Steve Fielding and OPENCORES.ORG          ////\n////                                                              ////\n//// This source file may be used and distributed without         ////\n//// restriction provided that this copyright statement is not    ////\n//// removed from the file and that any derivative work contains  ////\n//// the original copyright notice and the associated disclaimer. ////\n////                                                              ////\n//// This source file is free software; you can redistribute it   ////\n//// and/or modify it under the terms of the GNU Lesser General   ////\n//// Public License as published by the Free Software Foundation; ////\n//// either version 2.1 of the License, or (at your option) any   ////\n//// later version.                                               ////\n////                                                              ////\n//// This source is distributed in the hope that it will be       ////\n//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////\n//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////\n//// PURPOSE. See the GNU Lesser General Public License for more  ////\n//// details.                                                     ////\n////                                                              ////\n//// You should have received a copy of the GNU Lesser General    ////\n//// Public License along with this source; if not, download it   ////\n//// from http://www.opencores.org/lgpl.shtml                     ////\n////                                                              ////\n//////////////////////////////////////////////////////////////////////\n//\n`include \"timescale.v\"\n`include \"usbSerialInterfaceEngine_h.v\"\n`include \"usbConstants_h.v\"\n"
MULTIPLEARCHSTATUS=FALSE
SYNTHESISATTRIBUTES=TRUE
HEADER_PARAM="AUTHOR,"
HEADER_PARAM="COMPANY,"
HEADER_PARAM="CREATIONDATE,"
HEADER_PARAM="TITLE,No Title"
BLOCKTABLE_FILE=""
BLOCKTABLE_TEMPL="0"
BLOCKTABLE_VISIBLE="1"
END
BUNDLES
B T "Declarations" 0,0,255 0 0 1 255,255,255 0 3333 0 0000 0 "Arial" 0
B T "Conditions" 236,0,236 0 0 0 255,255,255 0 3333 0 0110 0 "Arial" 0
B F "States" 0,0,0 0 0 1 0,255,0 1 3527 1480 0000 0 "Arial" 0
B T "Actions" 0,0,0 0 0 1 255,255,255 0 3333 0 0000 0 "Arial" 0
B T "Labels" 0,0,0 0 0 0 0,0,0 0 3333 0 0000 0 "Arial" 0
B L "Transitions" 0,0,0 0 0 1 0,0,0 1 3527 1480 0000 0 "Arial" 0
B F "Ports" 0,0,0 0 0 1 0,255,255 1 3527 1480 0000 0 "Arial" 0
B L "Errors" 255,0,0 0 3 1 255,255,255 1 3527 1480 0000 0 "Arial" 0
B T "State Labels" 0,0,0 0 0 0 0,0,0 0 3333 0 0000 0 "Arial" 4
B F "Current State" 255,255,0 0 0 1 255,255,0 1 3527 1480 0000 0 "Arial" 0
B T "Comments" 157,157,157 0 0 1 255,255,255 0 3333 0 0000 0 "Arial" 0
B L "Info" 0,255,0 0 3 1 255,255,255 1 3527 1480 0000 0 "Arial" 0
B F "Junction" 0,0,0 0 0 1 255,0,0 1 3527 1480 0000 0 "Arial" 0
B F "Initial State Indicator" 0,0,0 0 0 1 240,140,40 1 3527 1480 0000 0 "Arial" 0
B T "Alias" 0,128,0 0 0 1 255,255,255 0 3527 1480 0000 0 "Arial" 0
B F "Delay" 0,0,0 0 0 1 180,180,180 1 3527 1480 0000 0 "Arial" 0
END
INSTHEADER 1
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 16
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 24
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 33
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 42
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 216
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 213
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 18
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
INSTHEADER 357
PAGE 0,0 215900,279400
MARGINS 12700,0 0,12700
END
OBJECTS
L 15 16 0 TEXT "State Labels" | 115714,112364 1 0 0 "CHK_PID"
W 13 6 0 12 9 BEZIER "Transitions" | 22016,192062 26512,191798 31110,187768 35074,185908
I 12 6 0 Builtin Reset | 22016,192062
S 11 6 0 ELLIPSE "States" | 41526,162904 6500 6500
L 10 11 0 TEXT "State Labels" | 41526,162904 1 0 0 "CHK_ST\n/0/"
S 9 6 4096 ELLIPSE "States" | 41526,185122 6500 6500
L 8 9 0 TEXT "State Labels" | 41526,185122 1 0 0 "START_PRBY\n/1/"
G 1 0 0 TEXT 0,0,0 0 0 0 255,255,255 0 3527 1480 0000 0 "Arial" 0 | 93869,253485 1 0 0 "Module: processRxByte"
F 6 0 671089152 185 0 "" 0 RECT 0,0,0 0 0 1 255,255,255 0 | 14988,3000 199488,197598
L 7 6 0 TEXT "Labels" | 57079,194838 1 0 0 "prRxByte"
A 278 257 4 TEXT "Actions" | 130366,127109 1 0 0 "RxDataOutWEn <= 1'b0;\nRXByteStMachCurrState <= `IDLE_BYTE_ST;"
L 279 280 0 TEXT "State Labels" | 49504,129936 1 0 0 "FIN\n/10/"
S 280 41 69632 ELLIPSE "States" | 49504,129936 6500 6500
W 281 41 0 40 280 BEZIER "Transitions" | 71655,187272 66885,174036 56388,149316 51618,136080
A 282 280 4 TEXT "Actions" | 68321,131530 1 0 0 "CRC5En <= 1'b0;\nRxDataOutWEn <= 1'b0;"
W 284 41 0 280 37 BEZIER "Transitions" | 54276,125525 62504,119205 74052,104895 82280,98575
W 285 50 0 286 291 BEZIER "Transitions" | 59473,89872 67701,83552 79249,69242 87477,62922
S 286 50 73728 ELLIPSE "States" | 54701,94283 6500 6500
A 287 286 4 TEXT "Actions" | 73518,95877 1 0 0 "CRC16En <= 1'b0;\nRxDataOutWEn <= 1'b0;"
L 303 304 0 TEXT "Labels" | 84462,230495 1 0 0 "RxByteIn[7:0]"
I 302 0 2 Builtin OutPort | 76139,237545 "" ""
L 301 302 0 TEXT "Labels" | 82139,237545 1 0 0 "RxDataOutWEn"
I 300 0 130 Builtin OutPort | 76848,242565 "" ""
L 299 300 0 TEXT "Labels" | 82848,242565 1 0 0 "RxCtrlOut[7:0]"
I 298 0 130 Builtin OutPort | 76848,247579 "" ""
L 297 298 0 TEXT "Labels" | 82848,247579 1 0 0 "RxDataOut[7:0]"
A 296 0 1 TEXT "Actions" | 13933,252227 1 0 0 "always @\n(next_CRCError or next_bitStuffError or\n next_RxOverflow or next_NAKRxed or \n next_stallRxed or next_ACKRxed or \n next_dataSequence)\nbegin \n  RxStatus <= \n  {1'b0, next_dataSequence, \n  next_ACKRxed, \n  next_stallRxed, next_NAKRxed, \n  next_RxOverflow, \n  next_bitStuffError, next_CRCError };\nend"
L 25 24 0 TEXT "State Labels" | 115892,81996 1 0 0 "HSHAKE"
S 24 6 8196 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 115892,81996 6500 6500
I 21 17 0 Builtin Exit | 89220,92674
I 20 17 0 Builtin Entry | 45216,248076
L 19 18 0 TEXT "State Labels" | 109233,155402 1 0 0 "FIRST_BYTE"
S 18 17 49156 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 109233,155402 6500 6500
H 17 16 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
S 16 6 12292 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 115714,110762 6500 6500
W 288 50 0 293 286 BEZIER "Transitions" | 76852,151619 72082,138383 61585,113663 56815,100427
L 289 286 0 TEXT "State Labels" | 54701,94283 1 0 0 "FIN\n/11/"
I 291 50 0 Builtin Exit | 90483,62922
I 292 50 0 Builtin Entry | 33692,252435
S 293 50 77824 ELLIPSE "States" | 79792,157415 6500 6500
L 294 293 0 TEXT "State Labels" | 79792,157415 1 0 0 "CHK_STRM\n/12/"
A 295 293 4 TEXT "Actions" | 114075,218259 1 0 0 "RXDataByteCnt <= RXDataByteCnt + 1'b1;\ncase (RxCtrl)\n  `DATA_STOP:\n  begin\n    if (CRC16Result != 16'hb001)\n      CRCError <= 1'b1;\n    RxDataOut <= RxStatus;\n    RxCtrlOut <= `RX_PACKET_STOP;\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\n  `DATA_BIT_STUFF_ERROR:\n  begin\n    bitStuffError <= 1'b1;\n    RxDataOut <= RxStatus;\n    RxCtrlOut <= `RX_PACKET_STOP;\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\n  `DATA_STREAM:\n  begin\n    RxDataOut <= RxByte;\n    RxCtrlOut <= `RX_PACKET_STREAM;\n    CRCData <= RxByte;\n    CRC16En <= 1'b1;\n  end\n  default:\n  begin\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\nendcase\nRxDataOutWEn <= 1'b1;"
L 319 320 0 TEXT "Labels" | 130127,218643 1 0 0 "CRC16En"
I 318 0 2 Builtin OutPort | 123866,228310 "" ""
L 317 318 0 TEXT "Labels" | 129866,228310 1 0 0 "CRC5_8Bit"
I 316 0 2 Builtin OutPort | 123509,232929 "" ""
L 315 316 0 TEXT "Labels" | 129509,232929 1 0 0 "CRC5En"
I 314 0 130 Builtin InPort | 125655,237903 "" ""
L 313 314 0 TEXT "Labels" | 131655,237903 1 0 0 "CRC5Result[4:0]"
I 312 0 130 Builtin OutPort | 123156,242520 "" ""
L 311 312 0 TEXT "Labels" | 129156,242520 1 0 0 "CRCData[7:0]"
I 310 0 2 Builtin OutPort | 123515,247488 "" ""
L 309 310 0 TEXT "Labels" | 129515,247488 1 0 0 "rstCRC"
I 308 0 2 Builtin InPort | 78462,219728 "" ""
L 307 308 0 TEXT "Labels" | 85176,219728 1 0 0 "processRxDataInWEn"
I 306 0 130 Builtin InPort | 78465,225472 "" ""
L 305 306 0 TEXT "Labels" | 84465,225472 1 0 0 "RxCtrlIn[7:0]"
I 304 0 130 Builtin InPort | 78462,230495 "" ""
L 43 42 0 TEXT "State Labels" | 118750,24108 1 0 0 "DATA"
S 42 6 16388 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 118750,24108 6500 6500
S 40 41 65536 ELLIPSE "States" | 74595,193068 6500 6500
L 39 40 0 TEXT "State Labels" | 74595,193068 1 0 0 "CHK_STRM\n/9/"
I 38 41 0 Builtin Entry | 30541,258592
I 37 41 0 Builtin Exit | 85286,98575
W 36 41 0 38 371 BEZIER "Transitions" | 34549,258592 38576,254357 47806,246433 31745,235718
L 34 33 0 TEXT "State Labels" | 117500,51980 1 0 0 "TOKEN"
S 33 6 20484 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 117500,51980 6500 6500
H 41 33 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
H 32 24 0 RECT 0,0,0 0 0 1 255,255,255 0 | 17144,15700 201644,263700
L 335 336 0 TEXT "Labels" | 175074,230643 1 0 0 "ACKRxed"
I 334 0 2 Builtin Signal | 172074,234927 "" ""
L 333 334 0 TEXT "Labels" | 175074,234927 1 0 0 "stallRxed"
I 332 0 2 Builtin Signal | 171717,239568 "" ""
L 331 332 0 TEXT "Labels" | 174717,239568 1 0 0 "NAKRxed"
I 330 0 2 Builtin Signal | 172074,243852 "" ""
L 329 330 0 TEXT "Labels" | 175074,243852 1 0 0 "RxTimeOut"
I 328 0 2 Builtin Signal | 172074,248136 "" ""
L 327 328 0 TEXT "Labels" | 175074,248136 1 0 0 "RxOverflow"
I 326 0 2 Builtin Signal | 172074,252420 "" ""
L 325 326 0 TEXT "Labels" | 175074,252420 1 0 0 "bitStuffError"
I 324 0 130 Builtin InPort | 126267,223603 "" ""
L 323 324 0 TEXT "Labels" | 132267,223603 1 0 0 "CRC16Result[15:0]"
I 320 0 2 Builtin OutPort | 124127,218643 "" ""
S 63 6 24576 ELLIPSE "States" | 112744,160479 6500 6500
L 62 63 0 TEXT "State Labels" | 113731,159652 1 0 0 "WAIT_BYTE\n/2/"
C 58 54 0 TEXT "Conditions" | 46403,18824 1 0 0 "RXByteStMachCurrState == `DATA_BYTE_ST"
C 57 53 0 TEXT "Conditions" | 45420,45726 1 0 0 "RXByteStMachCurrState == `TOKEN_BYTE_ST"
C 56 52 0 TEXT "Conditions" | 45596,78180 1 0 0 "RXByteStMachCurrState == `HS_BYTE_ST"
C 55 51 0 TEXT "Conditions" | 43455,108692 1 0 0 "RXByteStMachCurrState == `CHECK_PID_ST"
W 54 6 0 11 42 BEZIER "Transitions" | 41669,156431 42607,127755 43130,57608 44403,42064\
                                      45676,26520 48892,21696 57535,20691 66178,19686\
                                      96662,22630 112340,23032
W 53 6 0 11 33 BEZIER "Transitions" | 41642,156408 42044,133896 42058,76100 43264,64442\
                                      44470,52784 48490,51176 56999,50774 65508,50372\
                                      95524,50372 103095,50372 110666,50372 111053,50434\
                                      111187,50434
W 52 6 0 11 24 BEZIER "Transitions" | 41273,156415 41809,142881 41924,101426 42929,93654\
                                      43934,85882 46882,81862 55190,80924 63498,79986\
                                      93782,80254 101420,80321 109058,80388 109445,80450\
                                      109579,80450
W 51 6 0 11 16 BEZIER "Transitions" | 41219,156419 41353,150657 41254,124742 41790,120856\
                                      42326,116970 44202,112950 52711,111811 61220,110672\
                                      93136,110915 109216,110647
H 50 42 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
I 340 0 128 Builtin Signal | 172498,216552 "" ""
L 339 340 0 TEXT "Labels" | 175498,216552 1 0 0 "RxStatus[7:0]"
W 351 6 0 357 63 BEZIER "Transitions" | 165899,75618 165621,78724 166582,88726 164321,92532\
                                        162060,96338 152965,99917 149770,102482 146575,105047\
                                        142560,111540 140625,118020 138690,124500 135270,144660\
                                        132480,150150 129690,155640 122852,157755 118982,158655
A 349 9 4 TEXT "Actions" | 143783,194927 1 0 0 "RxByte <= 8'h00;\nRxCtrl <= 8'h00;\nRXByteStMachCurrState <= `IDLE_BYTE_ST;\nCRCError <= 1'b0;\nbitStuffError <= 1'b0;\nRxOverflow <= 1'b0;\nRxTimeOut <= 1'b0;\nNAKRxed <= 1'b0;\nstallRxed <= 1'b0;\nACKRxed <= 1'b0;\ndataSequence <= 1'b0;\nRxDataOut <= 8'h00;\nRxCtrlOut <= 8'h00;\nRxDataOutWEn <= 1'b0;\nrstCRC <= 1'b0;\nCRCData <= 8'h00;\nCRC5En <= 1'b0;\nCRC5_8Bit <= 1'b0;\nCRC16En <= 1'b0;\nRXDataByteCnt <= 10'h00;\nprocessRxByteRdy <= 1'b1;"
I 346 0 130 Builtin Signal | 116382,203511 "" ""
L 345 346 0 TEXT "Labels" | 119382,203511 1 0 0 "RXByteStMachCurrState[2:0]"
I 344 0 130 Builtin Signal | 172286,208921 "" ""
L 343 344 0 TEXT "Labels" | 175286,208921 1 0 0 "RxCtrl[7:0]"
I 342 0 130 Builtin Signal | 171929,203923 "" ""
L 341 342 0 TEXT "Labels" | 174929,203923 1 0 0 "RxByte[7:0]"
I 338 0 2 Builtin Signal | 172074,226002 "" ""
L 337 338 0 TEXT "Labels" | 175074,226002 1 0 0 "dataSequence"
I 336 0 2 Builtin Signal | 172074,230643 "" ""
A 78 65 16 TEXT "Actions" | 51039,169927 1 0 0 "RxByte <= RxByteIn;\nRxCtrl <= RxCtrlIn;\nprocessRxByteRdy <= 1'b0;"
W 76 17 8194 75 18 BEZIER "Transitions" | 69849,207737 75657,200807 99461,167483 105269,160553
S 75 17 45056 ELLIPSE "States" | 65748,212778 6500 6500
L 74 75 0 TEXT "State Labels" | 65748,212778 1 0 0 "DO_CHK\n/5/"
W 72 6 0 42 357 BEZIER "Transitions" | 123133,28907 132448,39032 153635,59470 162950,69595
W 71 6 0 33 357 BEZIER "Transitions" | 123360,54790 132540,58705 152828,67124 162008,71039
W 69 6 0 24 357 BEZIER "Transitions" | 122281,80803 131596,78778 152599,74997 161914,72972
W 68 6 0 16 357 BEZIER "Transitions" | 120926,106881 130781,99051 152663,82096 162518,74266
C 66 65 0 TEXT "Conditions" | 62843,155863 1 0 0 "processRxDataInWEn == 1'b1"
W 65 6 0 63 11 BEZIER "Transitions" | 106255,160115 94419,158098 59763,166047 47927,164030
W 64 6 0 9 63 BEZIER "Transitions" | 48012,184711 59579,183097 95649,168804 106856,163230
I 367 0 2 Builtin Signal | 77453,208858 "" ""
L 366 367 0 TEXT "Labels" | 80453,208858 1 0 0 "Signal1"
I 355 0 130 Builtin Signal | 77612,203504 "" ""
L 354 355 0 TEXT "Labels" | 80612,203504 1 0 0 "RXDataByteCnt[9:0]"
I 353 0 2 Builtin Signal | 172356,221968 "" ""
L 352 353 0 TEXT "Labels" | 175356,221968 1 0 0 "CRCError"
W 81 17 0 20 75 BEZIER "Transitions" | 49078,248076 53138,241189 58262,225186 62322,218299
W 82 17 4097 75 21 BEZIER "Transitions" | 63199,206800 60009,197085 40708,156469 41288,147696\
                                          41868,138924 51896,113272 59871,108777 67846,104282\
                                          74994,97474 86594,92674
L 356 357 0 TEXT "State Labels" | 165320,72170 1 0 0 "J1"
S 357 6 81940 ELLIPSE "Junction" | 165320,72170 3500 3500
H 358 357 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
I 359 358 0 Builtin Entry | 86360,167640
I 360 358 0 Builtin Exit | 129540,111760
W 361 358 0 359 360 BEZIER "Transitions" | 90523,167640 102693,150317 114474,129084 126644,111760
C 380 379 0 TEXT "Conditions" | 39560,213610 1 0 0 "CRC16UpdateRdy == 1'b1"
W 379 50 0 377 293 BEZIER "Transitions" | 76802,222169 77769,207119 78297,178932 79264,163882
W 378 50 0 292 377 BEZIER "Transitions" | 37700,252435 46407,247168 62458,237581 71165,232314
S 377 50 90112 ELLIPSE "States" | 76540,228660 6500 6500
L 376 377 0 TEXT "State Labels" | 76540,228660 1 0 0 "WAIT_CRC\n/14/"
I 375 0 2 Builtin InPort | 126404,209416 "" ""
L 374 375 0 TEXT "Labels" | 132404,209416 1 0 0 "CRC16UpdateRdy"
C 373 372 0 TEXT "Conditions" | 40381,225556 1 0 0 "CRC5UpdateRdy == 1'b1"
W 372 41 0 371 40 BEZIER "Transitions" | 35330,224745 46935,215765 58540,206785 70145,197805
S 371 41 86016 ELLIPSE "States" | 30702,229308 6500 6500
L 370 371 0 TEXT "State Labels" | 30702,229308 1 0 0 "WAIT_CRC\n/13/"
I 369 0 2 Builtin InPort | 126404,214168 "" ""
L 368 369 0 TEXT "Labels" | 132404,214168 1 0 0 "CRC5UpdateRdy"
L 381 382 0 TEXT "Labels" | 84990,214964 1 0 0 "processRxByteRdy"
I 382 0 2 Builtin OutPort | 78990,214964 "" ""
A 383 351 16 TEXT "Actions" | 154286,95504 1 0 0 "processRxByteRdy <= 1'b1;"
A 162 40 4 TEXT "Actions" | 109188,255837 1 0 0 "RXDataByteCnt <= RXDataByteCnt + 1'b1;\ncase (RxCtrl)\n  `DATA_STOP:\n  begin\n    if (CRC5Result != 5'h6)\n      CRCError <= 1'b1;\n    RxDataOut <= RxStatus;\n    RxCtrlOut <= `RX_PACKET_STOP;\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\n  `DATA_BIT_STUFF_ERROR:\n  begin\n    bitStuffError <= 1'b1;\n    RxDataOut <= RxStatus;\n    RxCtrlOut <= `RX_PACKET_STOP;\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\n  `DATA_STREAM:\n  begin\n    if (RXDataByteCnt > 10'h2) \n    begin\n      RxOverflow <= 1'b1;\n      RxDataOut <= RxStatus;\n      RxCtrlOut <= `RX_PACKET_STOP;\n      RXByteStMachCurrState <= `IDLE_BYTE_ST;\n    end\n    else \n    begin\n      RxDataOut <= RxByte;\n      RxCtrlOut <= `RX_PACKET_STREAM;\n      CRCData <= RxByte;\n      CRC5_8Bit <= 1'b1;\n      CRC5En <= 1'b1;\n    end\n  end \n  default:\n  begin\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  end\nendcase\nRxDataOutWEn <= 1'b1;"
L 184 185 0 TEXT "Labels" | 161048,252716 1 0 0 "clk"
I 185 0 3 Builtin InPort | 155048,252716 "" ""
L 186 187 0 TEXT "Labels" | 160691,247662 1 0 0 "rst"
I 187 0 2 Builtin InPort | 154691,247662 "" ""
C 188 13 0 TEXT "Conditions" | 25531,188745 1 0 0 "rst"
W 223 217 4096 218 221 BEZIER "Transitions" | 111743,134422 116788,127400 128768,96077 133814,89055
W 222 217 0 220 218 BEZIER "Transitions" | 90523,167640 95262,160652 99562,152068 104302,145079
I 221 217 0 Builtin Exit | 136710,89055
I 220 217 0 Builtin Entry | 86360,167640
L 219 218 0 TEXT "State Labels" | 107950,139700 1 0 0 "CHK_START\n/3/"
S 218 217 36864 ELLIPSE "States" | 107950,139700 6500 6500
H 217 216 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
S 216 6 32772 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 113402,144340 6500 6500
L 215 216 0 TEXT "State Labels" | 113402,144340 1 0 0 "IDLE"
S 213 6 28676 ELLIPSE 0,0,0 0 0 1 0,255,255 1 | 113934,127848 6500 6500
L 212 213 0 TEXT "State Labels" | 113934,129450 1 0 0 "CHK_SYNC"
W 236 6 0 213 357 BEZIER "Transitions" | 118353,123082 128966,111334 152340,86494 162953,74746
W 235 6 0 216 357 BEZIER "Transitions" | 117419,139231 129033,122944 151793,91387 163407,75100
C 234 231 0 TEXT "Conditions" | 42504,140676 1 0 0 "RXByteStMachCurrState == `IDLE_BYTE_ST"
C 233 232 0 TEXT "Conditions" | 41970,122520 1 0 0 "RXByteStMachCurrState == `CHECK_SYNC_ST"
W 232 6 0 11 213 BEZIER "Transitions" | 41377,156411 41443,149937 41370,137271 41770,133433\
                                        42170,129596 43639,127192 51882,126624 60126,126057\
                                        91699,127301 107452,127367
W 231 6 0 11 216 BEZIER "Transitions" | 41320,156431 41386,153761 41370,148419 41770,146583\
                                        42170,144748 43639,142745 51849,142311 60059,141877\
                                        91249,143561 106935,143694
W 230 224 0 225 228 BEZIER "Transitions" | 111743,134422 116788,127400 121803,118782 126849,111760
W 229 224 0 227 225 BEZIER "Transitions" | 90396,167640 95135,160652 99562,152068 104302,145079
I 228 224 0 Builtin Exit | 129540,111760
I 227 224 0 Builtin Entry | 86360,167640
L 226 225 0 TEXT "State Labels" | 107950,139700 1 0 0 "DO\n/4/"
S 225 224 40960 ELLIPSE "States" | 107950,139700 6500 6500
H 224 213 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
W 255 248 0 249 253 BEZIER "Transitions" | 60789,195800 65743,188968 70713,179952 75668,173120
W 254 248 0 252 249 BEZIER "Transitions" | 39547,229000 44083,222216 48824,213248 53361,206463
I 253 248 0 Builtin Exit | 78564,173120
I 252 248 0 Builtin Entry | 35384,229000
A 251 249 4 TEXT "Actions" | 92522,232212 1 0 0 "rstCRC <= 1'b0;\nRxDataOutWEn <= 1'b0;\ncase (RxByte[1:0] )\n  `SPECIAL:                              //Special PID.\n    RXByteStMachCurrState <= `IDLE_BYTE_ST;\n  `TOKEN:                                //Token PID\n  begin\n    RXByteStMachCurrState <= `TOKEN_BYTE_ST;\n    RXDataByteCnt <= 0;\n  end\n  `HANDSHAKE:                            //Handshake PID\n  begin\n    case (RxByte[3:2] )\n      2'b00:\n        ACKRxed <= 1'b1;\n      2'b10:\n        NAKRxed <= 1'b1;\n      2'b11:\n        stallRxed <= 1'b1;\n      default:\n      begin\n        $display (\"Invalid Handshake PID detected in ProcessRXByte\\n\");\n      end\n    endcase\n    RXByteStMachCurrState <= `HS_BYTE_ST;\n  end\n  `DATA:                                  //Data PID\n  begin\n    case (RxByte[3:2] )\n      2'b00:\n        dataSequence <= 1'b0;\n      2'b10:\n        dataSequence <= 1'b1;\n      default:\n        $display (\"Invalid DATA PID detected in ProcessRXByte\\n\");\n    endcase\n    RXByteStMachCurrState <= `DATA_BYTE_ST;\n    RXDataByteCnt <= 0;\n  end\nendcase"
L 250 249 0 TEXT "State Labels" | 56974,201060 1 0 0 "PROC\n/6/"
S 249 248 53248 ELLIPSE "States" | 56974,201060 6500 6500
H 248 18 0 RECT 0,0,0 0 0 1 255,255,255 0 | 15700,15700 200200,263700
A 245 76 16 TEXT "Actions" | 83312,221127 1 0 0 "CRCError <= 1'b0;\nbitStuffError <= 1'b0;\nRxOverflow <= 1'b0;\nNAKRxed <= 1'b0;\nstallRxed <= 1'b0;\nACKRxed <= 1'b0;\ndataSequence <= 1'b0;\nRxTimeOut <= 1'b0;\nRXDataByteCnt <= 10'h000;\nRxDataOut <= RxByte;\nRxCtrlOut <= `RX_PACKET_START;\nRxDataOutWEn <= 1'b1;\nrstCRC <= 1'b1;"
A 244 82 16 TEXT "Actions" | 20263,162000 1 0 0 "RXByteStMachCurrState <= `IDLE_BYTE_ST ;"
C 243 82 0 TEXT "Conditions" | 20905,184375 1 0 0 "(RxByte[7:4] ^ RxByte[3:0] ) != 4'hf"
A 242 218 4 TEXT "Actions" | 127244,141208 1 0 0 "if (RxCtrl == `DATA_START)\n  RXByteStMachCurrState <= `CHECK_SYNC_ST;"
A 240 225 4 TEXT "Actions" | 124532,142082 1 0 0 "if (RxByte == `SYNC_BYTE)\n  RXByteStMachCurrState <= `CHECK_PID_ST;\nelse\n  RXByteStMachCurrState <= `IDLE_BYTE_ST;"
W 256 17 0 18 21 BEZIER "Transitions" | 106988,149304 107171,135945 97823,112446 93593,107407\
                                        89364,102368 89220,95212 89220,94846
S 257 32 57344 ELLIPSE "States" | 129646,141752 5778 5778
L 258 257 0 TEXT "State Labels" | 129668,142146 1 0 0 "FIN\n/7/"
I 259 32 0 Builtin Entry | 66351,233704
I 260 32 0 Builtin Exit | 110355,78302
S 261 32 61440 ELLIPSE "States" | 86883,198406 6500 6500
L 262 261 0 TEXT "State Labels" | 86883,198406 1 0 0 "CHK\n/8/"
W 263 32 4096 261 257 BEZIER "Transitions" | 90984,193365 96792,186435 120426,153343 126234,146413
W 265 32 0 259 261 BEZIER "Transitions" | 70514,233704 74574,226817 79397,210814 83457,203927
A 268 263 16 TEXT "Actions" | 100115,177875 1 0 0 "if (RxCtrl != `DATA_STOP) //If more than PID rxed, then report error\n  RxOverflow <= 1'b1;\nRxDataOut <= RxStatus;\nRxCtrlOut <= `RX_PACKET_STOP;\nRxDataOutWEn <= 1'b1;"
W 269 32 0 257 260 BEZIER "Transitions" | 128387,136115 128570,122756 118958,98074 114728,93035\
                                          110499,87996 110355,80840 110355,80474
END

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.