This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Modified AMI code" – news ·newspapers ·books ·scholar ·JSTOR(April 2021) (Learn how and when to remove this message) |
Modified AMI codes are a digital telecommunications technique to maintainsystemsynchronization.Alternate mark inversion (AMI)line codes are modified by deliberate insertion ofbipolar violations. There are several types of modified AMI codes, used in variousT-carrier andE-carrier systems.
Theclock rate of an incoming T-carrier is extracted from its bipolar line code. Each signal transition provides an opportunity for the receiver to see the transmitter's clock. The AMI code guarantees that transitions are always present before and after each mark (1 bit), but are missing between adjacent spaces (0 bits). To prevent loss ofsynchronization when a longstring of zeros is present in thepayload, deliberate bipolar violations are inserted into the line code, to create a sufficient number of transitions to maintain synchronization; this is a form ofrun length limited coding. The receiveterminal equipment recognizes the bipolar violations and removes from the user data the marks attributable to the bipolar violations.
T-carrier was originally developed for voice applications. When voice signals are digitized fortransmission via T-carrier, thedata stream always includes ample 1 bits to maintain synchronization. (To help this, theμ-law algorithm for digitizing voice signals encodes silence as a continuous stream of 1 bits.) However, when used for the transmission ofdigital data, the conventional AMI line code may fail to have sufficient marks to permit recovery of the incoming clock, and synchronization is lost. This happens when there are too many consecutive zeros in theuserdata being transported.
The exact pattern of bipolar violations that is transmitted in any given case depends on the line rate (i.e., the level of the line code in theT-carrier hierarchy) and the polarity of the last validmark in the user data prior to the unacceptably long string of zeros. It would not be useful to have a violation immediately following a mark, as that would not produce a transition. For this reason, all modified AMI codes include a space (0 bit) before each violation mark.
In the descriptions below, "B" denotes a balancing mark with the opposite polarity to that of the preceding mark, while "V" denotes a bipolar violation mark, which has the same polarity as the preceding mark. In order to preserve AMI coding's desirable absence ofDC bias, the number of positive marks must equal the number of negative marks. This happens automatically for balancing (B) marks, but the line code must ensure that positive and negative violation marks balance each other.
The first technique used to ensure a minimum density of marks waszero code suppression a form ofbit stuffing, which set the least significant bit of each 8-bit byte transmitted to a 1. (This bit was already unavailable due torobbed-bit signaling.) This avoided the need to modify the AMI code in any way, but limited available data rates to 56,000 bits per second perDS0 voice channel. Also, the low minimum density of ones (12.5%) sometimes led to increased clockslippage on the span.
Increased demand for bandwidth, and compatibility with theG.703 andISDNPRI standards which called for 64,000 bits per second, led to this system being superseded by B8ZS.
Commonly used in the North American T1 (Digital Signal 1) 1.544 Mbit/s line code,bipolar with eight-zero substitution (B8ZS) replaces each string of 8 consecutive zeros with the special pattern "000VB0VB". Depending on the polarity of the preceding mark, that could be000+−0−+ or000−+0+−.
At the North American T2 rate (6.312 Mbit/s), bipolar violations are inserted if 6 or more consecutive zeros occur. This line code is calledbipolar with six-zero substitution (B6ZS), and replaces 6 consecutive zeros with the pattern "0VB0VB". Depending on the polarity of the preceding mark, that could be0+−0−+ or0−+0+−.
Used in all levels of the EuropeanE-carrier system, thehigh density bipolar of order 3 (HDB3) code replaces any instance of 4 consecutive 0 bits with one of the patterns "000V" or "B00V". The choice is made to ensure that consecutive violations are of differing polarity; i.e., separated by an odd number of normal+ or − marks.
| Parity of +/− bits since previous V | Pattern | Previous pulse | Coded |
|---|---|---|---|
| Even | B00V | + | −00− |
| − | +00+ | ||
| Odd | 000V | + | 000+ |
| − | 000- |
These rules are applied on the code as it is being built from the original string. Every time there are 4 consecutive zeros in the code they will be replaced by either 000−, 000+, +00+ or −00−. To determine which pattern to use, one must count the number of pluses (+) and the number of minuses (−) since the last violation bit V, then subtract one from the other. If the result is an odd number then 000− or 000+ is used. If the result is an even number then +00+ or −00− is used. To determine which polarity to use, one must look at the pulse preceding the four zeros. If 000V form must be used then V simply copies the polarity of last pulse, if B00V form must be used then B and V chosen will have the opposite polarity of the last pulse.
Here are some examples of bit streams codes with AMI and HDB3. All assume the same starting conditions: the previous 1 bit was −, and the previous violation was an even number of 1 bits ago. (E.g. the preceding bits could have been ++−.)
| Input | 100001102 |
| AMI | +0000−+0 |
| HDB3 | +B00V−+0 |
| +−00−+−0 |
| Input | 1010000011000011000000012 |
| AMI | +0−00000+−0000+−0000000+ |
| HDB3 | +0−000V0+−B00V−+B00V000+ |
| +0−000−0+−+00+−+−00−000+ |
| Input | 10100001000011000011100001111000010100002 |
| AMI | +0−0000+0000−+0000−+−0000+−+−0000+0−0000 |
| HDB3 | +0-000V+000V-+B00V-+-000V+-+-B00V+0-B00V |
| +0-000-+000+-+-00-+-+000+-+-+-00-+0-+00+ |
| Input | 100000000002 |
| AMI | +000000000 |
| HDB3 | +B00VB00V00 |
| +-00-+00+00 |
At theNorth American T3 rate (44.736 Mbit/s), bipolar violations are inserted if 3 or more consecutive zeros occur. This line code is calledbipolar with three-zero substitution (B3ZS), and is very similar to HDB3. Each run of 3 consecutive zeros is replaced by "00V" or "B0V". The choice is made to ensure that consecutive violations are of differing polarity, i.e. separated by an odd number of normalB marks.
| Number of B bits since last V | Pattern | Polarity of last B | Coded |
|---|---|---|---|
| Odd | 00V | + | 00+ |
| − | 00− | ||
| Even | B0V | + | −0− |
| − | +0+ |
Other line codes that have 3 states:
This article incorporatespublic domain material fromFederal Standard 1037C.General Services Administration. Archived fromthe original on 2022-01-22.