# Copyright 2019 Alain Dargelas
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Universal Hardware Data Model (UHDM) "variables" formal description
 
- class_def: variables
  - extends: simple_expr
  - property: array_member
    name: array member
    vpi: vpiArrayMember
    type: bool
    card: 1
  - property: name
    name: name
    vpi: vpiName
    type: string
    card: 1
  - property: full_name
    name: full name
    vpi: vpiFullName
    type: string
    card: 1
  - property: sign
    name: sign
    vpi: vpiSigned
    type: bool
    card: 1
  - property: default_lifetime
    name: default lifetime
    vpi: vpiAutomatic
    type: bool
    card: 1
  - property: memory_allocation
    name: memory allocation
    vpi: vpiAllocScheme
    type: int32_t
    card: 1
  - property: constant_variable
    name: constant variable
    vpi: vpiConstantVariable
    type: bool
    card: 1
  - property: is_randomized
    name: is randomized
    vpi: vpiIsRandomized
    type: bool
    card: 1
  - property: randomization_type
    name: randomization type
    vpi: vpiRandType
    type: int32_t
    card: 1
  - property: member
    name: member
    vpi: vpiStructUnionMember
    type: bool
    card: 1
  - property: scalar
    name: scalar
    vpi: vpiScalar
    type: bool
    card: 1
  - property: visibility
    name: visibility
    vpi: vpiVisibility
    type: int32_t
    card: 1
  - property: vector
    name: vector
    vpi: vpiVector
    type: bool
    card: 1 
  - class_ref: ports
    name: ports
    vpi: vpiPortInst
    type: ports
    card: any
  - group_ref: variable_drivers
    name: variable drivers
    vpi: vpiDriver
    type: variable_drivers_group
    card: any
  - group_ref: variable_loads
    name: variable loads
    vpi: vpiLoad
    type: variable_loads_group
    card: any
  - obj_ref: prim_terms
    name: prim term
    vpi: vpiPrimTerm
    type: prim_term
    card: any
  - obj_ref: cont_assigns
    name: cont assign
    vpi: vpiContAssign
    type: cont_assign
    card: any
  - obj_ref: path_term
    name: path term
    vpi: vpiPathTerm
    type: path_term
    card: 1
  - obj_ref: tchk_term
    name: tchk term
    vpi: vpiTchkTerm
    type: tchk_term
    card: 1
  - obj_ref: module_inst
    name: module_inst
    vpi: vpiModule
    type: module_inst
    card: 1
  - class_ref: instance
    name: instance
    vpi: vpiInstance
    type: instance
    card: 1
  - class_ref: scope
    name: scope
    vpi: vpiScope
    type: scope
    card: 1
  - class_ref: expr
    name: expr
    vpi: vpiExpr
    type: expr
    card: 1
  - class_ref: indexes
    name: indexes
    vpi: vpiIndex
    type: expr
    card: any
  - obj_ref: attributes
    name: attributes
    vpi: vpiAttribute
    type: attribute
    card: any
