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

What is the final field in each entry of transdefs? #70

Open
finegeometer opened this issue Jun 26, 2023 · 1 comment
Open

What is the final field in each entry of transdefs? #70

finegeometer opened this issue Jun 26, 2023 · 1 comment

Comments

@finegeometer
Copy link

finegeometer commented Jun 26, 2023

In transdefs.js, each row has six fields. To the best of my understanding (I'm not an expert), this is what they do.

  • The transistor id.
  • The id of the wire connected to the transistor's gate.
  • The id of the wire connected to either the transistor's source.
  • The id of the wire connected to either the transistor's drain. (Actually, I believe the source and drain are interchangeable, but it's easier to give them names.)
  • The bounding box of the transistor, in the format x1 x2 y1 y2.
  • A mysterious field, which appears to be unused in the code.

This field always contains five numbers. What are they?

This question is relevant. I'm basically asking the one thing that didn't get answered there.


Here are my best guesses:

  1. The width of the connection between the polysilicon and the source.
  2. The width of the connection between the polysilicon and the drain.
  3. I have no idea.
  4. The number of straight segments between bends in the polysilicon.
  5. The total amount (area) of polysilicon inside the transistor.
@finegeometer
Copy link
Author

Looking back at this, I think my guesses are correct. In addition, I think the third number in the last field is the distance across the transistor, from the source to the drain.

All together, this last field seems to be the data required to compute the current through the transistors as a function of the voltages at the four terminals. This data would be useful if you wanted to simulate the circuit at an even lower level than chipsim.js does.


I could test these hypotheses myself could be tested via the following checks:

  • Are the first and second numbers roughly equal?
    • Is their difference, divided by the third number, a good predictor of how many bends in the transistor bend one way vs. the other?
    • Does the sign of that difference predict whether the source or drain is on the inside of the curve of the transistor?
  • Do the first and third numbers always multiply to roughly the fifth?

I checked these manually for the first two transistors, and they seem to work out.


In any case, can you please add a comment to transdefs.js, clearly explaining the data format?

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

No branches or pull requests

1 participant