Results 1 to 6 of 6

Thread: How to use On-Chip Memory in GHRD on Atlas-SoC board

  1. #1
    Join Date
    Oct 2016
    Posts
    6
    Rep Power
    1

    Default How to use On-Chip Memory in GHRD on Atlas-SoC board

    Hello!

    I want to transfer some data from FPGA to program that is running under Linux in HPS part. I am using DE0-Nano-SoC with 5CSEMA4U23C6 and GHRD.
    GHRD already contains On-Chip Memory in Qsys project and this memory is connected with HPS via h2f_axi_master. I was trying to store 32'hF0F0F0F0 words from within ghrd.v and then read it in Linux by opening /dev/mem but it filled with zeros since 0xC0000000 that must be the base address of the memory untill +0x8000

    Below is the part of ghrd.v that I was added
    Code:
    adccounter addr_cnt(
           .clk(FPGA_CLK1_50)
           , .rst(~KEY[1])
           , .out(add)
       );
        
    defparam addr_cnt.W = 14;
    
    
    
    
    soc_system_onchip_memory2_0 m(
           .address(add)
           , .byteenable(4'b1111)
           , .chipselect(1'b1)
           , .clk(FPGA_CLK1_50)
           , .clken(1'b1)
           , .reset(hps_fpga_reset_n)
           , .reset_req(1'b0)
           , .write(1'b1)
           , .writedata(32'hF0F0F0F0)
           , .readdata(datain)
    );
    Whats wrong with such design? Why I can't get the data in HPS?
    Could anybody tell how to use this memory properly or point me to some examples?


    Thanks a lot in advance!

  2. #2
    Join Date
    Nov 2017
    Posts
    10
    Rep Power
    1

    Default Re: How to use On-Chip Memory in GHRD on Atlas-SoC board

    Hello, did you figure it out?

  3. #3
    Join Date
    Oct 2016
    Posts
    6
    Rep Power
    1

    Default Re: How to use On-Chip Memory in GHRD on Atlas-SoC board

    Hello!

    Yes I did, but I can't remember the solution exactly.

    Generaly I was just reperformed each step very carefully. I also remember that it was important to regenerate C libraries after design is generated and not to forget to use these new generated libraries in your C program.

    I'll try to remember the details and maybe repeate this again and I'll put the steps here

  4. #4
    Join Date
    Nov 2017
    Posts
    10
    Rep Power
    1

    Default Re: How to use On-Chip Memory in GHRD on Atlas-SoC board

    Wow, I still stack on it. On your code example you are using Second Instance of soc_system_onchip_memory2_0, because first one is created by Qsys in GHRD project by default. So, investigated situation by the in-system memory editor I'v found, that C code with base 0xC0000000 has access to the first instance, and your code makes second instance with these bytes (hF0F0F0F0) and there is no intersections.
    I will appreciate if you can provide any examples of your code.
    I want:

    1. write data from HPS to RAM
    2. read it from FPGA

    Many thanks!

  5. #5
    Join Date
    Oct 2016
    Posts
    6
    Rep Power
    1

    Default Re: How to use On-Chip Memory in GHRD on Atlas-SoC board

    OK, I'll do my best to find the code. Actually I was chaged the operation system on my work station since that time and this project is somewhere in the backup file. I can't just open it and copy the code here but give a little bit of time.

    I also not very happy with the solution I found

  6. #6
    Join Date
    Oct 2016
    Posts
    6
    Rep Power
    1

    Default Re: How to use On-Chip Memory in GHRD on Atlas-SoC board

    I also remembered that I became more happy when switched to lightweight AXI

Similar Threads

  1. Replace the GHRD SD MMC to be a smaller EMMC chip?
    By jamesbond in forum SoC Discussion
    Replies: 8
    Last Post: November 24th, 2015, 05:32 AM
  2. Speeding up the GHRD in an Arrow Development board?
    By martinoforcas in forum Development Kit Related
    Replies: 0
    Last Post: April 13th, 2014, 02:04 PM
  3. How much On-chip Memory on Startix III dev board?
    By fabs in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 0
    Last Post: December 19th, 2011, 12:36 AM
  4. Off Chip Memory Issue (DSP Dev board)
    By NathanJW in forum Development Kit Related
    Replies: 3
    Last Post: November 24th, 2009, 01:55 AM
  5. A problem with On-chip memory on UP3 board
    By phoeix in forum General Discussion Forum
    Replies: 0
    Last Post: November 1st, 2006, 07:02 AM

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
  •