[Instructions] [Search] [Current] [News] [Syllabus] [Glance] [Links] [Handouts] [Outlines] [Labs] [Assignments] [Exams] [Examples] [Project]
Assigned: Friday, March 3, 2000
Due: Wednesday, March 15, 2000
In this assignment, you will work as a class to simulate the
error-detection and frame alignment aspects of the data-link
layer. For convenience, the portions that deal with the
simulated bits sent and received will use character '0'
for a zero bit and character '1' for a one bit.
Here are the programs that you will need to write to support the simulator. We'll have them run as separate Unix processes.
bitsToChars: converts the actual bits received on
standard input to the ``character-bit'' representation.
For example, on input of Abc this will give an
output of something like 010000010101001101010100.
frameXXX: puts the character-bits from standard
in put into frames. XXX can be ByteStuff,
BitStuff, or ClockBased.
addPrefix: adds a random-length character-bit
prefix to the input
addNoise: takes a character-bit representation
on standard input and flips some percentage of errors (specified
on the command line) before sending to standard output
unframeXXX: reads character-bits from standard
input, identifies frames, discards erroneous frames (with an
accompanying error message printed to stdout)
and sends to contents of the successful frames to standard
output.
charsToBits: undoes bitsToChars
In addition, the frameXXX and unframeXXX
need to be able to add error-detection codes to the payload. They
will rely on two helper functions,
addcodes(char *data),
which builds a new string that adds the error-detecting bits, and
checkbits(char *extendedData), which returns
1 if the error-detection scheme detects no error and 0 if it
detects an error.
Using these programs together, I can see how well the bit-stuffing algorithm does with 1 bit error out of 100 with somethinn like:
% cat example | bitsToChars | frameBitStuff | addPrefix 50 | \
addNoise .001 | unframeBitStuff | charsToBits
Please use class on Wednesday, March 8, and Friday, March 10, to coordinate within and between groups. Attendance those days is mandatory.
The group assignments are as follows:
bitsToChars and charsToBits
addPrefix and addNoise
addcodes and checkbits using CRC-16
addcodes and checkbits using two-dimensional
parity and a row size of eight
frameBitStuff and unframeBitUnstuff
frameByteStuff and unframeByteUnstuff
frameClockBased and unframeClockBased
Additional Notes:
[Instructions] [Search] [Current] [News] [Syllabus] [Glance] [Links] [Handouts] [Outlines] [Labs] [Assignments] [Exams] [Examples] [Project]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS364/2000S/Assignments/assign.05.html
Source text last modified Fri Mar 3 16:28:41 2000.
This page generated on Fri Mar 3 16:31:42 2000 by Siteweaver. Validate this page's HTML.
Contact our webmaster at rebelsky@grinnell.edu