Studying when starting the integration

Requirement

You need to have:
  • a test bench with the full analog processing chain
  • the values for t0 should run over 25ns
  • the values for the eventId sould run over 50 events (these values can be increased but you should then modify the python scripts and generate your own verilog file)
  • the runId should be parameterizable and setted to 0
  • python with pylab installed
  • the SiPM model had to be driven by a merged mirco-file generated events (you can download vaT.va on https://lbredmine.cern.ch/projects/pacific/files). It handle directly all the runId on 50 events

Ocean script

The ocean script is given bellow. You have to modify the project and results dir, the target cellview if you want to use it. Alternately, you can generate the ocean script within oceanxl and the add the end lines to save the results.

;====================== Set to XL mode =========================================
ocnSetXLMode()
ocnxlProjectDir( "/simulation/chanal/ProjDir2" )
ocnxlTargetCellView( "herve" "simu_channel_complet_ampli_CC_Ham" "adexl2" )
ocnxlResultsLocation( "/simul/simart/chanal/SaveDir2" )
ocnxlSimResultsLocation( "/simul/simart/chanal/ResDir2" )

;====================== Tests setup ============================================

;---------- Test "herve:simu_channel_complet_ampli_CC_Ham:1" ------------- 
ocnxlBeginTest("herve:simu_channel_complet_ampli_CC_Ham:1")
simulator( 'spectre )
design( "herve" "simu_channel_complet_ampli_CC_Ham" "schematic")
path( "/xtools/cadence/IBM_PDK_1.8/IBM_CMOS8_V1.8_DM_vcad/IBM_PDK/cmrf8sf/relDM/Spectre/models/" )
modelFile( 
    '("allModels.scs" "tt")
    '("design.scs" "")
)
analysis('tran ?stop "200n"  ?errpreset "conservative"  ?write "spectre.ic"  
      ?writefinal "spectre.fc"  ?threshold "0.0"  )

desVar(     "eventN" 1   )
desVar(     "runId" 0   )
desVar(     "Cpar" 4.2p   )
desVar(     "Ibias" 50u   )
desVar(     "IbOTA" 15u   )
desVar(     "Lbond" 3n   )
desVar(     "t0" 10n   )
desVar(     "VbdKET" 71.6   )
desVar(     "vdd" 1.2   )
desVar(     "voffset" 0.5 )
desVar(     "VovKet" 1.3   )
desVar(     "VrefSH" 0.21   )
desVar(     "vsel" 1.2   )

option(   ?categ 'turboOpts
   'uniMode  "APS" 
)
save( 'v "/integ_out" )
temp( 27 )
saveOption( 'cmNetLevelsToSave "selected" )
ocnxlOutputSignal( "/integ_out" ?plot t ?save t)
ocnxlEndTest() ; "herve:simu_channel_complet_ampli_CC_Ham:1"

;====================== Sweeps setup ===========================================
ocnxlSweepVar("Cd" "")
ocnxlSweepVar("Cg" "")
ocnxlSweepVar("Cq" "")
ocnxlSweepVar("GainShaper" "")
ocnxlSweepVar("Iq" "")
ocnxlSweepVar("N" "")
ocnxlSweepVar("Nn" "")
ocnxlSweepVar("Rd" "")
ocnxlSweepVar("rp0" "")
ocnxlSweepVar("rp1" "")
ocnxlSweepVar("Rq" "")
ocnxlSweepVar("rz0" "")
ocnxlSweepVar("rz1" "")
ocnxlSweepVar("t0" "{From/To}Auto:10n:25:34n{From/To}")
ocnxlSweepVar("Vbr" "")
ocnxlSweepVar("VDD" "1.2")
ocnxlSweepVar("Cpar" "")
ocnxlSweepVar("Ibias" "")
ocnxlSweepVar("IbOTA" "")
ocnxlSweepVar("Lbond" "")
ocnxlSweepVar("VbdKET" "")
ocnxlSweepVar("vdd" "")
ocnxlSweepVar("voffset" "")
ocnxlSweepVar("VovKet" "")
ocnxlSweepVar("VrefSH" "")
ocnxlSweepVar("vsel" "")
ocnxlSweepVar("eventN" "{From/To}Auto:0:50:49{From/To}")
ocnxlSweepVar("runId" "")


;====================== Model Group setup ==========================================

;====================== Corners setup ==========================================

;====================== Job setup ==============================================
ocnxlJobSetup( '(
   "blockemail" "1"
   "configuretimeout" "300"
   "distributionmethod" "Local"
   "lingertimeout" "300"
   "maxjobs" "4"
   "name" "ADE XL Default"
   "preemptivestart" "1"
   "runtimeout" "-1"
   "showerrorwhenretrying" "1"
   "showoutputlogerror" "0"
   "startmaxjobsimmed" "1"
   "starttimeout" "300"
) )

;====================== Disabled items =========================================

ocnxlDisableSweepVar("Cd")
ocnxlDisableSweepVar("Cg")
ocnxlDisableSweepVar("Cq")
ocnxlDisableSweepVar("GainShaper")
ocnxlDisableSweepVar("Iq")
ocnxlDisableSweepVar("N")
ocnxlDisableSweepVar("Nn")
ocnxlDisableSweepVar("Rd")
ocnxlDisableSweepVar("rp0")
ocnxlDisableSweepVar("rp1")
ocnxlDisableSweepVar("Rq")
ocnxlDisableSweepVar("rz0")
ocnxlDisableSweepVar("rz1")
ocnxlDisableSweepVar("Vbr")
ocnxlDisableSweepVar("VDD")
ocnxlDisableSweepVar("Cpar")
ocnxlDisableSweepVar("Ibias")
ocnxlDisableSweepVar("IbOTA")
ocnxlDisableSweepVar("Lbond")
ocnxlDisableSweepVar("VbdKET")
ocnxlDisableSweepVar("vdd")
ocnxlDisableSweepVar("voffset")
ocnxlDisableSweepVar("VovKet")
ocnxlDisableSweepVar("VrefSH")
ocnxlDisableSweepVar("vsel")
ocnxlDisableSweepVar("runId")


;====================== Run Mode Options ======================================

;====================== Starting Point Info ======================================

;====================== Run command ============================================
ocnxlRun( ?mode 'sweepsAndCorners ?nominalCornerEnabled t ?allCornersEnabled t ?allSweepsEnabled t)
ocnxlOutputSummary(?exprSummary t ?specSummary t ?detailed t ?wave t)

pth = outfile("ktestt.txt" "w")
for(en 0 49 
    ocnPrint(?output pth value(v("/integ_out" ?result "tran")  "eventN" en) ?from 5n ?to 200n ?step 1n) 
)

;====================== End XL Mode command ===================================
ocnxlEndXLMode()
exit

Shell script

Several simulation can be chained by using this shell script bellow, you have to modify the location of the various file you use (the ocean script and the file generated by the ocean script).

for myEventId in $(seq 0 1 12 ) ; 
do
  rm ktestt.txt
  echo $myEventId
  gawk -v r=$myEventId '{if ($0~"desVar"){if ($0~"runId"){print "desVar(          \"runId\" " r "       )"}else{print $0}}else{print $0}}' herve/oceanKetek2.ocn > herve/mylaunch.ocn
  ocean -restore herve/mylaunch.ocn
  cp ktestt.txt herve/kdata${myEventId}_1n.txt
done ; 
echo 

Python script

Finally, the result can be plotted by using the python script (you need corrfile.py and disfullnv2.py). You have to use on the command line:
python disfullnv2.py [file] [plot type] [output, ex: plot.png]
If you do not want to save a figure, you can remove the last line of the python script (savefig).

If you do not want to see the figure (just save it) you can remove the show() line in the script.

The plot types are (2 is maybe what you are looking for):

  • 1: Raw plot on what is in each eventId/BCID
  • 2: Processed plot on the amount of signal in each BCID with the standard deviation
  • 3: Raw signal for 2 eventId
  • 4: Same as 2 but putted next to each other
Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt corrfile.py.txt r1 manage 4.3 K 2013-09-17 - 11:04 ChanalHerve  
Texttxt disfullnv2.py.txt r1 manage 4.5 K 2013-09-17 - 11:04 ChanalHerve  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2018-11-27 - BlakeLeverington
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback