#!/bin/sh
#
# Test results last captured at "Fri Nov 14 12:43:14 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_232  <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="[Row] numbers must increase monatonically from 1"
ExitStatus="1"
Counters="ERRORS: 7 WARNINGS: 1"
ExtraFiles="test_model_1.jpg"
GNUCheck="Yes"

Description=`cat <<'EOF'
This test mucks about with matrix [Row] numbers to see how the parser
responds to misordering of the rows.

Errors are expected.
EOF`

Output=`cat <<'EOF'
IBIS ICM Parser, version 1.0.0
ERROR (Line 143/Col 1) Expected '[Row] 1'.
ERROR (Line 146/Col 1) Expected '[Row] 3'.
ERROR (Line 149/Col 1) Expected '[Row] 2'.
ERROR (Line 172/Col 7) [Row] number '-2' must be greater than '0'.
WARNING (Line 172/Col 7) Assuming '[Row] 1'.
ERROR (Line 172/Col 1) Duplicate '[Row] 1'.
ERROR (Line 174/Col 1) Expected '[Row] 2'.
ERROR (Line 181/Col 1) Expected '[Row] 2'.
Finished. ERRORS: 7 WARNINGS: 1
EOF`

ICM=`cat <<'EOF'

This line is ignored
|**********************************************************************
[Begin Header]
[ICM Ver]             1.0
[File Name]           test_232.icm
[File Rev]            0.1
[Date]                October 8, 2003
[Source]              Kelly C. Green

[Notes]               This is the minimum correct file

                      It will be used as a basis for systematic
                      feature tests

[Disclaimer]          No license, express or implied, by estoppel or 
                      otherwise, to any intellectual property rights is 
                      granted by this document. 

                      No warranty of any kind.  No support of any kind.
                      Use this file entirely at your own risk.

[Copyright]           None - public domain
[Support]             http://www.vhdl.org/pub/ibis/
[Redistribution]      Yes    
[Redistribution Text] You may do anything you wish to this file.
[End Header]

|**********************************************************************
|
[Comment Char] |_char
|
|**********************************************************************

[Begin ICM Family]        Template test file
[Manufacturer]            None
[ICM Family Description]  This file is a template from which most 
                          subsequent test files will be derived.

|**********************************************************************
[ICM Model List] 
|  Name             Mating   Min_Slew_Time   Image
|
   TestModel1       Mated    100ps           test_model_1.jpg
   TestModel2       Mated    100ps
|
|          SectA
| Port1 >---------< Port2
|
|**********************************************************************
[Begin ICM Model] TestModel1
ICM_model_type SLM_general
SGR 1:1
|
[Tree Path Description]
  Model_pinmap Port1
  Section Mult=1 SectA
  Section Len=1.0 SectB
  Section Mult=1 SectC
  Model_pinmap Port2
[ICM Swath Parameters]
Left_edge = 1
Right_edge = 1
Top_edge = 0
Bottom_edge = 0
[ICM Swath Pin Numbers]
A 1 1
B 1 2
C 1 3
D 1 4
|
[End ICM Model]
|
[Begin ICM Model] TestModel2
ICM_model_type SLM_general
SGR 1:1
[Nodal Path Description]
  Model_nodemap NodeMap1
  N_section ( A1  A2  A3  A4    AB1 AB2 AB3 AB4 ) Mult = 1   SectA
  N_section ( AB1 AB2 AB3 AB4   BC1 BC2 BC3 BC4 ) Len  = 1.0 SectB
  N_section ( BC1 BC2 BC3 BC4   C1  C2  C3  C4  ) Mult = 1   SectC
  Model_nodemap NodeMap2
|
[End ICM Model]
|
|**********************************************************************
[ICM Pin Map] Port1
Pin_order Column_ordered
Num_of_rows = 1
Num_of_columns = 8
Pin_list
|Pin Name
A1 SIG1_IN
A2 SIG2_IN
A3 SIG3_IN
A4 SIG4_IN
A5 SIG5_IN
A6 SIG6_IN
A7 SIG7_IN
A8 SIG8_IN

[ICM Pin Map] Port2
Pin_order Column_ordered
Num_of_rows = 1
Num_of_columns = 8
Pin_list
|Pin Name
B1 SIG1_OUT
B2 SIG2_OUT
B3 SIG3_OUT
B4 SIG4_OUT
B5 SIG5_OUT
B6 SIG6_OUT
B7 SIG7_OUT
B8 SIG8_OUT

|**********************************************************************
[ICM Node Map] NodeMap1
|Pin Node Name
 1   A1   AD1_IN
 2   A2   AD2_IN
 3   A3   AD3_IN
 4   A4   AD4_IN

[ICM Node Map] NodeMap2
|Pin Node Name
 1   C1   AD1_OUT
 2   C2   AD2_OUT
 3   C3   AD3_OUT
 4   C4   AD4_OUT

[End ICM Family]
|
|**********************************************************************
[Begin ICM Section] SectA
[Derivation Method] Lumped
[Resistance Matrix] Diagonal_matrix
1.0mohm
1.0e-3
0.001
1m
[Inductance Matrix] Full_matrix
[Row] 2
4.0e-9      0.0
0.0
[Row] 1
4.0nh       0.0   
0.0         0.0
[Row] 3
0.000000004 0.0
[Row] 4
4n
[Capacitance Matrix] Diagonal_matrix
2.0pf
2.0e-12
0.000000000002
2p
[End ICM Section] SectA
|
|**********************************************************************
[Begin ICM Section] SectB
[Derivation Method] Distributed
[Resistance Matrix] Diagonal_matrix
1.0mohm
1.0e-3
0.001
1m
[Inductance Matrix] Banded_matrix
[Bandwidth] 0
[Row] 1
4.0nh
[Row] -2
4.0e-9
[Row] 3
0.000000004
[Row] 4
4n
[Capacitance Matrix] Sparse_matrix
[Row] 1
1           2.0pf
[Row] 3
3           0.000000000002
[Row] 4
4           2p
[End ICM Section] SectB

|**********************************************************************
[Begin ICM Section] SectC
[Derivation Method] Lumped
[Resistance Matrix] Diagonal_matrix
1.0mohm
1.0e-3
0.001
1m
[Inductance Matrix] Diagonal_matrix
4.0nh
4.0e-9
0.000000004
4n
[Capacitance Matrix] Diagonal_matrix
2.0pf
2.0e-12
0.000000000002
2p
[End ICM Section] SectC

|**********************************************************************
[End]
|**********************************************************************
This line is ignored
EOF`

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

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

exec ${srcdir}/run_test "$@"
