ASGN Ethernet Loopback Design (2)
Short Description
dcac...
Description
Ethernet Loopback design Functional Verifcation Note: This project is only or SystemVerilog learning !hile getting practical e"posure to Testbench component coding testcase coding co#erage checking etc$ This must ne#er be sho!n as a main project in resume$ %eer to code shared as part o course material or any clarifcations 1. Desi Design gn codi coding ng a. Design Design with with receive receive and transmi transmitt interfac interface e b. Always Always block block to collect collect byte byte at each +edge +edge when valid valid is high, high, drive drive ready as acknowledgment c. Write Write logic( logic(22+l 22+len+4 en+4 to to sto! collectin collecting g bytes bytes d. When !kt collec collection tion is com!lete, com!lete, check check !kt !kt good good or bad e. "f !kt is is good, good, drive drive !kt on design design transmi transmitt interface interface i. #all a method method to drive !kt on design design transmit transmit interfa interface ce f. "f !kt !kt is is bad bad,, dro dro! ! !kt !kt
2. $estben estbench ch archite architect ct%re %re
&. $estbench com!onent coding 4. $estcases a. 'enerate 1 good !kts b. 'enerate 1 bad !kts c. 'enerate mi) of 1 good * bad !kts d. 'enerate !kts with ## corr%!ted e. 'enerate !kts with - not in order /. #overage de0nition a. kt 0eld coverage i. DA cover!oint ii. A cover!oint iii. ength cover!oint iv. - cover!oint b. cenario coverage i. #over!oint for 1 good !kts in row ii. #over!oint for 1 bad !kts in row 3. $o! 5 !rogram 5 env 5 t)6env, r)6env 5 bfm, gen, mon, cov 7. $o! a. D%t b. #lk, rst c. "nterface d. rogram block 8. 9th6cfg class a. :ario%s mailbo) i. 'en2bfm6mb, mon2cov6mb, mon2ref6mb, mon2ckr6mb, ref2ckr6mb b. :irt%al eth6r)6intf, eth6t)6intf c. ass6co%nt, fail6co%nt d. $est6!ass, test6fail
;. "nterface a. eceive interface i. :alid6in, ready6o%t, data6in, clk, rst b. $ransmit interface i. :alid6o%t, ready6in, data6o%t, clk, rst 1.9nv a. )6env < com!onents s!eci0c to design receive interface i. )6bfm, r)6gen, r)6mon, r)6cov b. $)6env < com!onents s!eci0c to design transmit interface i. $)6bfm, t)6mon ii. $)6gen, t)6cov is not re=%ired since t) is slave interface c. >oth )6bfm * $)6bfm are coded in a single class %sing r)6t)6f to decide whether to %se as a r)6bfm or t)6bfm 11.)6bfm a. 'etting !kts from gen2bfm connected mailbo) b. ack !kt in to byte? c. #all drive6byte? method to drive each byte !er clock cyle d. Drive each !kt in above loo! 12.)6gen a. @se test as in!%t to generate !kts s!eci0c to test re=%irements b. Write case statement to im!lement vario%s tests c. %t !kts in to gen2bfm mailbo) 1&.6mon a. Bonitor r)6intf at every !osedge of clk b. #ollect r)6data when valid * ready both are C1 c. %sh r)6data in to r)6byte? d. When r)6byte? siEe is 22, byteF2G, byteF21G %sed to get Clength val%e e. @sing above calc%lated length, decide when to sto! collected bytes(22+length+4 i. 4 is for crc siEe in bytes ii. ength < !ayload siEe iii. 22 < siEe till length 0eld f. -nce eno%gh bytes collected for a !kts, call %n!ack method on byte? g. %t !kt in to mailbo) to connect to coverage, reference model h. Delete =%e%e contents, then ste!s atog contin%e for all the !ackets 14.6cov a. 'ets !kts from mon2cov mailbo) b. Do coverage on !kts 0elds 1/.$6>fm a. #heck $6intf when valid from design is high, collect t)6data in to byte? b. Drive ready C1 to indicate t)6bfm readiness c. %sh t)6data in to r)6byte? d. When t)6byte? siEe is 22, byteF2G, byteF21G %sed to get Clength val%e e. @sing above calc%lated length, decide when to sto! collected bytes(22+length+4 i. 4 is for crc siEe in bytes ii. ength < !ayload siEe iii. 22 < siEe till length 0eld f. -nce eno%gh bytes collected for a !kts, call %n!ack method on byte?
13.$6mon a. Bonitor t)6intf at every !osedge of clk b. #ollect t)6data when valid * ready both are C1 c. %sh t)6data in to t)6byte? d. When t)6byte? siEe is 22, byteF2G, byteF21G %sed to get Clength val%e e. @sing above calc%lated length, decide when to sto! collected bytes(22+length+4 i. 4 is for crc siEe in bytes ii. ength < !ayload siEe iii. 22 < siEe till length 0eld f. -nce eno%gh bytes collected for a !kts, call %n!ack method on byte? g. %t !kt in to mailbo) to connect to coverage, reference model h. Delete =%e%e contents, then ste!s atog contin%e for all the !ackets i. %t !kt in to mon2ckr6mb 17.ef model a. #onnected to r)6mon %sing mon2ref mailbo) b. 'ets !kts from mailbo), check each !kt good or corr%!ted c. "f good !%t !kt in to ?%e%e connecting to checker(ref2ckr6mb d. #ollected corr%!ted !kts in to a diHerent =%e%e 18.#hecker a. #hecker connected to reference model %sing ref2ckr6mb b. #hecker connected to t)6monitor %sing mon2ckr6mb c. 'et !kt from each mailbo), com!are !kts d. Iee! track of !assJfail in eth6cfg class
View more...
Comments