You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Conversation with Matt/Ric/Riccardo/cpo on April 4, 2024.  For complex area detectors.


WE CAN REQUEST CHANGES FROM TID

You could consider running Ric's scripts and create a dummy epixM in
configdb (don't touch the official one).

In epixuhr_config_store can we create a Root object and iterate over
it to create the json?  Worth exploring.  Might require the hardware
to exist?  Or we could use "simulation" somehow?

**********************************************************************

- look in yaml files
- translate those yaml files into epixuhr_config_store.py
  (do with python?)
  o another possibility: rogue command to dump out the registers?
    pick out the read-write ones.  might also include the type info
- all these registers should go into the "expert" section
  o there is also a "user" section with a simplified user variables
    which get "translated" by code into the official "expert" structure.
    Ric says there are "helper" variables in the user section,
    e.g. charge-injection patterns, that aren't necessarily modified
    by the user.  The charge-injection script modifies those variables.
    Ric says perhaps this should be in a third section? (not user/expert?)
- need to find out the types by looking at devGui or firmware/*.py files
  that define devGui
- set most values to 0 then tweak critical ones to non-zero
- a command for the next step:
    (first command creates confidb schema)
  o python epixm320_config_store.py --prod --user tstopr --inst tst --alias BEAM --name epixm --segm 0 --id epixm320_serial1234 --dir /cds/home/c/cpo/git/epix-hr-m-320k/
    (second command fills in values)
  o python epixhr_config_from_yaml.py --prod --user tstopr --inst tst --alias BEAM --name epixm --segm 0 --id epixm320_serial1234 --yaml Root:/cds/home/c/cpo/git/epix-hr-m-320k/software/config/ePixHRM320k_75000018efb4ab01_ASIC_u1.yml
  "--dir" points to csv files in the project that are useful?

    top = epixm320_cdict(args.dir+'/software/config')
    top.setInfo('epixm320hw', args.name, args.segm, args.id, 'No comment')

these are the csv file-loading lines:

    top.set(base+'_250_MHz', np.loadtxt(prjCfg+'/EPixHRM320KPllConfig250Mhz.csv', dtype='uint16', delimiter=',', skiprows=1, converters=conv))
    top.set(base+'_125_MHz', np.loadtxt(prjCfg+'/EPixHRM320KPllConfig125Mhz.csv', dtype='uint16', delimiter=',', skiprows=1, converters=conv))

csv are passed to the root.init_asic(csv_file_index_into_list_of_csv_files)

run epixhr_config_from_yaml.py with different arguments to update the values
in the schema. epixm has 5 or 6 yaml files.

new yaml files (with a new "schema") can be provided by the TID
group as time goes on. Ric has a mechanism to update the schema
but preserve the values (!) (see https://confluence.slac.stanford.edu/display/PSDMInternal/Debugging+DAQ#DebuggingDAQ-MakingSchemaUpdatesinconfigdb).
Can add/drop/modify fields as necessary with Ric's sheme.

in epixm_config.py reads the configdb and re-creates the .yaml files
in /tmp. Also creates Root.filename<yamlname> variables. yamlname is
the third argument here (PowerSupply):

        toYaml('App',['PowerControl'],'PowerSupply')

then this initasic gets the /tmp/yamlname inserting a filename into
a variable of this Root class (editing the class): (filename is not passed in)
(arg has the index that points to an entry in a list that
has clock frequencies, .csv files, etc.)

        cbase.fnInitAsicScript(None,None,arg)

goal might be to get the above script to work

in future perhaps consider adding arguments instead of modifying class?

**********************************************************************

copy lines from devGui, e.g.

cbase = ePixM.Root(top_level      = '/tmp',
           dev                    = '/dev/datadev_0',
           pollEn                 = False,
           initRead               = False,
           justCtrl               = True,
           fullRateDataReceiverEn = False)
cbase.saveAddressMap("filename")

parse with python to generate a schema?

Root python class knows the schema, .yaml has the values

Matt's epixhr_config_from_yaml_set.py iterates over multiple yaml files

**********************************************************************

Watch out for:
- enum keywords have [] () that are invalid python names.  can request
  to have them changed, or need to "translate"
- previously debugging those errors in JsonToXtc was difficult, but
  this may be improved with recent changes from Gabriel.  Ric thinks
  this may not cover much of the phase-space for errors, but we can
  consider improving it by talking with Gabriel. e.g. a new
  epixm release removed a variable from the yaml, but was in the
  schema and yaml.  Got a default value of zero and JsonToXtc was unhappy.


  • No labels