Topic
  • 2 replies
  • Latest Post - ‏2016-06-27T15:29:01Z by e_shannon
Doan_Trinh
Doan_Trinh
2 Posts

Pinned topic CAPI Memcopy Demo Kit

‏2015-12-09T16:10:33Z |

Hello,

Link to the CAPI Memcopy Demo Kit folder can be found in the Bookmark section or in the Files (Folder) section.

Here are links to the latest doc and kit pair.

MemcopyDem​oKit.tar.g​z

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=a661532e-1ec6-442f-b753-4ebb2c8f861b#fullpageWidgetId=W2e466fff7d17_42f3_b2ec_24ebcb0a877c&file=c0140aea-80f2-4709-80ae-bf08736ad11b


CAPIDemoKi​t-final.pd​f Document.  This doc replaces the "Memcopy Demo Kit Documentation.docx".

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=a661532e-1ec6-442f-b753-4ebb2c8f861b#fullpageWidgetId=W2e466fff7d17_42f3_b2ec_24ebcb0a877c&file=bb6bd2ca-72f0-41d7-bf29-1232b09ab06e

Regards,

Trinh

Updated on 2015-12-09T16:11:17Z at 2015-12-09T16:11:17Z by Doan_Trinh
  • LuYong
    LuYong
    2 Posts

    Re: CAPI Memcopy Demo Kit

    ‏2016-05-11T04:12:44Z  

    Running Simulation in VCS:

    0. Download pslse to the same (parallel) directory to capi-memcpy.


    git clone https://github.com/ibm-capi/pslse

    1. set environment variables for VCS ($VCS_HOME and license info)


    setenv VCS_HOME $CTEPATH/tools/synopsys/vcs-mx/J-2014.12-SP2 
    if (-e ${VCS_HOME}/bin/environ.csh) then    
        source ${VCS_HOME}/bin/environ.csh
    endif

    setenv LM_LICENSE_FILE ......

    2. set VPI_USER_H_DIR in "pslse/afu_driver/src/Makefile"


    ifdef VCS_HOME
        VPI_USER_H_DIR=$(VCS_HOME)/include
    endif

    Then "make" pslse/afu_driver/src, pslse/pslse, pslse/libcxl,  consider BIT32=y if needed (refer to above post.)

    3. create a "vcs" directory, enter it, and make a "run.sh" like this:


    vcs -sverilog -PP -timescale=1ns/1ns -debug_all -l vcs.log +vpi \
    -file ../pslse/vcs_include ../pslse/afu_driver/src/afu_driver.c ../pslse/common/psl_interface.c \
    -f filelist

    4. "filelist" contains all AFU RTL files, plus "pslse/afu_driver/verilog/top.v" (see last line)


    ../capi-memcpy/memcpy/afu.v
    ../capi-memcpy/memcpy/dma.v
    ../capi-memcpy/memcpy/dw_parity.v
    ../capi-memcpy/memcpy/endian_swap.v
    ../capi-memcpy/memcpy/job.v
    ../capi-memcpy/memcpy/mmio.v
    ../capi-memcpy/memcpy/parity.v
    ../capi-memcpy/memcpy/ram.v
    ../capi-memcpy/memcpy/trace_array_muxout_template.v
    ../capi-memcpy/memcpy/trace_array_template.v
    ../pslse/afu_driver/verilog/top.v

    5. Modify "pslse/vcs_include"


    -CFLAGS '-I[absolute path to /pslse/common]'
    -CFLAGS '-I$VCS_HOME/`vcs -platform`/lib'
    -P ./pslse/afu_driver/verilog/top.tab

    6. If you want to generate waveform (optional), add something in pslse/afu_driver/verilog/top.v:


       initial
         begin
           $vcdpluson (0, top.a0);
         end

    7. go to directory "capi-memcpy", compile the application. You may have to include following in the Makefile for SIMULATION. (Different to running on real Power + FPGA hardware).


    -I../pslse/common -I../pslse/libcxl

    8. Open a terminal, go to directory "vcs", execute "run.sh"

    9. If compiling succeed, execute "./simv"  (which was generated by run.sh)

    10. Open another terminal, go to directory "pslse/pslse", execute "./pslse"

    11. Open the third terminal, go to directory "capi-memcpy", execute the application. Make sure "pslse_server.dat" is there (Content may be just "localhost:16384". ) And Application can be executed multiple times. Every time pslse will send a reset to AFU. 

    12. Ctrl-C to terminate "pslse" in the second terminal. "exit" to terminate vcs in the first terminal. Then you can use "dve" to open the waveform "vcdplus.vpd". For other VCS related options, please refer to Synopsys document.

    Updated on 2016-05-11T04:22:32Z at 2016-05-11T04:22:32Z by LuYong
  • e_shannon
    e_shannon
    1 Post

    Ask help for the CAPI Memcopy Demo Kit!

    ‏2016-06-27T15:29:01Z  

    Ask help for the CAPI Memcopy Demo Kit!
    Hi experts,
       I meet one big issue when run the CAPI Memcopy Demo Kit you offered in this site.
       The PSLSE is downloaded from the https://github.com/ibm-capi/pslse and the branch is master
       The event simulator is modelsim (questa 64bit 10.3.1).
       I change the localhost to my hostname in pslse_server.dat & shim_host.dat file.
    However the demo run unsuccessfully,It seems that the client disconnect while AFU is running to copy data.
    Do you meet the issue and know the root cause? It cost me too much time.

    First step I run the modelsim, source afu_questa_start.tcl ,sim successfully and then run -all to wait the pslse running.
    Below is error log .

    ---------------------------------------
    [root@CentOS7-64 pslse]# ./pslse
    INFO:PSLSE version 1.002 compiled @ Jun 27 2016 15:27:18
    INFO:PSLSE parm values:
        Seed     = 1461247482
        Timeout  = 10 seconds
        Response = 16%
        Paged    = 0%
        Reorder  = 90%
        Buffer   = 86%
    INFO:Attempting to connect AFU: afu0.0 @ CentOS7-64:32768
    PSL_SOCKET: Using PSL protocol level : 0.9908.1
    INFO:Clocking afu0.0
    INFO:Started PSLSE server, listening on CentOS7-64:16384
    INFO:Stopping clocks to afu0.0

    //noted by me: following is shown when run ./capi_memcpy -a -c 2 -t 1200 --v

    INFO:Connection from 192.168.108.177
    INFO:192.168.108.177 connected
    INFO:Attached client context 0: current attached clients = 1: client type = d

    INFO:Clocking afu0.0
    WARNING:get_bytes_silent:Socket disconnect on recv!
    INFO:192.168.108.177 client disconnect from afu0.0 context 0
    INFO:Detatched a client: current attached clients = 0

    INFO:Sending reset to AFU
    INFO:Stopping clocks to afu0.0

    -----------------------------------------
    [root@CentOS7-64 capi-memcpy]# ./capi_memcpy -a -c 2 -t 1200 --v
    INFO:Connecting to host 'CentOS7-64' port 16384
    expected vendor id: 4144, actual vendor id: 4144
    expected device id: 4445, actual device id: 4445
    Allocated memory at 0x0000000000923780:WED
    Allocated WED memory @ 0x0000000000923780
    Allocated memory at 0x0000000000923780:From
    Allocated From memory @ 0x0000000000923880
    Allocated memory at 0x0000000000923780:To
    Allocated To memory @ 0x0000000000925900
    Using seed 1467032376
    Starting copy of 8192 bytes from 0x0000000000923880 to 0x0000000000925900
    Mapping AFU registers...
    Trace Options register is 0000000081234567 after attach. Waiting for bit 32 to be a 1 (not including this read).
    Pre mmio state bit is 00000001
    Writing bit 0 of trace options register to 1 to end pre mmio stage
    AFU has started, waiting for AFU to finish...
    Trace Options register is 8000000001234567 shortly after start
    Post mmio state bit is 00000000
    ERROR! Trace options post mmio start bit still isn't set!

    ---------------------------------------------------

    2)In addtion there is another little issue.
     when run -all in modelsim, sometimes it don't show as below until ./pslse run:
     AFU Server is waiting for connection on CentOS7-64:32768
     But sometimes it can show even the ./pslse doesn't run.

     I also tar all the files in the attachment.

    Attachments

    Updated on 2016-06-27T15:43:20Z at 2016-06-27T15:43:20Z by e_shannon