C++ Programming Assignment

ManOnFire00
406_TakeHomeAssignment.pdf

Must be in C++ Programing

Given a 𝐼2𝐶 trace file, write a function to determine the various transactions.

The trace files are provided in the zip file and are called t0.txt, t1.txt, t2.txt, t3.txt, t4.txt and t5.txt

The list of the transactions for t0.txt, t1.txt and t2.txt are provided in t0.logfile, t1.logfile and t2.logfile for your

reference.

Name of the function must be:

Void iRC_parse (if stream in file, of stream out file)

Output File Contents:

1. Total # of Transactions (including NACK) 2. Total # of Master Writes 3. Total # of Master Reads 4. Total # of Acknowledged Transactions 5. Total # of Not Acknowledged Transactions 6. List of all Read/Write operations

Example: Type Address Data

R 0x40 0xAB

W 0x44 0xB5

W 0x70 0x0F

Hex Format

Items to Submit

Hard Copy Software Copy

1 Source file containing ONLY iRC_parse called iRC_parse.cpp

2 All files (source code + test inputs) As a Zip file

3 Output of each run using various trace files

4 Description of code. For instance: _Did you use State Machine, Why?