<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Linux Embedded ChallengeのトピックDifficulties to establish a communication between a Spartan 6 with a Mini PCIe bus and ARM-Cortex A9 (IMX.6 architecture)</title>
    <link>https://community.nxp.com/t5/Linux-Embedded-Challenge/Difficulties-to-establish-a-communication-between-a-Spartan-6/m-p/840920#M90</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Hi&amp;nbsp;!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I’m&amp;nbsp; trying to establish a communication between a&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;Spartan 6 FPGA with a Mini PCIe bus&lt;/STRONG&gt;&amp;nbsp;and a board containing an&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;ARM-cortex A9 (IMX6 architecture&lt;/STRONG&gt;) running Linux kernel 4.13.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I want to use&amp;nbsp;&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;RIFFA&lt;/STRONG&gt;&amp;nbsp;to communicate between the Spartan 6 FPGA and the Linux embeeded in the ARM processor using PCIe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;In order to do that, I first followed all the instructions in the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;RIFFA&amp;nbsp;&lt;/STRONG&gt;documentation&lt;STRONG style="font-weight: bold;"&gt;&amp;nbsp;&lt;/STRONG&gt;and established a connection between a Spartan 6 FPGA bord with PCIe bus (&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;not Mini PCIe&lt;/STRONG&gt;) and a host computer with a Windows OS and a x86 architecture , and everything was fine when using the&amp;nbsp;&amp;nbsp;testuils.c&amp;nbsp;&amp;nbsp;file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;&amp;nbsp;But,&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;my main goal is to establish a connection between a Spartan 6 FPGA board with a Mini PCIe and a board with ARM cortex A9 processor&lt;/STRONG&gt;. So I, generated the bit file supplied in the RIFFA Master folder and&amp;nbsp;&amp;nbsp;I flashed the PROM of the FPGA in order to get bit file in the FPGA before booting the board with the embeeded Linux, then I checked the good&amp;nbsp;&amp;nbsp;connection between the FPGA and the embeeded Linux using the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;lspci&lt;/STRONG&gt;&amp;nbsp;instruction and everything seemed to be ok at that point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Now, the problem that I’m facing is that when I execute the testutil. code with a “0” argument it gives me the right informations about the my FPGA ( Vendor ID, Device ID, ….).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;But, when I compile the testutils. code with a “ 1&amp;nbsp;&amp;nbsp;0 “ arguments , 1 stands for “reset”&amp;nbsp;&amp;nbsp;and 0 for “fpga ID”, it gives me a segmentation fault, so I tried to debug the code, I found the segmentation fault came from the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;read_reg&lt;/STRONG&gt;&amp;nbsp;function (from riffa_driver.c) that calls the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;readl&amp;nbsp;&lt;/STRONG&gt;function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;After a quick search on the internet, I found that the readl function tries to read from a virtual address which is&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;sc-&amp;gt;bar0&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Meanwhile, during boot time when initializing Riffa, the driver calls&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;read_reg&lt;/STRONG&gt;&amp;nbsp;function with the same argument and it&amp;nbsp;&amp;nbsp;doesn’t give any fault.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I also noticed that the base address register BAR0 was 0xFFFFFC00 when I wasconfiguring Xilinx PCIe&amp;nbsp;&amp;nbsp;IP core and that Linux gives the&amp;nbsp;&amp;nbsp;FPGA&amp;nbsp;&amp;nbsp;the address BAR0 0x01100000&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;Is it normal that these two addresses are different ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;What are the changes that I should make in order to adapt RIFFA from x86&amp;nbsp;&amp;nbsp;to the ARM processor ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;You can find below the screenshot of the error message:&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="unnamed.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61853i8F75E05AD7B9C3F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="unnamed.png" alt="unnamed.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="unnamed (1).png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61895iBBB7E05C133D2C2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="unnamed (1).png" alt="unnamed (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2018 15:04:57 GMT</pubDate>
    <dc:creator>omar_hocine_ben</dc:creator>
    <dc:date>2018-08-09T15:04:57Z</dc:date>
    <item>
      <title>Difficulties to establish a communication between a Spartan 6 with a Mini PCIe bus and ARM-Cortex A9 (IMX.6 architecture)</title>
      <link>https://community.nxp.com/t5/Linux-Embedded-Challenge/Difficulties-to-establish-a-communication-between-a-Spartan-6/m-p/840920#M90</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Hi&amp;nbsp;!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I’m&amp;nbsp; trying to establish a communication between a&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;Spartan 6 FPGA with a Mini PCIe bus&lt;/STRONG&gt;&amp;nbsp;and a board containing an&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;ARM-cortex A9 (IMX6 architecture&lt;/STRONG&gt;) running Linux kernel 4.13.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I want to use&amp;nbsp;&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;RIFFA&lt;/STRONG&gt;&amp;nbsp;to communicate between the Spartan 6 FPGA and the Linux embeeded in the ARM processor using PCIe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;In order to do that, I first followed all the instructions in the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;RIFFA&amp;nbsp;&lt;/STRONG&gt;documentation&lt;STRONG style="font-weight: bold;"&gt;&amp;nbsp;&lt;/STRONG&gt;and established a connection between a Spartan 6 FPGA bord with PCIe bus (&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;not Mini PCIe&lt;/STRONG&gt;) and a host computer with a Windows OS and a x86 architecture , and everything was fine when using the&amp;nbsp;&amp;nbsp;testuils.c&amp;nbsp;&amp;nbsp;file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;&amp;nbsp;But,&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;my main goal is to establish a connection between a Spartan 6 FPGA board with a Mini PCIe and a board with ARM cortex A9 processor&lt;/STRONG&gt;. So I, generated the bit file supplied in the RIFFA Master folder and&amp;nbsp;&amp;nbsp;I flashed the PROM of the FPGA in order to get bit file in the FPGA before booting the board with the embeeded Linux, then I checked the good&amp;nbsp;&amp;nbsp;connection between the FPGA and the embeeded Linux using the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;lspci&lt;/STRONG&gt;&amp;nbsp;instruction and everything seemed to be ok at that point.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Now, the problem that I’m facing is that when I execute the testutil. code with a “0” argument it gives me the right informations about the my FPGA ( Vendor ID, Device ID, ….).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;But, when I compile the testutils. code with a “ 1&amp;nbsp;&amp;nbsp;0 “ arguments , 1 stands for “reset”&amp;nbsp;&amp;nbsp;and 0 for “fpga ID”, it gives me a segmentation fault, so I tried to debug the code, I found the segmentation fault came from the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;read_reg&lt;/STRONG&gt;&amp;nbsp;function (from riffa_driver.c) that calls the&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;readl&amp;nbsp;&lt;/STRONG&gt;function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;After a quick search on the internet, I found that the readl function tries to read from a virtual address which is&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;sc-&amp;gt;bar0&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;Meanwhile, during boot time when initializing Riffa, the driver calls&amp;nbsp;&lt;STRONG style="font-weight: bold;"&gt;read_reg&lt;/STRONG&gt;&amp;nbsp;function with the same argument and it&amp;nbsp;&amp;nbsp;doesn’t give any fault.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;I also noticed that the base address register BAR0 was 0xFFFFFC00 when I wasconfiguring Xilinx PCIe&amp;nbsp;&amp;nbsp;IP core and that Linux gives the&amp;nbsp;&amp;nbsp;FPGA&amp;nbsp;&amp;nbsp;the address BAR0 0x01100000&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;Is it normal that these two addresses are different ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;SPAN&gt;What are the changes that I should make in order to adapt RIFFA from x86&amp;nbsp;&amp;nbsp;to the ARM processor ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;You can find below the screenshot of the error message:&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="unnamed.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61853i8F75E05AD7B9C3F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="unnamed.png" alt="unnamed.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="unnamed (1).png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/61895iBBB7E05C133D2C2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="unnamed (1).png" alt="unnamed (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 15:04:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Linux-Embedded-Challenge/Difficulties-to-establish-a-communication-between-a-Spartan-6/m-p/840920#M90</guid>
      <dc:creator>omar_hocine_ben</dc:creator>
      <dc:date>2018-08-09T15:04:57Z</dc:date>
    </item>
  </channel>
</rss>

