Forum Discussion

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

Question about Custom User HDL

Hi,

I try to implement a VHDL code as custom user HDL. The component that i need to release is an algorithme that determine the five greatest value for 16 input in one clock cycle. I compile this project with modelsim it wok fine and i synthesize it through quartus II.

Now i try to integrate it with my design through SOPC builder.

I add it as a new component as illustrate on the attached file. My question is how can i acces to each input or output for my design.

For example i need to write a value on input 0. And read this value on max1 output.

Please help me.:(

12 Replies

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

    Thank you for your reply et for this clarification,

    --- Quote Start ---

    Dude make a HDL block with inputs and outputs and your logic.

    --- Quote End ---

    I synthetize my HDL block and it work fine.

    --- Quote Start ---

    Then integrate it in your SOPC connecting the inputs(data, clock, reset) and outputs(5 highest numbers, maybe a valid signal?) in their respective signals. (take a look at the AVALON INTERFACE/SOPC user guide to see the correct name of the signals).

    --- Quote End ---

    And i read AVALON INTERFACE/SOPC "http://www.altera.com/literature/ug/ug_sopc_builder.pdf" but i don't arrived to understand it because isn't simple. If it is possible that you give me a small information or to clarify this. If isn't possible, can your reply to me for the following question:

    1- I use avalon memory mapped slave, when i relate each input and output for the following connect i get these two message:

    warning: avalon_slave_0: signal read data appears 4 times(only once is allowed)

    error: avalon_slave_0 has write interface but no witre control.

    what can i do with this message.

    --- Quote Start ---

    However the calculus won't be done in one clock cycle, it will take X clock cycles + X clock cycle to perform a read in the NIOS2 (i think the total clock cycle number will be small enough for you.. it will probably take 5~10 clock cycles)

    --- Quote End ---

    Thank yoy for this inofrmation.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You can only have one read data signal, use the adress signal to multiplex multiples data that you want to read

    you select a signal as a write interface but you didnt do any control on it