Local label with direction/ hierachical labels without ERC warning?


#1

Hi,

I am working on a project with 15 schematic pages and I am wondering how to interconnect a higher density microcontroller with its peripherals without creating too much chaos in the schematic. All pins I would like to connect are either on one page(the function of the local label would be perfect here) or across hierarchical pages. The hierarchical case is easy to draw. But if I need just a local label, I have to do without the rendering of the signal direction. If I use the hierarchical label for an local interconnection the ERC complains and I have ca. 150 ERC errors/warnings because it doesn’t find the hierarchical pin on the schematic in the level above.

The workaround I am using now is to use global labels which A: have a direction and B: don’t cause ERC errors. But even this is not ideal: I am afraid to create unwanted connections across other sheets.

Do you have a hint how I can:

A: prevent ERC errors/warnings for hierarchical labels if there are no corresponding hierarchical pins or
B: get a direction symbol for my local label or
C: make a global label local?

thank you very much about your opinions and hints.


#2

You could try to use the NC marker in the parent schematic (blue X). But i never tried to use this on a hierarchical label.

You could encode the direction information in your naming scheme for local labels.

I don’t think there is a way to do that.
Why are global labels not the best idea for hierarchical designs?
If you use them you can not instantiate the same sheet multiple times. (why? well global labels are global. Which means you would connect stuff that you probably did not mean to connect.)
This reduces the reusability of your schematic modules.
Another danger is that you by accident give two labels the same name over different sheets and create a problem this way.


#3

Assuming you have a single MCU, then I would use global labels. I don’t really see how you could make an “accidental” connection.


#4

I am hoping that once there will exist a Kicad version which supports directional local labels. Do you know if there is something in the pipeline?


#5

I doubt it. The direction is not checked by KiCad. If you need direction, just use a global label.


#6

Why would a local label need to know the direction of the signal flow? it makes sense for hierarchical labels because they go off-sheet.


#7

It is easier to program the MCU if you know if the signal is an input or output pin. In my point of view the schematic is clearer and the functionality is more visible.

I think I will use global pins with a special naming scheme containing the sheet name.


#8

The programmer needs to know the function of the circuit, the direction should be obvious from that. Eg. an LED is an output, a switch is probably an input.

As a programmer, I’ve looked at many schematics, and would never rely on the labels, they are too often wrong. The CAD does not check the labels, and the electrons unfortunately do not know about the label :slight_smile:

To help the programmer, I would suggest using a scheme such as type_name_direction. For example BTN_STANDBY_IN or LED_STANDBY_OUT. This was from a real example, where the circuits were labelled something like PA13_STANDBY and PA17_STANDBY.


#9

I agree with “BTN_STANDBY_IN is better than A17_STANDBY”. You just have the problem that the signal at the other end is not an input anymore. From the button point of view it is an output.


#10

Yeah, but what the point of view of a super-intelligent shade of the color blue living on Venus? We should think of that.


#11

Very true. Directions on pins are not always easy.

In signal paths, very often resistors are inserted. If that is the case anyway, I suggest using passives with directed pins: I just posted about that here: Get the most out of ERC

Greets, Karl


#12