0 Replies Latest reply on Apr 23, 2019 8:08 PM by persilja

    Indexing buses from zero, and their interactions with repeated blocks

    persilja

      I have a multichannel ADC, whose inputs are named D0, D1, ... , i.e., indexed starting at 0. My thought was that it would be simplest for me to draw the signal processing stage for one channel, and then make a repeat of that block, so that each signal channel gets its own instance.

      Now, since the ADC's inputs are zero-indexed, it felt natural to keep that indexing for all buses to match the inputs. That is, bus index 0 running to input 0, and so on. Except that the input signal would be processed in signal processing block SPA, SPB, and so on.

      After fighting with that for a couple of hours, it seems to me that this may not really be possible to do, if I want the bus to split such that the outputs of the repeated block merge into a bus, with bus index 0 to the first block, and so on. Indeed, what seems to happen if I try this is that index 0 gets dropped, and I get an error that the bus index n is out of range.

       

      Rewriting the Repeat statement to be zero-indexed is of course a no-go. The last thing I tried, and it seemed to remove a bunch of errors, was to make sure I had no net name on the wire that connects the bus, with the repeated block. Unfortunately that just seems to mean that the block doesn't get connected.

       

      I don't know if I'm missing something obvious here, or if the simplest / only solution indeed is to assume that all buses that interacts with repeated blocks in circuit studio have be 1-indexed, no matter what?

       

      Thanks!