When You Desperately Need the Numeric ADE Outputs in Selectable Text

You've just done a simulation using the Assembler Debug Environment (the good old ADE-L) and now you want to capture the numbers as text so you can put them in a spreadsheet, or whatever..

In ADE, Outputs > Export.. dump as a CSV file

Then, in a terminal:

perl -n -e 'if( /^([^,]+),expr,([^,]+),t,.+,t,t?$/ ){ $op = $1; $opp = $1; $ex = $2; $op =~ s/\s/__/g; print "$op = $ex\n";  print q{printf("} . $opp . q{,%s\n",aelSuffixNotation(}.$op.q{))},"\n"; }' /tmp/desired_outs.csv > /tmp/outputs.il

After that, you just (in your CIW)

loadi "/tmp/outputs.il"

Let's break all of that down:

The regex in perl is looking for expressions (you don't want signals, etc) : "expr", but it's also looking for those that are set to "Yes, plot".



Comments

Popular posts from this blog

Plotting Device Parameters (gm, vdsat, etc) Vs Time or Temp

When You Want to Get Cycle-to-Cycle Jitter at PLL Output Due to the Reference Oscillator

HIdden States in Your Behavioral Model