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

SDR.py when convert to ATDF is missing SITE_NUM if SITE_NUM is empty, PRR missing P/F flag #46

Closed
jervinkhoo opened this issue Jun 13, 2022 · 3 comments · Fixed by #47
Closed
Assignees

Comments

@jervinkhoo
Copy link
Contributor

Tasks/Steps/Elements

I'm not sure if this is the right spot to report bugs, but after converting to ADTF I found that the SITE_NUM was missing, and the F flag is missing in PRR, see below screenshots:

from another converter:
image

from a perl converter:
image

from using this package:
image

I believe the SITE_NUM can be fix if add "or value == []" to line 2063 in STDR.py like so
image

here are a list of PRR that was converted to atdf string, seems like the P/F flag is missing
image

if not mistaken the logic is assume the invalid (PART_FLG bit 4 fail even tho bit 3 pass) as Fail too based on other "converters"

Versions checklist

  • Spyder version: >= 5
  • Python version: 3.7, 3.8, 3.9, 3.10
  • Qt version: all
  • PyQt version: all
  • Operating System name/version:
    • server : Ubuntu 20.04 Linux (aarch64 on RPI)
    • client : Windows/Linux/macOS
@seimit seimit self-assigned this Jun 18, 2022
@seimit
Copy link
Collaborator

seimit commented Jun 18, 2022

Hello Jervin,
Sorry for my late answer!
I will check the issue and will fix ASAP.
Thanks for the reporting!
Kind Regards,
Seimit

@seimit
Copy link
Collaborator

seimit commented Jun 18, 2022

Hello again,
So I checked with tests/test_PRR.py unit test and found:

  1. PASS/FAIL code field in the ATDF does do not depends on the SITE_NUM value, but depends on the bits 3 and 4 from the PRR PART_FLG field according the STDF/ATDF standards:
    when bits 3,4 = 1 (pass/fail is not valid), Pass/Fail code is F
    PRR:1||NAS4017|23|F|1|32767|2002|1001|I|Y|4236|SENSOR|B44BB44B
    when bits 3,4 = 0 (pass/fail is valid and we have PASS part), , Pass/Fail code is P
    PRR:1||NAS4017|23|P|1|32767|2002|1001|I||4236|SENSOR|B44BB44B
    bit 3 = 0, bit 4 = 1 (pass/fail is not valid and we have PASS part), , Pass/Fail code is F
    PRR:1||NAS4017|23|F|1|32767|2002|1001|I||4236|SENSOR|B44BB44B

  2. PRR have own to_atdf() function and I made the following change according the ATDF : "r. If the tester does not support parallel testing, use 1 in this field.". When SITE_NUM is missing I will set it to 1.

I already push the changes.

Let me know if this works for you. If not, please open the issue again and let me know what fix you want. Including your proposal for line 2063 in STDR.py, but I have to check it carefully, because it is affects all ATDF records which does not have own to_atdf() function.

Thank you for using the STDF library!

Kind Regards,
Seimit

@jervinkhoo
Copy link
Contributor Author

jervinkhoo commented Jun 20, 2022

hello, sorry there might be a miscommunication, i'm not sure if you fixed the right thing or not... it seems PRR.py is fixed and not SDR.py I actually raised 2 items here...

  1. regarding missing SITE_NUM in SDR.py:

the SITE_NUM issue I referred to was regarding SDR, where SITE_NUM did not reflect when the list is empty
image

in the screenshots showed earlier, you can see that when using Semi-ATE-STDF, a pipe is missing if SITE_NUM is an empty array.

regarding missing SITE_NUM in PRR, when using both stdf4_to_atdf2.pl (perl) and stdfatdf.exe (teradyne binaries)
from the same STDF file that has 4 sites(0,1,2,3),
image

i'm not sure if the following fix is accurate:

When SITE_NUM is missing I will set it to 1

however from my own internal testing
for a blank SITE_NUM in PRR, using stdf4_to_atdf2.pl (perl) will make an empty SITE_NUM to have the value of 0 and stdfatdf.exe (teradyne binaries) will make an empty SITE_NUM to have the value of 255.
perhaps reverting it to leaving it blank after conversion from blank is the most accurate?

attached here are the converted ATDFs in question, with *.atdf is converted using stdfatdf.exe (teradyne binaries) and *.txt is converted using stdf4_to_atdf2.pl (perl) , and the original STDF as well
stdfatdf.zip

  1. regarding the F flags in PRR:

in other converters I used, including stdf4_to_atdf2.pl (perl), stdfatdf.exe (teradyne binaries) and pystdf (python), an F flag is raised even if is invalid. Perhaps you can fact check this claim of mine? you can use my attached files to test.

@jervinkhoo jervinkhoo changed the title SDR.py when convert to ATDF is missing SITE_NUM if SITE_NUM is empty, PRR missing P/F flag 1. SDR.py when convert to ATDF is missing SITE_NUM if SITE_NUM is empty, 2. PRR missing P/F flag Jun 20, 2022
@jervinkhoo jervinkhoo changed the title 1. SDR.py when convert to ATDF is missing SITE_NUM if SITE_NUM is empty, 2. PRR missing P/F flag SDR.py when convert to ATDF is missing SITE_NUM if SITE_NUM is empty, PRR missing P/F flag Jun 20, 2022
jervinkhoo added a commit to jervinkhoo/STDF that referenced this issue Jun 20, 2022
@jervinkhoo jervinkhoo mentioned this issue Jun 20, 2022
3 tasks
seimit added a commit that referenced this issue Jun 20, 2022
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

Successfully merging a pull request may close this issue.

2 participants