4.3. Simulation
The testbech povides basic fuctioality such as the statup ad waits fo lock ad sed ad eceive a few packets usig the ROM-based packet geeato.
Impotat: Befoe the simulatio, you must geeate tile-elated files ad specify the colocate assigmet i the .qsf file to map F-Tile Auto-Negotiatio ad Lik Taiig fo Etheet Itel® FPGA IP to the F-Tile Etheet Itel FPGA Had IP fo successful simulatio as show below.
- Apped the eth_f_hw.qsf file as show below:
- Use the followig sytax to colocate assigmets:
set_istace_assigmet -ame IP_COLOCATE -fom <ANLT IP hieachical path> -to <Etheet hieachical path> <tile type>
- Example:
set_istace_assigmet -ame IP_COLOCATE -fom k_dut|eth_alt_f_0 -to IP_INST[0].hw_ip_top|dut|eth_f_0 F_TILE
- Use the followig sytax to colocate assigmets:
- At the commad pompt, avigate to the hadwae_test_desig folde i you example desig:
cd <you_desig_path>/hadwae_test_desig
- Ru the followig commad to geeate eth_f_hw_tiles files:
quatus_tlg eth_f_hw
- At the commad pompt, chage to the testbech simulatio diectoy.
CD <desig_example_di>/ex_*G/sim
- Ru the IP setup simulatio:
ip-setup-simulatio --quatus-poject=../../hadwae_test_desig/eth_f_hw.qpf
- Add the followig maco to you simulatio u scipt fo AN/LT eabled desigs:
- Fo FGT
+defie+INTC_SIM_AN_LT_ENABLE
- Fo FHT
+defie+RTL
Note: I geeated desig example, the colocate assigmets ae aleady available i qsf file by default. Theefoe, steps 1 to 5 ca be skipped i the desig example. - Fo FGT
Figue 15. F-Tile Etheet Itel FPGA Had IP Simulatio Desig Example Block Diagam with Eabled Auto-Negotiatio ad Lik Taiig
The followig steps show the simulatio testbech flow:
- Asset global esets (i_st_ ad i_ecofig_st) to eset the F-Tile Etheet Itel FPGA Had IP ad F-Tile Auto-Negotiatio ad Lik Taiig fo Etheet Itel® FPGA IP.
- Wait util cofiguatio settigs load.
- Wait util esets ackowledgmet. The o_st_ack_ sigal goes low.
- Deassets the global esets, i_st_ ad i_ecofig_st.
- Wait util auto-egotiatio is complete. The data mode begis.
- Wait util lik taiig is complete.
- Wait util o_tx_laes_stable bit is set to 1, idicatig TX path is eady.
- Wait util o_x_pcs_eady bit is set to 1, idicatig RX path is eady.
- Istuct packet cliet to tasmit data. Wite hw_pc_ctl[0]=1'b1 to stat the packet geeato.
- Read TX packet data ifomatio fom 0x20 - 0x34 egistes. Read egiste i sequetial ode.
- Read RX packet data ifomatio fom 0x38 - 0x4C egistes. Read egiste i sequetial ode.
- Compae the coutes to esue 16 packets wee set ad eceived.
- Istuct packet cliet to stop data tasmissio. Wite hw_pc_ctl[2:0]=3'b100 to stop the packet geeato. Clea coutes.
- Pefom Avalo® memoy-mapped iteface test. Wite ad ead Etheet IP egistes.
- 0x104: Scatch egiste
- 0x108: IP soft eset egiste
- 0x214: TX MAX souce addess egiste [31:0]
- 0x218: TX MAX souce addess egiste [47:32]
- 0x21C: RX MAX fame size egiste
- Pefom Avalo® memoy-mapped iteface 2 test to ead ad wite opeatio tasceive egistes.
The followig sample output illustates a successful simulatio test u.
---TX eset sequece completed ----- ---RX eset sequece completed ----- ---Statig Data mode afte completig AN ---- ---IP_INST[ 0] Test 0; ---Total 16 packets to sed----- ------IP_INST[ 0] Stat pkt ge TX----- ------Checkig Packet TX/RX esult----- ------------ 16 packets Set; 0 packets Received-------- ------ALL 16 packets Set out--- ------------ 16 packets Set; 16 packets Received-------- ------ALL 16 packets Received--- ------TX/RX packet check OK--- ****Statig AVMM Read/Wite**** ====>MATCH! ReaddataValid = 1 Readdata = abcdef01 Expected_Readdata = abcdef01 ====>MATCH! ReaddataValid = 1 Readdata = 00000007 Expected_Readdata = 00000007 ====>MATCH! ReaddataValid = 1 Readdata = 00000000 Expected_Readdata = 00000000 ====>MATCH! ReaddataValid = 1 Readdata = 9d228c3a Expected_Readdata = 9d228c3a ====>MATCH! ReaddataValid = 1 Readdata = 4338b586 Expected_Readdata = 4338b586 ====>MATCH! ReaddataValid = 1 Readdata = deadc0de Expected_Readdata = deadc0de ====>MATCH! ReaddataValid = 1 Readdata = deadc0de Expected_Readdata = deadc0de ====>MATCH! ReaddataValid = 1 Readdata = 00000000 Expected_Readdata = 00000000 ====>MATCH! ReaddataValid = 1 Readdata = 22334455 Expected_Readdata = 22334455 ====>MATCH! ReaddataValid = 1 Readdata = 00000011 Expected_Readdata = 00000011 ====>MATCH! ReaddataValid = 1 Readdata = 000005ee Expected_Readdata = 000005ee ====>MATCH! ReaddataValid = 1 Readdata = 01234567 Expected_Readdata = 01234567 ====>MATCH! ReaddataValid = 1 Readdata = 000089ab Expected_Readdata = 000089ab 743830s Ty to access AVMM2 begi... 743830s wite 0x00000065 to xcv 0 addess 0x103c004 744795s Ty to access AVMM2 ed... 744890s ead fom addess 0x103c004 ====>MATCH! ReaddataValid = 1 Readdata = 00000065 Expected_Readdata = 00000065 ... 758740s Ty to access AVMM2 ed... 758840s Ty to access AVMM2 begi... 758840s wite 0x0000006c to xcv 7 addess 0x103c00b 759825s Ty to access AVMM2 ed... 759920s ead fom addess 0x103c00b ====>MATCH! ReaddataValid = 1 Readdata = 0000006c Expected_Readdata = 0000006c 760900s Ty to access AVMM2 ed... **** AVMM Read/Wite Opeatio Completed fo IP_INST[ 0]**** ** Testbech complete **
Note: The simulatio completio may take a loge time. To cofim the simulatio is pogessig successfully, veify the itemediate outputs fom the System Cosole such as bigig the base ad AN/LT IP out of esets, IP esettig sequece, Auto-egotiatio ad lik taiig auto-coectio completio, ad othes.