Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

accesing a custom component

Hello every body;

I have created my custom component, it have an avalon slave interface, it have 2 slave registers, how can i access these registers if i have the base address, i mean that what is the order of these internal registers,

another question is if this component takes 20 clk cycle to finish, how can i take its output when it just finish.

Thanks

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I have created my custom component, it have an avalon slave interface, it have 2 slave registers, how can i access these registers if i have the base address, i mean that what is the order of these internal registers,

    --- Quote End ---

    Every register you implement in the custom component is supposed to have an address (or offset) inside the MM slave address range. This depends only on your hw design.

    --- Quote Start ---

    another question is if this component takes 20 clk cycle to finish, how can i take its output when it just finish.

    --- Quote End ---

    Three options:

    - wait at least 20 clk with a sw cycle

    - implement a status register with a completion flag bit: then poll the bit until the it signals your data is ready; this is especially useful when the process duration is not constant

    - route the completion signal to an irq