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

patterns: Add STDFv4 pattern #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreasWallner
Copy link

Pattern

The Standard test data format is defined to keep track of testing data during chip manufacturing and used by almost all tester manufacturers. The official documentation can be found at http://www.kanwoda.com/wp-content/uploads/2015/05/std-spec.pdf.

I tested it with an example published by Roos (https://roos.com/docs/RBEH-AH4R8T?Open) but did not include that in the PR as they list it as "confidential and proprietary" (though I find "confidential" an interesting statement for smthg hosted publicly...).
I also tested it multiple internal files from other vendors, which I can't share. I'm checking with a colleague whether they can provide some small file that doesn't include any proprietary information but my hopes are not too high - so I opened the PR anyways. I hope this is still OK, would raise another PR if/when I get a file.

The one that could be improved here is the displaying of nibble fields, but I didn't figure out a nice way to do it, other then creating a section - which kind of explodes with the usual file sizes.
Also editing could be improved...

Checklist

[x] A pattern for this format doesn't exist yet (or this PR improves the existing one)
[x] The new pattern has been added to the relevant table in the Readme
[x] The new pattern has a description pragma (#pragma description My pattern Description here)
[x] The pattern was associated with all relevant MIME types (using #pragma MIME mime-type in the source code)
[ ] A test file for this pattern has been added to /tests/patterns/test_data

  • Try to keep this file below ~ 1 MB

@WerWolv
Copy link
Owner

WerWolv commented Dec 1, 2024

Great work, thanks a lot! Having a test file would be great so we can ensure the pattern doesn't break in the future, but I understand that these files are often confidential. I'm happy to merge a future PR if you manage to get a file.

The one that could be improved here is the displaying of nibble fields, but I didn't figure out a nice way to do it, other then creating a section - which kind of explodes with the usual file sizes.

For sub-byte fields you can easily use bitfields to display those values, without having to resort to sections: https://docs.werwolv.net/pattern-language/core-language/data-types#bitfields

Let me know if you want to improve the pattern with those or if I should merge it as is

@andreasWallner
Copy link
Author

andreasWallner commented Dec 2, 2024

I just got a test file from my colleague - will update the PR accordingly

I'll also have another look at the bitfields, didn't see how I could create an array of 4-bit values from those.
Currently I'm using

struct VarLenNibbles {
    u8 len;
    type::Nibbles n[(len+1)/2];
};

which means that it looks a bit weird when unfolding the array (bec. of the bitfield)

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 this pull request may close these issues.

2 participants