Forum Discussion

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

Conduit(s)?

Hi, today I'm asking myself: Why do I need to use different conduits e.g. "conduit_end_0", "conduit_end_1", etc.? Or can I declare all my own signals with the same "conduit_end"? Or isn't there any difference at all?

For example, I have a simple Avalon MM Slave getting data from the HPS. The data is written to the FPGA and read from the FPGA by "writedata" with flag "write" and "readdata" with flag "read". I saw in Qsys, even the Avalon MM Slave template automatically assigns it all the name "conduit_end_0". So, is this correct, or should I create a separate "new Conduit" i.e. "conduit_end_1" for write? What happens if I create separate conduits for each signal? Is there a difference at all?

3 Replies

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

    Conduits are used for grouping signals.

    For example, lets say I have a bunch of control registers with a Qsys interface, and those control registers go off and control *different* things. For the sake of discussion, lets say my control registers implement a bit-banged SPI interface and a bit-banged I2C interface. The signals for those respective interfaces would be

    SPI = spi_selN, spi_sck, spi_mosi, spi_miso

    I2C = i2c_scl, i2c_sda_oe, i2s_sda_in

    In the _hw.tcl file, to group these interfaces, I would create two conduits, one called spi and the other called i2c. In a Qsys system, when you export these conduits, if you name them spi and i2c, then they retain that text as the signal prefix, i.e., the top-level Qsys ports will be named nicely.

    So, whether or not you use a single conduit or multiple is up to you.

    The fact that your conduit names are "conduit_end_0", "conduit_end_1" implies that your _hw.tcl was probably automatically generated. I'd recommend reading more about _hw.tcl scripts, and writing your own.

    Cheers,

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

    Hi Dave! Awesome explanation!!!

    I started already reading about the _hw.tcl, as I received this recommendation already. Writing my own?? I think this is still a bit too... but I'm getting there to understand it better, I think. So, I understand the naming of the conduits is really up to me, how I like to group my signals, e.g. a SPI group, and an I2C group, i.e. in my easy example, read/write which is all the same data conversation would be fine in the same conduit, anyway it doesn't make a practical difference to use plenty of conduit names. Great! Thx!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    anyway it doesn't make a practical difference to use plenty of conduit names

    --- Quote End ---

    That is correct.

    When I am developing a _hw.tcl file, I create a Qsys system, add the component, export the conduit ports, rename them, and then look at the HDL example. I then tweak things until I am happy with how things look (and hit F5 to get any _hw.tcl edits reloaded in Qsys).

    Cheers,

    Dave