Escolar Documentos
Profissional Documentos
Cultura Documentos
Jnanasangama
Belgaum-590018, Karnataka State, INDIA
SHRUTI G.GOUDA
2 Sem. M.Tech. (DEC)
nd
MASTER OF TECHNOLOGY
IN
DIGITAL ELECTRONICS AND COMMUNICATION
Under the Guidance Of
Mr.PRADEESH KUNHIPPANAN
Asst.Professor
CERTIFICATE
Certified that the mini-project work entitled DESIGN OF DECODER BASED ON MILSTD1553B USING STATE MACHINES, carried out by SHRUTI G.GOUDA in partial
fulfillment for the award of degree of MASTER OF TECHNOLOGY in DIGITAL
ELECTRONICS AND COMMUNICATION of the Visvesvaraya Technological
University, Belgaum during the year 2013. It is certified that all correction/suggestions
indicated for internal assessments have been incorporated in the report deposited in the
department library. The project report has been approved as it satisfied the academic
requirements in respect of Mini-Project work prescribed for the Master of Technology
degree.
Mini-project Guide
Dr.Ravikumar
B.E.,M.Tech.,M.I.E.
B.E.,M.Tech,PhD,MISTE
Mini-project coordinator
ACKNOWLEDGEMENT
Behind every achievement there is unfathomable sea of gratitude to those who
supported it and without whom it would never have been a reality.
I am thankful to my guide Mr.PRADEESH KUNHIPPANAN Department of
Electronics and Communication Engineering for his inspiration and guidance.
I record esteemed gratitude to Mini Project Coordinator Smt.BINDU M.N., Associate
Professor, Department of Electronics and Communication Engineering for her inspiration and
guidance.
I extend my heartfelt sincere thanks to Dr. RAVIKUMAR M.S., Professor & Head
of Department, Electronics and Communication Engineering, who always built our
confidence and helped me to reach the shore of success.
I gratefully acknowledge for the help rendered by our beloved Principal,
Dr. N.A. JNANESH, for providing constant encouragement and support throughout the
course of our project work.
I
am
deeply
indebted
to
the
Architect
of
modern
Sullia,
CONTENTS
ABSTRACT ........................................................................................................................................................................................ 1
CHAPTER 1: INTRODUCTION............................................................................................................................................ 2
1.1
1.4
TEST BENCH................................................................................................................................................................. 4
1.5
OVERVIEW..................................................................................................................................................................... 5
Page I
Page II
TABLE OF FIGURES
FIGURE 1.1:
Page
ABSTRACT
. This report addresses the design, coding and simulation of a Manchester decoder using State
Machines. The Manchester Decoder are the Front End logics of MIL-STD-1553B protocol,
which is a standard Avionics Bus. The decoder is represented using state machines, which is a
method generally used in the design of Synchronous Systems as against the conventional design
methodology of representing the design using Block Diagrams. The coding of the decoder is
done using VHDL programming language and the functionality is verified using test benches.
The report gives a description of decoders in general, a brief about state machines and why we
choose state machines for our project and a brief about MIL-STD 1553B.
Page 1
CHAPTER 1: INTRODUCTION
This projects aims to study, design and implement the front-end logics of a 1553B protocol
device- MIL-STD-1553B Manchester Encoder-Decoder using a state machine. Synchronous
design using State machines will be used to design the logics involved and the same will be
coded in VHDL, simulated.
the mid-1980s the U.S. Department of Defense and the IEEE sponsored the development of this
hardware description language with the goal to develop very high-speed integrated circuit. It has
become now one of industrys standard languages used to describe digital systems. The other
DEPARTMENT OF ELECTRONICS AND COMMUNICATION, KVGCE
Page 2
widely used hardware description language is Verilog. Both are powerful languages that allow to
describe and simulate complex digital systems. A third HDL language is ABEL (Advanced
Boolean Equation Language) which was specifically designed for Programmable Logic Devices
(PLD). ABEL is less powerful than the other two languages and is less popular in industry. This
project uses VHDL, as described by the IEEE standard 1076-1993.
VHDL uses reserved keywords that cannot be used as signal names or identifiers. Keywords and
user-defined identifiers are case insensitive. Lines with comments start with two adjacent
hyphens (--) and will be ignored by the compiler. VHDL also ignores line breaks and extra
spaces. VHDL is a strongly typed language which implies that one has always to declare
the type of every object that can have a value, such as signals, constants and variables.
Page 3
b)
Procedures to do: The tasks or processes that will transform the input into the output.
c)
Procedures to check: The processes that determine that the output meets the standards.
d)
Page 4
A test bench is the highest level in the hierarchy of the design. It instantiates the device under
test. The test bench provides the necessary input stimulus to the device under test and examines
the output from the device under test.
1.5 OVERVIEW
The scope is to MIL-STD-1553B decoder using state machines, coding using VHDL and
verifying by simulation using a VHDL test bench.
MIL-STD 1553B is a military standard which is widely used in avionics and satellite
communication to interface between different sub systems. To design the encoder and the
decoder, state machines are used instead of the conventional design using Block diagrams and
the coding is done using VHDL. The verification by simulating is done using a test bench.
Page 5
Page 6
3.1 BACKGROUND
In the 1950s and 1960s, aviation electronics, referred to as avionics, were simple stand-alone
systems. The navigation, communications, flight controls, and displays consisted of analog systems.
Often these systems were composed of multiple boxes, or subsystems, connected to form a single
system. Various boxes within a system were connected with point-to-point wiring. The signals
mainly consisted of analog voltages, synchro-resolver signals, and switch contacts. The location of
these boxes within the aircraft was a function of operator need, available space, and the aircraft
weight and balance constraints. As more and more systems were added, the cockpits became more
crowded, the wiring more complex, interfaces became more complex and varied and the overall
weight of the aircraft increased.
By the late 1960s and early 1970s, it became necessary to share information between the various
systems using a standard interface to reduce the number of black boxes and the types of interfaces
required by each subsystem.
information, could provide that data to the navigation system, the weapons system, the flight
control system, and pilots display system.
However, the avionics technology was still basically analog, and while sharing sensors did produce
a reduction in the overall number of black boxes, the connecting signals became a rat's nest of
wires and connectors. Moreover, functions or systems that were added later became an integration
nightmare, as additional connections of a particular signal could have potential system impacts.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION, KVGCE
Page 7
Additionally, as the system used point-to-point wiring, the system that was the source of the signal
typically had to be modified to provide the additional hardware to output to the newly added
subsystem. As such, inter-system connections had to be kept to the bare minimum.
By the late 1970s, with the advent of digital technology, digital computers had made their way into
avionics systems and subsystems. They offered increased computational capability and easy
growth, compared to their analog predecessors. However, the data signals, inputs and outputs from
the sending and receiving systems were still mainly analog in nature. This led to the configuration
of a small number of centralized computers (typically only one or two) being interfaced to other
systems and subsystems via complex and expensive analog-to-digital and digital-to-analog
converters. As time and technology progressed, the avionics systems became more digital. And
with the advent of the microprocessor, things really took off. A benefit of this digital application
was the reduction in the number of analog signals, and hence the need for their conversion.
Transferring the data between users in digital form could provide a greater sharing of sensor
information. An additional side benefit was that digital data could be transferred bi-directionally,
wherein analog data was transferred unidirectional. Serial rather than parallel transmission of the
data was used to reduce the number of interconnections within the aircraft and the receiver/driver
circuitry required with the black boxes.
But this alone was still not enough. A data transmission medium, which would allow all systems
and subsystems to share a single and common set of wires, was needed. By sharing the use of this
interconnect, the various subsystems could send data between themselves and to other systems and
subsystems, one at a time, and in a defined sequence, hence a data bus.MIL-STD-1553B defines the
term Time Division Multiplexing (TDM) as the transmission of information from several signal
sources through one communications system with different signal samples staggered in time to form
DEPARTMENT OF ELECTRONICS AND COMMUNICATION, KVGCE
Page 8
a composite pulse train. For our example in Figure 1b, this means that data can be transferred
between multiple avionics units over a single transmission media, with the communications
between the different avionics boxes taking place at different moments in time, hence time division.
3.1.3 APPLICATIONS
Since its inception, MIL-STD 1553B has found a lot of applications to interface various
subsystems of a complex system. The applications are:a) The standard has been applied to satellites as well as payloads within the space shuttle (it is
even being used on the International Space Station).
b) The standard has been employed on large transports, aerial re-fuelers, and bombers, tactical
fighters, and helicopters.
c) This data bus is even contained within missiles and serves, in some instances, as the
primary interface between the aircraft and a missile.
d) The Navy has applied the data bus to both surface and subsurface ships.
e) The Army, in addition to its helicopters, has put 1553 into tanks and howitzers.
f) Commercial applications have applied the standard to systems including subways, for
example the Bay Area Rapid Transit (BART), and manufacturing production lines.
Page 9
MIL-STD-1553 defines certain aspects regarding the design of the data bus system and the black
boxes to which the data bus is connected. The standard defines four hardware elements. These
are:
a) The transmission media.
b) Remote terminals.
c) Bus controllers.
d) Bus monitors.
e) Terminal hardware.
The transmission media, or data bus, is defined as a twisted shielded pair transmission line
consisting of the main bus and a number of stubs. There is one stub for each terminal connected
DEPARTMENT OF ELECTRONICS AND COMMUNICATION, KVGCE
Page 10
to the bus. The main data bus is terminated at each end with a resistance equal to the cable's
characteristic impedance (plus or minus two percent). This termination makes the data bus
behave electrically like an infinite transmission line.
Optionally, include one typical 1553 bus interface showing all the elements for clarity
Remote terminals are defined within the standard as All terminals not operating as the bus
controller or as a bus monitor. Therefore if it is not a controller, monitor, or the main bus or
stub, it must be a remote terminal. The remote terminal comprises the electronics necessary to
transfer data between the data bus and the subsystem. For 1553 applications, the subsystem is the
sender or user of the data being transferred. In the earlier days of 1553, remote terminals were
used mainly to convert analog and discrete data to and from a data format compatible with the
data bus. The subsystems were still the sensor that provided the data and computer, which used
the data. As more and more digital avionics became available, the trend has been to embed the
remote terminal into the sensor and computer. Today it is common for the subsystem to contain
an embedded remote terminal.
Page 11
The electronic hardware between a remote terminal, bus controller, and bus monitor doesnt
differ much. Both the remote terminal and bus controller (and bus monitor if it is also a remote
terminal) must have the transmitters/receivers and encoders/decoders to format and transfer data.
The requirements upon the transceivers and the encoders/decoders dont vary between the
hardware elements. All three elements have some level of subsystem interface and data
buffering. The primary difference lays in the protocol control logic and often this just a different
series of micro coded instructions. For this reason, it is common to find 1553 hardware circuitry
that is also capable of functioning as all three devices. There is an abundance of off-the-shelf
components available today from which to design a terminal. These vary from discrete
transceivers, encoders/decoders, and protocol logic devices to a single dual redundant hybrid
containing everything but the transformers.
Page 12
3.4 PROTOCOL
As we have some knowledge about the hardware requirements, the methodologies with which
the data can be transferred are known as the protocol. The control, data flow, status reporting,
and management of the bus are provided by three word types.
Page 13
The Manchester waveform is as shown in the figure. A transition of the signal occurs at the
center of the bit time. Logic 0 is a signal that transitions from a negative level to a positive
level. Logic 1 is a signal that transitions from a positive level to a negative level.
BIT TIMES
COMMAND/
STATUS
WORD
SYNC
COMMAND/STATUS
PARITY
DATA WORD
SYNC
DATA
PARITY
Page 14
voltage level for the first one and a half bit times and then transitions to a negative voltage level
for the second one and a half bit times. The data sync is the opposite, a negative voltage level for
the first one and a half bit times, and then a positive voltage level for the second one and a half
bit times.
Page 15
CHAPTER4: DESIGN
The design of the encoder and the decoder is based on the following characteristics of MIL-STD
1553B
a) The data rate is 1 MHz
b) Word length is 20 bits which includes a 3 bit sync, 16 bit data with a 1 bit odd parity
c) Data bits/Words is 16 bits
d) It uses the Manchester Bi-phase encoding technique
To design the encoder and decoder the following steps are used
a) A state diagram is drawn for the encoder to encode 16 bit binary parallel data to
Manchester coded serial data.
b) Using state diagram, a VHDL code is written for the encoder which is verified and
simulated using a test bench
c) The block diagram is drawn to decode the encoded data and draw the state diagram to
read the encoded data and decode it
d) A VHDL code is written for the decoder and verified and simulated using a test bench
Output
Page 16
Figure shows the I/O diagram of the Manchester Encoder for MIL-STD-1553 standard.
Functions of the various I/O pins are detailed below:
a) RESET: This is a active low input. The entire logic is reset condition when this input is
low. This signal is generated after the FPGA is powered and the design is loaded. This
initializes all the logics, resets all the flip flops in the design and thus provides a known
state for the start of the function after de-asserting the reset pin.
b) START: The encoder starts encoding at the rising edge of the start input.
c) INPUT DATA: this is the 16 bit data serial data that is Manchester encoded and the parity
of the input data is calculated at the output
d) COMMAND/DATA SYNC: these are 3 synchronization bits that are sent to the output
before the input data indicating if the data that is input is a command/ status or a data word
e) CLOCK: All the synchronous elements in the design are clocked by this clock. The MILSTD-1553 Manchester encoder is at 1Mbps rate, hence, there are two transitions for every
data bit. The Sync signal should be 3 bits wide with transitions at 1.5 bit duration. The
encoded/decoded data should be used by the protocol logic, which also has a series of clock
requirements. The standard protocol chips available off the shelf use a 12MHz clock and
this logic, which is meant to replace the use of these standard chips is also designed using
12MHz clock.
f) ENCODER OUTPUT: As the encoder starts reading the data the initial data read is the
cmd/data flag. When this flag is high it indicates that the next 16 bits are a command or a
status or else the next 16 bits are data. After the sync pulses and the command/status or
data are encoded the computed odd parity is displayed at the end as 1 bit of odd parity
which is also Manchester coded
Page 17
Reset
Idle
Clk>18
Sync1
Datasend
Sync2
Clk count>6
Data count<17
Parity
Parity <= dataout1 XOR
dataout2
DataOut1
DataOut2
Data count = 17,
Check if all 16 bits of
data is received and
display parity
Page 18
C) SYNC2: Sync2 is the second part of the sync pulse. It is the inverse of sync1. The width of
sync2 is also 1.5 clocks (of the 1MHz clock frequency) thus requiring 18 clocks of the 12 MHz
clock frequency given to the encoder. On completion of this state the encoder enters the next
state datasend where it accepts the data to be encoded.
D) DATASEND: In this state the encoder starts receiving the 16 bits of data. It accepts the data
and encodes it bit by bit. As it receives each bit, parity is simultaneously calculated. It then enters
the next state dataout1.
E) DATAOUT1: Each bit received in the previous state is encoded in Manchester format to be
transmitted. The width of this state is 0.5 clock times and the output here is same as that of the
bit received in datasend as per the Manchester format. It consists of 6 clocks of the 12 MHz
clock frequency given to the encoder .The next state is dataout2.
F) DATAOUT2: According to Manchester format the second half of the clock is the inverse of
the data encoded in the first half of the clock. This state represents the second half of the
Manchester coding. The width of this state is 0.5 clock times and the output here is the inverse of
dataout1. This pulse also consists of 6 clocks of the 12 MHz clock frequency given to the
encoder. This whole process of reception of data and encoding in Manchester is repeated 16
times for 16 bits of data. After receiving and encoding the 16 bits of data the encoder enters the
parity state from the state dataout2.
G) PARITY: The parity computed while receiving each data bit is encoded in Manchester
coding similar to that of data. Here odd parity is calculated i.e. if the total number of 1s in the
data is odd, then the parity is 0, else if the total number of 1s in the data is even, then the parity
is 1. After the transmission of this parity bit the encoder enters the idle state and remains there
until the next cycle of transmission.
Page 19
C/D Flag
Par_ok
Encoder output
FIGURE 4.3: BLOCK DIAGRAM OF DECODER
Page 20
c) CLOCK: All the synchronous elements in the design are clocked by this clock. The MILSTD-1553 Manchester encoder is at 1Mbps rate, hence, there are two transitions for every
data bit. The Sync signal should be 3 bits wide with transitions at 1.5 bit duration. The
encoded/decoded data should be used by the protocol logic, which also has a series of
clock requirements. The standard protocol chips available off the shelf use a 12MHz clock
and this logic, which is meant to replace the use of these standard chips is also designed
using 12MHz clock.
d) ENCODER OUTPUT: This is the 20 bit encoded output of the encoder which is the input
to the decoder. This 20 bit input is decoded by the decoder.
e) OUTPUT: this is the 16 bits of data that is input in the encoder in serial form which is
obtained at the output of the decoder after the decoding operation.
f) C/D FLAG: this is a three bit flag which indicates if the 16 bit data obtained is a data or a
command/status word.
g) PAR_OK: this is a 1 bit output which indicates that the data received is valid by
comparing the parity computed by the encoder and the decoder; if the parity is equal the
par_ok is high.
Page 21
a) The differential output of the encoder is given as input to the decoder. This differential
input is converted to single ended input.
b) As the encoder of the encoder and the decoder are different, both the clocks are
synchronized so that the rate at which the data is sent by the encoder is same as the rate at
which the decoder receives the data.
c) To read the encoded data a sample window is created every 6 clock cycles at which half a
bit is read of the encoded data.
d) The encoded data is read and decoded as described in the state diagram.
e) As the data is being decoded the parity is calculates for every bit of the 16 bit
command/status or data simultaneously.
Page 22
f) This calculated parity of the decoder is compared with the incoming parity from the
encoder, if the parities are same, then the decoded data is valid.
g) The valid data is displayed as 16 bit parallel binary data, which is further used by the
BC/RT/MT protocol logics.
When got_sync = 1
Reset
Idle
Sync
get_data
IDLE: On reset the decoder enters into this state. Initialization of all signals and variables are
done here. After the one cycle of data is read, the decoder enters the idle state and remains here
until the reception of next data. Once the decoder starts receiving a signal, it enters the sync state.
SYNC: All 1553 messages should start with a Sync and hence, whenever data arrives, we should
detect for Sync first. In this state the sync bits are received. We receive 1 bit for each 6 clocks
thus receiving 6 bits for the entire sync pulse. If the received bits are either 000111 or
111000 the appropriate flag is raised and the decoder enters the next state get_data. When the
received sync is 111000, it is a command/status word and if the received sync is 000111, it
is a data word.
Page 23
GET_DATA: The Manchester encoded data and parity bits are received in this state. For each
Manchester encoded data the bit is decoded and extracted. As each bit is extracted the parity is
simultaneously computed. The computed parity and the received parity are checked. If both are
same the data is valid and can be used else it should be immediately discarded. After the parity is
received, the decoder enters the idle state and remains in that state until the reception of the next
cycle of data.
Page 24
Page 25
As a general test bench the test bench or also known as the stimulus driver gives the inputs to the
device under test.
Initially the encoder design is verified and simulated. This is done by giving all the input signals
to the designed encoder i.e. the required clock, start signal, reset signal, cmd/data flag and
data_in. These inputs are given for a specific amount of time and the results are tested.
Once the encoder design is perfect the output of the encoder is given as the data input to the
decoder along with the other common signals which are the start, reset and a clock signal. These
signals are given to the decoder which the present device under test through another test bench.
The test bench drives all the internal signals of the device under test and gives us the output of
the decoder. This output is compared to input of the encoder, if not satisfactory then the
necessary changes are made in the code of the respective programs.
Page 26
Page 27
CHAPTER 7: CONCLUSION
MIL-STD-1553 Manchester Encoder-Decoder, which is the front end logics of a 1553 protocol
device, has been successfully designed and realized using State machines. This project has given
us a good insight and understanding on synchronous design techniques, designing using state
machines, programming in VHDL. It has also given us a good understanding on MIL-STD
1553B.
During the design process, we got a good understanding on the behavioral style of programming
in VHDL using state machines. This project has given us an insight on the method of testing the
design using test benches.
Page 28
BIBILOGRAPHY
1. http://www.scribd.com/doc/49284395/MIL-STD-1553Tut
2. http://microsat.sm.bmstu.ru/e-library/military%20standatds/MIL-STD-1553Tut.pdf
3. http://www.ee.iitm.ac.in/~balajis/EE5000/MC_TDM.pdf
4. http://www.atmel.com/images/doc9164.pdf
5. http://en.wikipedia.org/wiki/Manchester_code
6. VHDL primer by douglas perry
Page 29