This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Accelerator Coherency Port

Note: This was originally posted on 25th January 2013 at http://forums.arm.com

Hi all,

I'm trying to use the AcceleratorCoherency Port of the ARM A9MPCORE in the Xilinx Zynq platform (http://www.xilinx.co...vices/index.htm).

1.[size="2"]  [/size]I have a functionaldesign where DMA in the FPGA region is able read and write data through the ACP.But is there direct way to verify that the data is coming from the cacheitself. Only option is to measure cache hits using the PL310 cache controllerevent registers againist a known data set size. But it's a not exact solution,as there may be cache hits in the L1 cache hits instead of L2.

2. As mentioned here (http://forums.arm.co...pcore-acp-port/),I downloaded the Ds5 tools to get access to the reference design, but there is nospecific target design for the ACP. The startup code that enables MMU, L1 cachesand SCU should be enough to make sure the ACP is getting the data from cache?

3.  Cacheable region setting can be set in the MMU table. Butdoes it guarantee exclusive access to a fixed memory region. Maybe if a linux osis running, then it can cause cache thrashing. Is there way to set priority forthe region?

4. Is there support for linux for this. As I understand the ACP istechnically a hardware thing and should be transparent to software. Only thing isto do would be to expose the memory region from kernel space to user space togive it to the DMA engine.

Thanks in advance.
Parents
  • Note: This was originally posted on 5th February 2013 at http://forums.arm.com

    Thanks. I already looked at Performance Monitor Unit (PMU). But the event monitoring unit doesn't seem to be activated. While profiling different user functions, it gives the same counter values. I used the following memory mapped control functions to enable the PMU. I followed the optimization3 example in the ds5 tools. But that uses cp15 register access instead of memory mapped control. Maybe something in the trustzone needs to be enabled for control and enable the PMU.


    void start_pmu(void)
    {
    X_mWriteReg(PMU_BASE,PMUSERENR,0x00000001); //Give User Access
    X_mWriteReg(PMU_BASE,PMCR,0x00000001); // Enable the PMU

    X_mWriteReg(PMU_BASE,PMXEVTYPER0,0x00000004); //Set event0
    X_mWriteReg(PMU_BASE,PMXEVTYPER1,0x00000003); //Set event1

    X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000001); //Enable Counter0
    X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000002); //Enable Counter1

    //X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000000); //CCT Enable

    X_mWriteReg(PMU_BASE,PMCR,0x00000004); //CCT reset
    X_mWriteReg(PMU_BASE,PMCR,0x00000002); //configuration reset

    }

    void stop_pmu(void)
    {
    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000000); //CCT reset


    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000001); //Disable Counter0
    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000002); //Disable Counter1

    u32 value0 = X_mReadReg(PMU_BASE,PMXEVCNTR0);
    u32 value1 = X_mReadReg(PMU_BASE,PMXEVCNTR1);
    u32 value2 = X_mReadReg(PMU_BASE,PMCCNTR);
    printf("Counter0: %d \n", value0);
    printf("Counter1: %d \n", value1);
    printf("Counter: %d \n", value2);

    }

Reply
  • Note: This was originally posted on 5th February 2013 at http://forums.arm.com

    Thanks. I already looked at Performance Monitor Unit (PMU). But the event monitoring unit doesn't seem to be activated. While profiling different user functions, it gives the same counter values. I used the following memory mapped control functions to enable the PMU. I followed the optimization3 example in the ds5 tools. But that uses cp15 register access instead of memory mapped control. Maybe something in the trustzone needs to be enabled for control and enable the PMU.


    void start_pmu(void)
    {
    X_mWriteReg(PMU_BASE,PMUSERENR,0x00000001); //Give User Access
    X_mWriteReg(PMU_BASE,PMCR,0x00000001); // Enable the PMU

    X_mWriteReg(PMU_BASE,PMXEVTYPER0,0x00000004); //Set event0
    X_mWriteReg(PMU_BASE,PMXEVTYPER1,0x00000003); //Set event1

    X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000001); //Enable Counter0
    X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000002); //Enable Counter1

    //X_mWriteReg(PMU_BASE,PMCNTENSET,0x80000000); //CCT Enable

    X_mWriteReg(PMU_BASE,PMCR,0x00000004); //CCT reset
    X_mWriteReg(PMU_BASE,PMCR,0x00000002); //configuration reset

    }

    void stop_pmu(void)
    {
    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000000); //CCT reset


    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000001); //Disable Counter0
    X_mWriteReg(PMU_BASE,PMCNTENCLR,0x80000002); //Disable Counter1

    u32 value0 = X_mReadReg(PMU_BASE,PMXEVCNTR0);
    u32 value1 = X_mReadReg(PMU_BASE,PMXEVCNTR1);
    u32 value2 = X_mReadReg(PMU_BASE,PMCCNTR);
    printf("Counter0: %d \n", value0);
    printf("Counter1: %d \n", value1);
    printf("Counter: %d \n", value2);

    }

Children
No data