Forum Discussion

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

The problem is about how to control the circuit of New component of SOPC Builder

First, Thanks everyone's help.

I used the tool of new component of SOPC builder to combine mycircuit, the figure is my setting of interface.

My problem is how to control the data of pwm_hall.

May I control the signal of pwm_hall_period, pwm_hall_data and hall_n_to_pre.

For example could I write a function to assign the data?

Like this "IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, a)"

Does anyone can help me?

In my problem, Should I define anything in my pwm_hall.h??

if I should define that i said, How to define that does anyone can tell me??

Thank you very much.

2 Replies

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

    You need to create an Avalon slave interface and some logic in your circuit to decode the Avalon signals to set up the correct registers. You can't have your signals directly controlled by the CPU without some glue logic.

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

    --- Quote Start ---

    You need to create an Avalon slave interface and some logic in your circuit to decode the Avalon signals to set up the correct registers. You can't have your signals directly controlled by the CPU without some glue logic.

    --- Quote End ---

    Thank you for your suggest.

    I got it.