Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Improve Consistent/Deterministic refdeses #4

@amstan

Description

@amstan

I don't really want people to have to worry about refdeses inside the code. Part initializations should not be littered with refdes="Uwhatever".

Right now Context.autoname, beyond numbering parts automatically, also remembers what things were named (via the .refdes_mapping files). But it's hard to track parts via just the code, since there's nothing anchoring part instances across different runs to the place where they're defined.

Some traditional EDAs solve this problem by having an UUID for each part (which stays for the life of it, inside the source file), then layout tools don't even care if the refdeses change, as long as the UUID didn't. We don't have that luxury, unless we want things like R("100k", uuid="d4c1d842-705b-456d-9ee1-585463c11db2") everywhere.

The current implementation of Context.autoname uses the nearby lines contents around every part initialization to track a part. The problem with this is that a simple change to something maybe unrelated, or a simple change to the value of a part, causes the part's refdes to "pop" and get forgotten.

We need to track a few more things beyond just lines of code.

"Design doc"
https://github.com/google/pcbdl/wiki/Consistent-refdeses

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature, request or enhancementhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions