text: /* 
   * 
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   * 
   * DO NOT EDIT THIS FILE!
   * This file is auto-generated.
   * Edits to this file will be lost when it is regenerated.
   */
  
  #include <sal/core/libc.h>
  #include <shared/swstate/sw_state.h>
  #include <shared/error.h>
  #include <shared/swstate/sw_state_defs.h>
  #include <shared/bsl.h>
  #include <shared/swstate/access/sw_state_access.h>
  #include <shared/swstate/access/sw_state_dpp_soc_arad_pp_vtt_access.h>
  
  #ifdef _ERR_MSG_MODULE_NAME
      #error "_ERR_MSG_MODULE_NAME redefined"
  #endif
  
  #define _ERR_MSG_MODULE_NAME BSL_LS_SHARED_SWSTATE
  
  extern shr_sw_state_t *sw_state[BCM_MAX_NUM_UNITS];
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_set(int unit, CONST ARAD_VTT *vtt){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.verify( unit));
      SHR_SW_STATE_MEMSET(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt[0],
          vtt,
          ARAD_VTT,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_vtt_set");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_get(int unit, ARAD_VTT *vtt){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.verify( unit));
      *vtt = sw_state[unit]->dpp.soc.arad.pp->vtt[0];
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_alloc(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt,
          sizeof(ARAD_VTT),
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_vtt_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_is_allocated(int unit, uint8 *is_allocated){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_IS_ALLOC(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt,
          is_allocated,
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_vtt_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_free(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_FREE(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt,
          SW_STATE_NONE,
          "sw_state_dpp_soc_arad_pp_vtt_alloc");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_verify(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_NULL_ACCESS_CHECK(sw_state[unit]->dpp.soc.arad.pp->vtt);
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_set(int unit, SOC_SAND_HASH_TABLE_PTR isem_key_to_entry_id){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.isem_key_to_entry_id.verify( unit));
      SHR_SW_STATE_SET(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt->isem_key_to_entry_id,
          isem_key_to_entry_id,
          SOC_SAND_HASH_TABLE_PTR,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_set");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_get(int unit, SOC_SAND_HASH_TABLE_PTR *isem_key_to_entry_id){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.isem_key_to_entry_id.verify( unit));
      *isem_key_to_entry_id = sw_state[unit]->dpp.soc.arad.pp->vtt->isem_key_to_entry_id;
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_verify(int unit){
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.vtt.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_vt_programs_set(int unit, int vt_programs_idx_0, int vt_programs){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.vt_programs.verify( unit, vt_programs_idx_0));
      SHR_SW_STATE_SET(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt->vt_programs[vt_programs_idx_0],
          vt_programs,
          int,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_vtt_vt_programs_set");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_vt_programs_get(int unit, int vt_programs_idx_0, int *vt_programs){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.vt_programs.verify( unit, vt_programs_idx_0));
      *vt_programs = sw_state[unit]->dpp.soc.arad.pp->vtt->vt_programs[vt_programs_idx_0];
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_vt_programs_verify(int unit, int vt_programs_idx_0){
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.vtt.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_OUT_OF_BOUND_CHECK( vt_programs_idx_0, PROG_VT_NOF_PROGS, "vt_programs");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_tt_programs_set(int unit, int tt_programs_idx_0, int tt_programs){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.tt_programs.verify( unit, tt_programs_idx_0));
      SHR_SW_STATE_SET(
          unit,
          sw_state[unit]->dpp.soc.arad.pp->vtt->tt_programs[tt_programs_idx_0],
          tt_programs,
          int,
          SW_STATE_IS_WB_CHECK | SW_STATE_ALLOW_AUTOSYNC,
          "sw_state_dpp_soc_arad_pp_vtt_tt_programs_set");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_tt_programs_get(int unit, int tt_programs_idx_0, int *tt_programs){
      SW_STATE_INIT_FUNC_DEFS;
      SHR_SW_STATE_VERIFY( sw_state_access[unit].dpp.soc.arad.pp.vtt.tt_programs.verify( unit, tt_programs_idx_0));
      *tt_programs = sw_state[unit]->dpp.soc.arad.pp->vtt->tt_programs[tt_programs_idx_0];
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
  /* AUTO-GENERATED - DO NOT MODIFY */
  int sw_state_dpp_soc_arad_pp_vtt_tt_programs_verify(int unit, int tt_programs_idx_0){
      SW_STATE_INIT_FUNC_DEFS;
      _rv = sw_state_access[unit].dpp.soc.arad.pp.vtt.verify( unit);
      _SOC_IF_ERR_EXIT(_rv);
      SW_STATE_OUT_OF_BOUND_CHECK( tt_programs_idx_0, PROG_TT_NOF_PROGS, "tt_programs");
      SW_STATE_FUNC_RETURN;
  }
  
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  
  
  int
  sw_state_dpp_soc_arad_pp_vtt_access_cb_init(int unit){
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.set = sw_state_dpp_soc_arad_pp_vtt_set;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.get = sw_state_dpp_soc_arad_pp_vtt_get;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.alloc = sw_state_dpp_soc_arad_pp_vtt_alloc;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.is_allocated = sw_state_dpp_soc_arad_pp_vtt_is_allocated;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.free = sw_state_dpp_soc_arad_pp_vtt_free;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.verify = sw_state_dpp_soc_arad_pp_vtt_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.isem_key_to_entry_id.set = sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_set;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.isem_key_to_entry_id.get = sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_get;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.isem_key_to_entry_id.verify = sw_state_dpp_soc_arad_pp_vtt_isem_key_to_entry_id_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.vt_programs.set = sw_state_dpp_soc_arad_pp_vtt_vt_programs_set;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.vt_programs.get = sw_state_dpp_soc_arad_pp_vtt_vt_programs_get;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.vt_programs.verify = sw_state_dpp_soc_arad_pp_vtt_vt_programs_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.tt_programs.set = sw_state_dpp_soc_arad_pp_vtt_tt_programs_set;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.tt_programs.get = sw_state_dpp_soc_arad_pp_vtt_tt_programs_get;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
  #ifdef BCM_PETRA_SUPPORT
  #if defined(BCM_PETRA_SUPPORT)
      sw_state_access[unit].dpp.soc.arad.pp.vtt.tt_programs.verify = sw_state_dpp_soc_arad_pp_vtt_tt_programs_verify;
  #endif /* defined(BCM_PETRA_SUPPORT)*/ 
  #endif /* BCM_PETRA_SUPPORT*/ 
      return _SHR_E_NONE;
  }
  
  #undef _ERR_MSG_MODULE_NAME
  