Results 1 to 3 of 3

Thread: Routing of I2C0 pins on SoC

  1. #1
    Join Date
    Dec 2016
    Posts
    2
    Rep Power
    1

    Question Routing of I2C0 pins on SoC

    Hello everybody,

    I'm a new player in the FPGA field and begun my journey with the DE0 board with Cyclone V SE.
    I would appreciate if someone help me figure out the I2C routing inside this SoC. Here's the thing.

    I'm using Qsys to develop my top-level entity. In my Qsys project I put the hard processor system block (HPS).
    I right-click on the block, chose Edit, then select the Peripheral Pins tab. I scroll down to the I2C section and see four I2C controllers.
    I read in the Cyclone V Device Handbook that the HPS provides four I2C controllers - so far so good. They can be configured as:
    - FPGA (every controller) - I understand that the controller pins are routed to the FPGA,
    - HPS I/O Set 0 (every controller) - I understand that the SDA/SCL pins are routed to the external pins A19 and C18 of the SoC (GPIO55 and GPIO56),
    - HPS I/O Set 1 (controller 0 and 1) - I understand that the SDA/SCL pins are routed to the external pins A21 and K18 of the SoC (GPIO51 and GPIO52).


    The DE0 board comes equipped with an ADXL345 on board connected to the I2C0 pins (hard wired to pins C18 and A19 of the SoC).
    I have a Linux app that gets readings from the ADXL345 over I2C0 and prints them out on screen.

    Here's the mind blower (at least for me):
    No matter how I configure the I2C0 pins in Qsys (either as FPGA, HPS Set 0, HPS Set 1, or just leave them as GPIO's) the readings from the ADXL345 still get printed.
    How is this possible? Is there some superior routing in the Soc that always connects the HPS I2C0 to the C18 and A19 pins, no matter how I configure it in Qsys?
    It doesn't make much sense for me.

    Please help me out with it.

    Thanks in advance.
    Łukasz

  2. #2
    Join Date
    Sep 2016
    Posts
    154
    Rep Power
    1

    Default Re: Routing of I2C0 pins on SoC

    Hi, the pin configuration for the HPS (for example, routing the I2C to HPS I/O set 0) takes place when the HPS boots up. If you set the HPS to boot from SD card for example, the preloader located inside the SDCard will configure the I/O configuration. Even if you reprogram the FPGA (giving it a new sof) the HPS pin configuration still remains, unless you explicitly update the preloader in the SD card.

  3. #3
    Join Date
    Dec 2016
    Posts
    2
    Rep Power
    1

    Default Re: Routing of I2C0 pins on SoC

    Hi sunshine,

    thanks for pointing that out. Now that I have read through some materials on the preloader everything seems clear.

Similar Threads

  1. Achieving higher data-rates on Cyclone V pins - Balancing internal routing delays
    By karlovic in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: October 21st, 2016, 12:08 AM
  2. Fix Routing
    By d0nathan in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 0
    Last Post: May 25th, 2015, 05:57 AM
  3. Cyclone V I2C0 intialization...?
    By munna.shk in forum SoC Device Discussion
    Replies: 0
    Last Post: April 22nd, 2014, 02:37 AM
  4. Routing Help
    By ZenBarrier in forum Quartus II and EDA Tools Discussion
    Replies: 2
    Last Post: June 16th, 2013, 07:05 AM
  5. How to routing mannually between LAB?
    By wdmsimon in forum Quartus II and EDA Tools Discussion
    Replies: 3
    Last Post: July 12th, 2011, 07:19 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •