This project is read-only.

Create Pcr

Dec 11, 2009 at 8:55 PM

Hi-

First, I wanted to express my appreciation for the great code you've provided.  It has come in very useful for me.  I have some STDF files that do not have PCR records, and I was wondering if you've implemented anything to create PCR's from the current data in the STDF file.  I noticed you mentioned something about repairing corrupt STDF files, but didn't know if you had implemented anything to create missing records.

 

Thanks!

Dec 11, 2009 at 11:06 PM

I'm glad you're finding it useful.  This is precisely the scenario for record filters.  Filters get a chance to consume the stream of records and inject/modify/replace/remove and otherwise manipulate it.  This isn't the "repair" feature talked about in various places (which is another very powerful feature), but it can be used for "repairing" a file that's missing certain data or records that can be generated by the existing records in the file, or eliminating a "quirk" that some STDF producers have.  There are a set of "built-in" filters in BuiltInFilters that you can take a look at to see how they work.  A record filter is basically a delegate that consumes an IEnumerable<StdfRecord> and returns one as well.  They are most easily created with iterator methods.

LinqToStdf doesn't contain a PCR creating filter out of the box for a couple of reasons, but it would be trivial to make one.  You can get an idea by looking at BuiltInFilters.MissingPcrSummaryFilter.  Instead of building the summary PCR info from the site-specific ones, you'd build it from the PRR results.  Then, in the same way as the MissingPcrSummaryFilter, if the MRR shows up and you haven't had any PCRs, you synthesize one and yield it before the MRR.  Keep in mind that if data sampling is turned on, your PCRs wouldn't be accurate.

Let me know if you have trouble creating the filter, and I can provide some more concrete guidance.

I'm curious what is producing STDFs without PCRs?

As an aside, I just noticed that none of the built-in filters seem to be setting the Synthesized bit on the records they generate.  This is a bug.  Whenever you inject records not present in the original stream, you should set this bit.  I think we added Synthesized for the error records after we had already coded the filters part.  I've created http://linqtostdf.codeplex.com/WorkItem/View.aspx?WorkItemId=5060 to track that.  Any records a filter creates should have this bit set. I may look into how that might be enforced, so people don't have to remember to do that.

Dec 11, 2009 at 11:11 PM

Oh, one other question.  Are these files incomplete, like they were truncated? or the tester crashed before it could output the whole file, or do they have an MRR?

Jan 7, 2010 at 10:52 PM

I'm sorry for the late response.  The holidays had moved me onto other things with work and I'm now just getting a chance to relook at this problem.  It is mostly a side project for my job.

The STDF is from a sub-contractor, and who knows what actually happened when they were creating the STDF.  It may have been a partial where they terminated the file without actually creating the summaries.

I appreciate the guidance and when I get time I will attempt to see if I can indeed recreate a PCR.  Thanks again.