#!/bin/sh
#
# Test results last captured at "Fri Nov 14 12:43:06 PST 2003"
#
# This is an IBIS icm test program
#
# It is a self-contained package of all of the 
# files and data required to run an icm parser test.
#
# Usage:  ./test_209  <arg>
#
# <nothing>               = Run the test silently in GNU check mode
# "Brief"                 = Run the test.
#                           If there is no error, produce a one line summary
#                           Otherwise, produce a full test report.
# "Full"                  = Run the test and always produce a full test report
# "Capture"               = Capture test results and REWRITE the test program
# "Extract"               = Extract the .icm and .out files
#

Test=`basename $0`
Version="1.0"
Synopsis="Subparameters must exactly match correct casing"
ExitStatus="1"
Counters="ERRORS: 4 WARNINGS: 0"
ExtraFiles="model_example.jpg secta.s4p sectb.s4p sectc.s4p"
GNUCheck="Yes"

Description=`cat <<'EOF'
This test tests a recently added feature of the parser; the ability
to match subparameters in a case-insensitive way, while still noting
whenever the casing is incorrect so the user can fix the file.

A number of subparameters are incorrectly cased.  Previously, the
parser would simply chuck incorrectly cased subparameters, generating
a rather uninformative message in the process, and leaving the user
going 'Huh?'.

Very clear warnings are expected, including the CORRECT casing.
EOF`

Output=`cat <<'EOF'
IBIS ICM Parser, version 1.0.0
ERROR (Line 40/Col 1) Subparameter 'ICM_Model_Type' is not correctly cased.  Use 'ICM_model_type'.
ERROR (Line 44/Col 3) Subparameter 'N_Section' is not correctly cased.  Use 'N_section'.
ERROR (Line 68/Col 1) Subparameter 'File_Name' is not correctly cased.  Use 'File_name'.
ERROR (Line 69/Col 1) Subparameter 'Port_Assignment' is not correctly cased.  Use 'Port_assignment'.
Finished. ERRORS: 4 WARNINGS: 0
EOF`

ICM=`cat <<'EOF'

|
|**********************************************************************
[Begin Header]
[ICM Ver]             1.0
[File Name]           test_209.icm
[File Rev]            0.1
[Date]                March 17, 2003
[Source]              Created by Michael Mirmak, Intel Corp.
[Notes]               This file shows how the ICM specification, at
                      level 1.0a, would implement an S-parameter 
                      description of an interconnect.
[Disclaimer]          No license, express or implied, by estoppel or 
                      otherwise, to any intellectual property rights is 
                      granted by this document. 
[Copyright]           None - public domain
[Support]             http://www.vhdl.org/pub/ibis/
[Redistribution]      Yes    
[Redistribution Text] Stick your favorite T's and C' here! 
[End Header]
|**********************************************************************
|
[Comment Char] |_char
|
|**********************************************************************
[Begin ICM Family]        S_parameter_example
[Manufacturer]            None
[ICM Family Description]  
A very crude s-parameter example for parsing and analysis.
|**********************************************************************
[ICM Model List] 
|  Name             Mating   Min_Slew_Time           Image
MyModelExample1     Mated       100ps            model_example.jpg
|
|          SectA       SectB       SectC   
| Port1 >---------< >---------< >---------<  Port2
|
|**********************************************************************
[Begin ICM Model] MyModelExample1
ICM_Model_Type S-parameter
|
[Nodal Path Description]
  Model_nodemap MyModelNodeMapA
  N_Section ( A1  A2    AB1 AB2 ) Mult=1 SectA
  N_section ( AB1 AB2   BC1 BC2 ) Mult=1 SectB
  N_section ( BC1 BC2   C1  C2  ) Mult=1 SectC
  Model_nodemap MyModelNodeMapC
|
[End ICM Model]
|
|**********************************************************************
[ICM Node Map] MyModelNodeMapA
|Pin Node Name
 1   A1   AD1_IN
 2   A2   AD2_IN

[ICM Node Map] MyModelNodeMapC
|Pin Node Name
 1   C1   AD12_OUT
 2   C2   AD15_OUT

[End ICM Family]
|
|**********************************************************************
[Begin ICM Section] SectA
[Derivation Method] Lumped
[ICM S-parameter]
File_Name secta.s4p
Port_Assignment
| Port Node
1   A1
2   A2
3   AB1
4   AB2
[End ICM Section] SectA

|**********************************************************************
[Begin ICM Section] SectB
[Derivation Method] Lumped
[ICM S-parameter]
File_name sectb.s4p
Port_assignment
| Port NOde
1   AB1
2   AB2
3   BC1
4   BC2
[End ICM Section] SectB

|**********************************************************************
[Begin ICM Section] SectC
[Derivation Method] Lumped
[ICM S-parameter]
File_name sectc.s4p
Port_assignment
| Port Node
1   BC1
2   BC2
3   C1
4   C2
[End ICM Section] SectC

|**********************************************************************
[End]
|**********************************************************************
EOF`

if [ -z "${srcdir}" ]
then
    srcdir="."
fi

export srcdir Test Version Synopsis ExitStatus Counters ExtraFiles GNUCheck Description Output ICM

exec ${srcdir}/run_test "$@"
