Author Topic: Repeat function on a harness in AD22?  (Read 2212 times)

0 Members and 1 Guest are viewing this topic.

Offline ANTALIFETopic starter

  • Frequent Contributor
  • **
  • Posts: 510
  • Country: au
  • ( ͡° ͜ʖ ͡°)
    • Muh Blog
Repeat function on a harness in AD22?
« on: June 03, 2022, 01:02:22 pm »
Hey All

Silly question, does anyone know if the more recent versions of Altium allow for repeat function on a harness?

Like my nets in repeated sheets are all generating as expected (with _1 or _2 in the end, see "3.png"), but I am not sure how to carry say LED-RGB-CH1-PWM_1 & LED-RGB-CH1-PWM_2 to given component pad from the harness (see "2.png"). I can try setting the nets manually but then Altium complains about duplicate net names during the project compile (see "4.png")

Also I know the fall-back is to replace the harness with individual ports, but just wanted to see if more recent versions of Altium have updated the handling of harnesses

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8537
  • Country: us
    • SiliconValleyGarage
Re: Repeat function on a harness in AD22?
« Reply #1 on: June 03, 2022, 03:02:14 pm »
don't use the repeat keyword on the right. repeat the block but not the harnesses. (assuming you want the same harness to go to all blocks)
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2689
  • Country: us
Re: Repeat function on a harness in AD22?
« Reply #2 on: June 03, 2022, 06:47:41 pm »
The 'Repeat' function really only works at one level, and when applied to a sheet entry it converts that single sheet entry into a bus.  There is specific syntax required for bus connections like that to work, which is in the Altium docs: https://www.altium.com/documentation/altium-designer/schematic-bus?version=19.1

However, it is not possible to create a bus of harnesses, or a bus of busses, so you can't meaningfully use the 'Repeat' function on a sheet entry that already represents a bus or harness.

If you want the same harness to go to each of the repeated sheets, then you can simply leave the 'Repeat' out of that sheet entry and then you'll get common connectivity across the repeated sheets.  If you want independent harnesses to go to each of the repeated sheets, well, you can't, sorry.  In that case you would need to either:

- Break the harness signals out into individual ports, with their own sheet entries. You can then use 'Repeat' to get busses of those entries, which you can then break out from the bus and marshal back into a harness, or just use busses throughout (it may be cleaner to do the marshalling in a dedicated sheet) or
- Eliminate the 'Repeat' from the sheet symbol, and simply place two separate sheet symbols, then run independent harnesses to each.  You *CAN* have a harness of harnesses, if that makes your connectivity simpler, but you will need to create that explicitly.  If you have a lot of these sheet instances then this can get cumbersome, but two is no problem.  You can always group sheets into blocks of some number on one sheet, and then have multiple instances of that group sheet in a higher level sheet, with all of the signals gathered up into a harness of harnesses if you want.

The specific errors you're getting here are, I think, related to the way that Altium resolves sheet connectivity.  When Altium compiles a hierarchical project it auto-creates specific net names using the prefix/suffix rules in your project options, and if one of those autogenerated names collides with a name you've directly assigned to a net the compilation can fail, and your connectivity can get all borked.  In your case, when Altium compiles the project it autogenerates the net name 'LED-RGB-CH1-PWM_1' by applying the '_1' suffix to the net name in the sheet, but then it sees that you already have a net called 'LED-RGB-CH1-PWM_1' via the net label you're trying to place, and that causes the duplicate net name error.  If you were to use a different net name then it would probably generate the right connectivity EXCEPT that it won't be different between the two sheets in the way that you want because 'Repeat' doesn't work on the harness entry.  So one of the two above approaches is the only way to get what you want AFAIK.
 

Offline ANTALIFETopic starter

  • Frequent Contributor
  • **
  • Posts: 510
  • Country: au
  • ( ͡° ͜ʖ ͡°)
    • Muh Blog
Re: Repeat function on a harness in AD22?
« Reply #3 on: June 04, 2022, 11:51:26 am »
don't use the repeat keyword on the right. repeat the block but not the harnesses. (assuming you want the same harness to go to all blocks)
Not quite, I am hoping to connect the "_1" & "_2" nets to separate locations like in "5.png" below


The 'Repeat' function really only works at one level, and when applied to a sheet entry it converts that single sheet entry into a bus.  There is specific syntax required for bus connections like that to work, which is in the Altium docs: https://www.altium.com/documentation/altium-designer/schematic-bus?version=19.1

However, it is not possible to create a bus of harnesses, or a bus of busses, so you can't meaningfully use the 'Repeat' function on a sheet entry that already represents a bus or harness.

If you want the same harness to go to each of the repeated sheets, then you can simply leave the 'Repeat' out of that sheet entry and then you'll get common connectivity across the repeated sheets.  If you want independent harnesses to go to each of the repeated sheets, well, you can't, sorry.  In that case you would need to either:

- Break the harness signals out into individual ports, with their own sheet entries. You can then use 'Repeat' to get busses of those entries, which you can then break out from the bus and marshal back into a harness, or just use busses throughout (it may be cleaner to do the marshalling in a dedicated sheet) or
- Eliminate the 'Repeat' from the sheet symbol, and simply place two separate sheet symbols, then run independent harnesses to each.  You *CAN* have a harness of harnesses, if that makes your connectivity simpler, but you will need to create that explicitly.  If you have a lot of these sheet instances then this can get cumbersome, but two is no problem.  You can always group sheets into blocks of some number on one sheet, and then have multiple instances of that group sheet in a higher level sheet, with all of the signals gathered up into a harness of harnesses if you want.

The specific errors you're getting here are, I think, related to the way that Altium resolves sheet connectivity.  When Altium compiles a hierarchical project it auto-creates specific net names using the prefix/suffix rules in your project options, and if one of those autogenerated names collides with a name you've directly assigned to a net the compilation can fail, and your connectivity can get all borked.  In your case, when Altium compiles the project it autogenerates the net name 'LED-RGB-CH1-PWM_1' by applying the '_1' suffix to the net name in the sheet, but then it sees that you already have a net called 'LED-RGB-CH1-PWM_1' via the net label you're trying to place, and that causes the duplicate net name error.  If you were to use a different net name then it would probably generate the right connectivity EXCEPT that it won't be different between the two sheets in the way that you want because 'Repeat' doesn't work on the harness entry.  So one of the two above approaches is the only way to get what you want AFAIK.
Thanks for the solid explanation, yea I though I would have to break the harness apart... But good point about using two separate sheet symbols, I'll give that a go first :D


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf