Code Monkey home page Code Monkey logo

zcu111-emio's Introduction

ZCU111 EMIO控制pmod腳位的範例。

開發工具:Vivado2019.1,SDK2019.1,ZCU111開發板與相關資料。
  1. 在zynq系列的開發板中有三種GPIO腳位。
    1. MIO
      腳位直接從PS端拉出,且接線已經固定。
    2. EMIO
      通過PL部份擴展(拉線的意思),接到指定腳位。
    3. AXI_GPIO
      透過AXI界面與PS通訊。
  2. 開啟Vivado,在Block design中加入Zynq UltraScale+ MPSoC的IP,並按Run Block Automation採用預設設定,設定好如下圖。

  1. 雙擊MPSoC,將不需要的設定拿掉(下左圖),也就是PS-PL界面與中斷,並開啟EMIO的功能(下右圖),在這範例中只需要2個EMIO腳位。

  1. 在MPSoC block的GPIO上按滑鼠右鍵,選擇Make External選項,此時接腳會自動拉出。

  1. 將剛剛做的Block design使用Validate Design(f6)確認沒問題。

  1. 在Source視窗且Hierarchy下執行Create HDL Wrapper,產出*.v或*.vhd檔案。

  1. 在Constraints目錄上按右鍵,Add Source加入一個約束檔top.xdc,主要的功用是指定EMIO與實際晶片的pin腳有所對應。

  1. 在Flow Navigator的PROGRAM AND DEBUG的項目下,按Generate Bistream,然後發揮耐心等待執行完成。

  1. 完成後會跳出一個視窗,請選Open Implemented Design後按OK。

  1. 主選單File/Export/Export Hardware,Include bitstream選項要勾。

  1. 主選單File/Launch SDK,開啟SDK軟體來寫PS的程式碼。

  1. 步驟11結束後會開啟SDK2019.1,以下操作都在SDK軟體中,首先會看到左方Project Explorer會有步驟10匯出的資料夾,內容名稱不見得一樣。

  1. 按組合鍵SHIFT+ALT+N,在資料夾上會跑出選單,選擇Application Project,填寫應用程式的名稱,並按Next>。

  1. 選擇Empty Application,並按Finish。

  1. 在所建立的Application Project資料夾裡找到src資料夾,點滑鼠右鍵New一個File取名為main.c

  1. 可以開始寫PS的程式。

  2. 電腦連上FPGA(Jtag),燒bit檔案到FPGA,Xilinx/Program FPGA,按下Program便會開始燒錄。

  1. 在Application Project資料夾上點滑鼠右鍵,在Run As找到Launch on Hardware(GDB),點擊就會開始燒入PS程式,並由ZCU111的CPU執行。

zcu111-emio's People

Contributors

weirenxue avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.