size
  set standardIndex "IOSTANDARD"
  set valueList {}
  set default {}
  for {set i 0} {$i<$iostandards_size} {incr i} {
     if {$iostandards($i,$standardIndex) eq $standard} {
        if {$iostandards($i,$deviceName) ne ""} {
           if {[lsearch $valueList $iostandards($i,$valueName)] == -1} {
              lappend valueList $iostandards($i,$valueName)
           }
        }
        if {[string equal -nocase $iostandards($i,$deviceName)  "default"]} {
           set default $iostandards($i,$valueName)
        }
     }
  }

  set retval {}
  if {[expr ([string length $default] != 0) && ([llength $valueList] != 0) ]} {
    set retval [list $default $valueList]
  }
  
  return $retval
}

################################################################################
# getDrive 
#   Description:
#     Looks for values in the drive column available for the given device
#     and standard.
#
#   Arguments:
#     <deviceName> : Name of device
#     <standard>   : Name of standard
#
#   Results:
#     retval       : List with the default value and a list of all valid values
#                    or empty list on error
#                    (example:  {12 {2 4 6}})
#
proc getDrive {deviceName standard} {
  return [getValue $deviceName $standard "DRIVE"]
}
 
################################################################################
# getSlew 
#   Description:
#     Looks for values in the slew column available for the given device
#     and standard.
#
#   Arguments:
#     <deviceName> : Name of device
#     <standard>   : Name of standard
#
#   Results:
#     retval       : List with the default value and a list of all valid values
#                    or empty list on error
#                    (example:  {FAST {SLOW FAST}})
#
proc getSlew {deviceName standard} {
  return [getValue $deviceName $standard "SLEW"]
}
 
################################################################################
# getOutputValue 
#   Description:
#     Looks for the output drive encoded value for the given device,
#     endpoint, standard, drive strength and edge.
#
#   Arguments:
#     <deviceName>   : Name of device
#     <endpoint>     : Name of endpoint
#     <standard>     : Name of standard
#     <driveStrength>: Name of drive strength
#     <edge>         : Name of edge
#
#   Results:
#     retval         : Output drive encoded value or -1 on error
#
proc getOutputValue {deviceName endpoint standard driveStrength edge} {
  foreach v [info vars] {set $v [string toupper [set $v]]}
  variable iostandards
  variable iostandards_size

  set valueIndex "ENCODING"
  set driveIndex "DRIVE"
  set edgeIndex "SLEW"
  set standardIndex "IOSTANDARD"
  set endpointIndex "ENDPOINT"

  set valueList {}
  set default {}
  for {set i 0} {$i<$iostandards_size} {incr i} {
     if {
        $iostandards($i,$deviceName) ne ""
     && $iostandards($i,$endpointIndex) eq $endpoint
     && $iostandards($i,$standardIndex) eq $standard
     && $iostandards($i,$driveIndex) eq $driveStrength
     && $iostandards($i,$edgeIndex) eq $edge} {
        retu