[ibis-interconn] Line splitting in Touchstone files

  • From: Mike LaBonte <mike.labonte@xxxxxxxx>
  • To: IBIS-Interconnect <ibis-interconn@xxxxxxxxxxxxx>
  • Date: Wed, 16 Feb 2022 08:51:31 -0500

All,

Seeing that there will be discussion of network data line splitting in 
Touchstone, I wanted to offer the insight of someone who has gone through the 
tschk2 code pretty thoroughly. The parser has only one rule that allows it to 
distinguish the start of a new frequency from any continuation lines: the 
complex pairs must never be split across lines. Therefore, any line with an odd 
number of numbers is a frequency line, and any line with an even number of 
numbers is a continuation of the data.

Here is one of the “good” test suite files, which has two frequency points 
(highlighted):

!
! v1/network_data/whitespace_4.ts
!
! focus: network data entries separated by newlines
! test mode: success
! TS2 spec: page 13, item 2
!

# ri
1
1 1
 2 2
3 3
 4 4
5 5  6 6
7 7
 8 8  9 9
2 2 2
 3 3
4 4
 5 5    
6 6  7 7
 8 8  9 9
10 10

It might be easier to see neatened up:

# ri
1  1 1  2 2  3 3
   4 4  5 5  6 6
   7 7  8 8  9 9
2  2 2  3 3  4 4
   5 5  6 6  7 7
   8 8  9 9 10 10

That simple rule is why tschk2 checks [Number of Ports] against the data but 
has no need for it, and why the Touchstone 2.0 specification is able to 
recommend “.ts” file extensions, not “.sNp”. Any other conventions about line 
arrangement would be for readability, not syntax.

Mike


Other related posts:

  • » [ibis-interconn] Line splitting in Touchstone files - Mike LaBonte