Forum Discussion

TNGUY312's avatar
TNGUY312
Icon for New Contributor rankNew Contributor
5 years ago

HPS Programming to FPGA

I have Altera Cyclone V Soc and currently using Quartus (Quartus Prime 17.1) Lite Edition. I want to create connection between HPS and FPGA. I want to generate FPGA signal output from HPS Linux.

6 Replies

  • AnilErinch_A_Intel's avatar
    AnilErinch_A_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    If you meant to take the FPGA signal to the HPS IO. You can use the AXI bus to read the data.

    AXI bus has to be memory mapped to Avalon. The master of the memory map has to be connected to HPS.

    Take Avalon memory mapped IP , connect the Master to the HPS . Connect slave to the custom RTL of avalon memory map in the FPGA.

    In C code you can capture the same data on the HPS side since it is memory mapped to the FPGA.

    Thanks and Regards

    Anil

  • TNGUY312's avatar
    TNGUY312
    Icon for New Contributor rankNew Contributor

    Thank you Anil. I tried to work around with it now.

    But do I need to use platform designer and recompile linux kernel of DE 10 nano ?

  • AnilErinch_A_Intel's avatar
    AnilErinch_A_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi

    You can use the platform designer to connect the IP, you don't have to recompile the kernel , but you will have to enable the bridges from the uboot , as per the commands given in the section FPGA Configuration from U-boot in the link provided above.

    You can try first without enabling the bridges and then try after enabling the bridges. Please let us know the results.

    Thanks and Regards

    Anil

  • TNGUY312's avatar
    TNGUY312
    Icon for New Contributor rankNew Contributor

    Anil,

    It sound complicated for me. I am newbie for socFPGA. Could you give me more detail or step by step instructions to it?

    My goal is write C code in Linux of HPS ARM Cortex 9 to pass the input value for PWM module which wrote and compiled in Quartus.

    Right now, I have already written PWM module and compile design it in Quartus. What are next steps I should to do in Linux (preloader, Uboot, Kernel, Dtbs, etc .. ), memory-map I/O and Qsys to let me write C code to access PWM module input?

    I did a lot of research online but I got a lot of confusing steps and none of them up to now get me into the successful step of controlling PWM output from HPS C code.

    One of the website I follow is https://bitlog.it/20170820_building_embedded_linux_for_the_terasic_de10-nano.html . But I didn't get success and get much confusing for my goal.

    I hope I could get your help for my goal. Thank you so much.