Cov txheej txheem:

Tsim ntawm I2C Master hauv VHDL: 5 Cov Kauj Ruam
Tsim ntawm I2C Master hauv VHDL: 5 Cov Kauj Ruam

Video: Tsim ntawm I2C Master hauv VHDL: 5 Cov Kauj Ruam

Video: Tsim ntawm I2C Master hauv VHDL: 5 Cov Kauj Ruam
Video: Tsim Nyog Kuv Yog Tus Tu Siab - Tsom Xyooj Nkauj Tawm Tshiab 2022 2024, Kaum ib hlis
Anonim
Tsim ntawm I2C Master hauv VHDL
Tsim ntawm I2C Master hauv VHDL

Hauv cov lus qhia no, Tsim Tus Qauv I2C yooj yim hauv VHDL tau tham.

NCO TSEG: nyem rau txhua daim duab kom pom tag nrho cov duab

Kauj Ruam 1: I2C Bus Overview

• Sawv ntsug rau Kev Sib Koom Ua Ke.

• Synchronous, Ib nrab duplex.

• Ob Txoj Kev Sib Txuas Hlau - SDA thiab SCL.

• SDA - Serial Data line tswj los ntawm Master thiab Slave

• SCL - Serial Moos tsim los ntawm Master

• Multi-master, Multi-qhev raws tu qauv.

• Ob hom - 100 kbits/sec thiab 400 kbits/sec: qeeb thiab nrawm.

Kauj ruam 2: RTL Tsim hauv VHDL

Tsim Cov Qauv ntawm peb tus I2C Master

  • 8-ntsis cov ntaub ntawv thav duab.
  • SCL uni-directional tswj nkaus xwb.
  • 7-ntsis qhev chaw nyob.
  • Txhawb ob hom qeeb thiab nrawm.
  • Ib Xib Hwb, Ntau tus qhev.
  • Ua tiav nrog thawj I2C qhov tshwj xeeb los ntawm Philips.

Ntshiab RTL txoj cai tau siv. Yog li IP yooj yim nqa tau hla txhua FPGAs. Kev cog lus me me FSM raws li tsim siv sab hauv tsim lub moos kom ntseeg tau thaj chaw zoo thiab ua tau zoo.

Kauj Ruam 3: Simulation thiab Xeem

Xeem Ib puag ncig

  • Kev ua haujlwm sim thiab ntsuas siv tus neeg thib peb I2C Slave IP.
  • Synthesized siv Xilinx Vivado cov cuab yeej teeb tsa.
  • Ua raws thiab ntsuas ntawm Artix-7 FPGA pawg thawj coj.
  • Lub sijhawm txheeb xyuas qhov tseeb tsim rau 100 MHz.
  • Kuaj cov qauv ntawm DSO/CRO.
  • Ua tiav kev sim sib txuas lus nrog Arduino UNO ua I2C Slave.

Kauj Ruam 4: Cov Lus Tseem Ceeb

  • Thaum sim Master siv I2C Slave IP, teeb tsa tus lej qhev raws li qhov koj xav tau. Tej zaum koj yuav xav hloov lub moos zaus zaus thiab chaw nyob qhev. Lub moos zaus yuav tsum tau teeb tsa hauv Master code ib yam.
  • Thaum nyob ntawm pawg thawj coj saib, tsis txhob hnov qab rub tawm cov neeg tawm tsam raws li SDA kab yog qhov tso tawm ntau !!! Txheeb xyuas google rau kev pom zoo rub tawm tus tiv thaiv rau txawv i2c nrawm. Kuv siv 2.2K rau 100 kHz.
  • Yog tias tsis siv lub rooj ntev zaum simulating tus Xib Hwb ntawm nws tus kheej, ua tib zoo sim teeb liab SDA, vim nws yog lub cim qhia ob-taw qhia (inout) teeb liab. Nws muaj ob tus tsav tsheb, sab tswv thiab sab qhev. Koj yuav tsum paub thaum twg 'yuam kev' thiab thaum twg rau 'tsis ua haujlwm'.
  • SCL yog ib txoj kab tsis muaj kab ke. Tsis xav tau rub tawm.
  • Thov mus hla tus IP Cov Ntaub Ntawv kom ntxaws.

Kauj ruam 5: Cov ntaub ntawv txuas nrog

  • Txhua RTL cov lej ntawm I2C Master.
  • Xeem lub rooj ntev zaum, I2C Slave cov lej ib yam nkaus, rau kev sim.
  • Cov Ntaub Ntawv IP.

Rau ib qho lus nug, thov hu rau kuv:

Muj Raj

ua raws kuv:

Rau cov lus nug, tiv toj: [email protected]

Pom zoo: