Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SKiDL Feature Request] add tag to fields automatically #251

Open
cyberhuman opened this issue Mar 6, 2025 · 5 comments
Open

[SKiDL Feature Request] add tag to fields automatically #251

cyberhuman opened this issue Mar 6, 2025 · 5 comments

Comments

@cyberhuman
Copy link

cyberhuman commented Mar 6, 2025

Is your feature request related to a problem? Please describe.
When using tags and leaving out reference designator assignment to SKiDL, after importing the netlist into KiCAD's PCBnew, it often happens that it's not clear which component on the board corresponds to which component in the code, especially if there are many components of the same type, with the same footprint, and with the same value.

Describe the solution you'd like
It would be useful to have each component's tag was visible in the list of fields. Then it would be easy to peek it quickly.

Describe alternatives you've considered
It's possible to add a field manually to each component but it feels cumbersome especially for frequently used components like resistors and capacitors.

Additional context
Add any other context or screenshots about the feature request here.

@devbisme
Copy link
Owner

devbisme commented Mar 7, 2025

I think this should be possible by automatically placing the tag into the part fields when the netlist is generated. I'll try it and let you know. Should we also create a field that contains the file and line number where the part was instantiated in the SKiDL code?

@devbisme
Copy link
Owner

devbisme commented Mar 9, 2025

Parts in a KiCad netlist now include fields "SKiDL tag" and "SKiDL Line" that contain the part's assigned tag and the file line where the part was instantiated.

Install the development branch to try this out.

@cyberhuman
Copy link
Author

@devbisme I just tested it and it works wonders, and very helpful! Thank you!
Just a small suggestion about the "SKiDL Line" field: IMO it should the file name should be relative and not absolute, at least by default. Maybe it's a matter of preference though.

@devbisme
Copy link
Owner

Absolute file names:

  • Are longer.
  • Remain valid even if the netlist file is moved out of the project directory.
  • Become invalid if the project directory is moved.
  • Can be selected along with the line number and opened in an editor.

Relative file names:

  • Are shorter.
  • Become unusable if the netlist file is moved out of the project directory.
  • Remain valid if the project directory is moved.
  • It appears to be more difficult to select and open a file if it is a relative path.

What is the main problem you experience with absolute file names?

@cyberhuman
Copy link
Author

I'd like to add that absolute file names:

  • Become unusable if the project is moved to a different directory. E.g. when moving it to a new directory structure or distributing the project to other users.
  • Leak information about the system where the file was generated; in particular the user name and the directory structure.

These are the two main problems I have with absolute file names.

If this feature is there to remain, it would be nice if it was possible to turn it on or off (either opt-in or opt-out is ok).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants