parameters: (self, conf: dict)
return_statement: return conf
docstring: +--------------+-------------------+------------+
          | clock_source | x86               | arm        |
          +--------------+-------------------+------------+
          | VA           | global + XRT      | boot + XRT |
          | XAT          | x86-tsc + x86-tsc | boot + XRT |
          +--------------+-------------------+------------+
docstring_summary: +--------------+-------------------+------------+
          | clock_source | x86               | arm        |
          +--------------+-------------------+------------+
          | VA           | global + XRT      | boot + XRT |
          | XAT          | x86-tsc + x86-tsc | boot + XRT |
          +--------------+-------------------+------------+
docstring_tokens: + -------------- + ------------------- + ------------ + | clock_source | x86 | arm | + -------------- + ------------------- + ------------ + | VA | global + XRT | boot + XRT | | XAT | x86 - tsc + x86 - tsc | boot + XRT | + -------------- + ------------------- + ------------ +
function: def prepare(self, conf: dict) -> dict:
  
          # "VAI_TRACE_ENABLE"=1
          # "VAI_TRACE_DIR"="/tmp/vai/"
          # "VAI_TRACE_TS" = "boot" or "x86_tsc"
  
          os.environ.setdefault("VAI_TRACE_ENABLE", "1")
          os.environ.setdefault("VAI_TRACE_DIR", self.logdirName)
  
          # preferClocks = ["boot", "x86-tsc", "global"]
          ts_mode = conf.get("control").get("traceClock")
          logging.debug(ts_mode)
          """
          +--------------+-------------------+------------+
          | clock_source | x86               | arm        |
          +--------------+-------------------+------------+
          | VA           | global + XRT      | boot + XRT |
          | XAT          | x86-tsc + x86-tsc | boot + XRT |
          +--------------+-------------------+------------+
          """
          os.environ.setdefault("VAI_TRACE_TS", ts_mode)
  
          va_enabled = conf['cmdline_args']['va']
          if va_enabled:
              os.environ["VAI_TRACE_TS"] = "XRT"
              if ts_mode == "x86-tsc":
                  """VTF do not accept x86-tsc"""
                  conf["control"]["traceClock"] = "global"
                  print(conf["control"]["traceClock"])
  
          return conf
function_tokens: def prepare ( self , conf : dict ) -> dict : # "VAI_TRACE_ENABLE"=1 # "VAI_TRACE_DIR"="/tmp/vai/" # "VAI_TRACE_TS" = "boot" or "x86_tsc" os . environ . setdefault ( "VAI_TRACE_ENABLE" , "1" ) os . environ . setdefault ( "VAI_TRACE_DIR" , self . logdirName ) # preferClocks = ["boot", "x86-tsc", "global"] ts_mode = conf . get ( "control" ) . get ( "traceClock" ) logging . debug ( ts_mode ) os . environ . setdefault ( "VAI_TRACE_TS" , ts_mode ) va_enabled = conf [ 'cmdline_args' ] [ 'va' ] if va_enabled : os . environ [ "VAI_TRACE_TS" ] = "XRT" if ts_mode == "x86-tsc" : """VTF do not accept x86-tsc""" conf [ "control" ] [ "traceClock" ] = "global" print ( conf [ "control" ] [ "traceClock" ] ) return conf