Quantcast
Channel: Jason Andrews Blog
Viewing all articles
Browse latest Browse all 33813

Adexl Results Data Access for a Custom Results Export Format

$
0
0
Hello: I am trying to create a function that can be run with an adexl session that saves output data from a corner's run in a specific format. The first step is to get the data from the results. At the moment I am only interested in DC results but I may expand it later to include other results. Since I am running it over corners it seems like I have to open the overall results directory to the list of corners and their results directory number and then open the results directory from each corner individually to get the actual data for that corner. Is this necessary? Is there a way to get the data in a waveform or object over corners directly? Otherwise do I need to add a loop over the corners and open the result directory of each corner? Another way of approaching this would be to save the data as a csv and then open the csv and convert it to my format. Is there a SKILL function for running the "Save to CSV" function that you can run using the button to save the results table data in ADEXL? Also, my function for getting the waveform from the expression obtained from the output object seems overly complicated. Is there a simpler way to do this? I was able to simplify by using eval, but is there another function that handles referencing to other outputs, etc? What do famEval and awvEval do? When I use them on output->expression, they just give me back my input, a two element list with the access function and then the signal/net as the elements. e.g.(VS ("/DIO4/V_DIO")) /***************************************************************** * * * apExportResultStc * * * * Exports the current results in STC output format * * * *****************************************************************/ defun( apExportResultStc () let((sess hist resultsDir sdb tests outputs testId testSess testHist currExpr documentsDir) sess = axlGetWindowSession() unless(sess error("Could not find current ADE XL session")) hist = axlGetCurrentHistory(sess) when(zerop(hist) (error "Cannot open result - No current history")) ;resultsDir =axlGetHistoryResultsDir (hist) sdb = axlGetMainSetupDB(sess) documentsDir = strcat(axlGetSetupDBDir(sdb) "/documents") tests = axlGetTests(sdb) foreach(test cadr(tests) ; Make sure the history item had the test enabled testHist = axlGetTest(axlGetHistoryCheckpoint(hist) test) when((and testHist (null (zerop testHist)) (axlGetEnabled testHist)) testId = axlGetToolSession(sess test) testSess = asiGetSession(testId) outputs = asiGetOutputList(testSess) resultsDir = axlGetHistoryResultsDir(hist) resultsDir = strcat(resultsDir "/psf/" test "/psf") openResults(resultsDir test) foreach(output outputs ;(printf "Plotting %s\n" output~>name) currExpr = output~>expression when(((strlen(output~>name) > 3) && member(substring(output~>name 1 3) '("VDC" "IDC"))) currExpr = output~>expression currentWave = apGetWaveFromExpr(currExpr outputs) ; DO I need to iterate over the corners' results directories or is there a way to get the results from the main psf directory? ) ) ; foreach output ) ; when ) ; foreach test t ) ; let ) ; defun apExportResultStc ;apGetWaveFromExpr ; Returns the waveform for the provided output expression. ; ; INPUTS ; in - The expression of the output whose wave will be returned ; outputs - A list of all the outputs in the current test. procedure(apGetWaveFromExpr(in outputs) let((out) cond( (listp(in) out = eval(in) ;case(car(in) ;(VT out = v(cadr(in) ?result 'tran)) ;(VDC out = v(cadr(in) ?result 'dcOp)) ;(IT out = i(cadr(in) ?result 'tran)) ;(IDC out = i(cadr(in) ?result 'dcOp)) ;(VS out = v(cadr(in) ?result 'dcOp)) ;(IS out = i(cadr(in) ?result 'dcOp)) ;((nil) out = nil) ;(t out = nil ; error("Unrecognized expression")) ;) ) ;in is a symbol that is the name of another output (symbolp(in) && listp(cdr(nthelem(lindex(outputs~>name symbolToString(in)) outputs)~>expression)) (out = apGetWaveFromExpr((nthelem(lindex(outputs~>name symbolToString(in)) outputs)~>expression) outputs))) (t (out = nil))) out)) -Curtis

Viewing all articles
Browse latest Browse all 33813

Trending Articles