Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Programming NIOSII interfaced with custom component, using Avalon MM Interface

  1. #21
    Join Date
    Nov 2013
    Posts
    88
    Rep Power
    1

    Default Re: Programming NIOSII interfaced with custom component, using Avalon MM Interface

    For performance evaluation, I used the below template:

    PERF_RESET(PERFORMANCE_COUNTER_0_BASE);
    PERF_START_MEASURING(PERFORMANCE_COUNTER_0_BASE);
    PERF_BEGIN(PERFORMANCE_COUNTER_0_BASE,1);

    // Here is the code block to be tested.
    // I wanted to know the cycles consumed during this block.

    PERF_END(PERFORMANCE_COUNTER_0_BASE,1);
    PERF_STOP_MEASURING(PERFORMANCE_COUNTER_0_BASE);
    long time;
    time = perf_get_section_time(PERFORMANCE_COUNTER_0_BASE, 1);
    printf("\n\nTotal cycles consumed in FIR calculation = %ld cycles\n", time);

    This returns the no of clock cycles consumed. And by knowing the oscillator frequency, we can calcuate the total time consumed in the block.

    Thanks,
    Anuj

  2. #22
    Join Date
    Nov 2013
    Posts
    88
    Rep Power
    1

    Default Re: Programming NIOSII interfaced with custom component, using Avalon MM Interface

    I implemented 16 Bit 128 Tap FIR Filter with two approach:

    First with implementing the FIR on NIOS II core using C language (Software FIR Design).
    Second with implementing FIR as Hardware Accelerator on FPGA which get i/p values & coeff from NIOS II core and returns the the result to NIOS II core (Hardware FIR Design).

    Below are the links to project. Hope it helps.

    Software FIR Design:
    https://www.youtube.com/watch?v=SjJBU-LHZPc

    Hardware FIR Design:
    https://www.youtube.com/watch?v=-EgWTMWG0KU

  3. #23
    Join Date
    Jan 2015
    Posts
    16
    Rep Power
    1

    Default Re: Programming NIOSII interfaced with custom component, using Avalon MM Interface

    Hello everyone

    I need to sent 5 different 16 bits data in 5 five clock cycles to my costum component.
    My Altera board is driven by a 50MHz oscillator (a period of 0.02 Ás).

    so should I write

    IOWR_16DIRECT(BASE , OFFSET, DATA_1);
    usleep(0.02);
    IOWR_16DIRECT(BASE , OFFSET, DATA_2);
    usleep(0.02);
    .
    .
    .
    IOWR_16DIRECT(BASE , OFFSET, DATA_5);

  4. #24
    Join Date
    Feb 2015
    Posts
    6
    Rep Power
    1

    Default Re: Programming NIOSII interfaced with custom component, using Avalon MM Interface

    Quote Originally Posted by anuj121990 View Post
    Hi,
    I succeeded in implementing the system on board. My custom component is a 128 tap FIR filter which is to be started by NIOS and stimuli is also provided by nios. I made the custom component in Qsys and implemented the system.
    Now i am able to write the c code successfully on the NIOS without any tool errors.

    But, i am not able to communicate properly. Below is my code:

    int var =1234;
    IOWR(20496,0,11);

    printf("%d\n",var); //prints 1234

    var = IORD(20496,0);

    printf("%d\n",var); // prints 0

    When I am reading the same address and offset, it gives 0.
    HI,

    I'm currently facing the issues as mentioned in the quote above.
    May I know the way you resolve it?

    Thanks
    HY

Similar Threads

  1. Relationship among Niosii, Avalon MM interface, DMA etc..
    By nervecell_23 in forum General Discussion Forum
    Replies: 7
    Last Post: January 21st, 2016, 03:28 AM
  2. Avalon -> Dual Port RAM -> custom hardware interface
    By markaren1 in forum General Discussion Forum
    Replies: 2
    Last Post: January 26th, 2013, 02:47 PM
  3. Burstcount value in a master interface custom component
    By dtromson in forum Quartus II and EDA Tools Discussion
    Replies: 0
    Last Post: April 25th, 2012, 06:44 AM
  4. Avalon-MM Tristate Bridge and custom component
    By neptunus in forum General Discussion Forum
    Replies: 1
    Last Post: October 9th, 2011, 11:41 AM
  5. DDR2 Memory Interfaced as Avalon Slave
    By sheshikanth_2000 in forum IP Discussion
    Replies: 1
    Last Post: June 26th, 2008, 02:55 PM

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
  •