/*
*-------------------------------------------------------------------------
*
*   Copyright (C), 1994-1998 Aware Inc. All Rights Reserved.
*   Aware DMT Technology. Proprietary and Confidential.
*
*   40 Middlesex Turnpike, Bedford, MA 01730-1413
*   Phone (781) 276 - 4000
*   Fax   (781) 276 - 4001
*
*  README.TXT
*
*  Implementation notes.
*
*-------------------------------------------------------------------------
*/

=============================================================================================
1.0 Program Compilation and Link:
=============================================================================================

Under build (build\g992_2) directory, there are four Microsoft VC++ build projects:

modem       -- build and test CPE C-model
test_aoc -- build test program for testing AOC
test_eoc -- build test program for testing EOC
test_ib     -- build test program for testing indication bit

For example, to build the modem application, follow the steps below:

1) Start MS VC++
2) Open workspace modem.dsw
3) Select "rebuild all"


=============================================================================================
2.0 Flag and Parameter settings:
=============================================================================================
In the NORMAL setting, all flags and #define's in source\include\common\compiler.h should be
set as the same as those in the released software. Any required different setting is indicated

for each test case below.


=============================================================================================
3.0 Running Tests:
=============================================================================================

The following state can be tested individually:


------------- 3.1 TRANSCEIVER TRAINING, CHANNEL ANALYSIS AND EXCHANGE -----------------

3.1.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0.

3.1.2) Command Line Arguments:

   modem txs_in.bin tx_out.bin train.bin rx_out.bin mptrain2.txt

   txs_in.bin (dummy TX input file)
   tx_out.bin ('int16': TX output data for transceiver training and channel analysis)
   train.bin  ('int16': RX input data for transceiver training and channel analysis)
   rx_out.bin (dummy RX output file)
   mptrain2.txt (test option flag file)

   txs_in.bin, train.bin and mptrain2.txt are provided in "testvec\g992_2\input"

3.1.3) Results:

   The output results should be compared to those in testvec\g992_2\train

3.1.4) Test Echo Canceller:

   Use the setting as in 3.1.1), but but change the last argument in the command line so that it reads:
   modem xs_in.bin tx_out.bin train.bin rx_out.bin mptrainec2.txt

   Then do step 3.1.2) and compared the resulting trail_ec.txt with testvec\g992_2\train\trail_ec.txt


------------ 3.2 SHOWTIME ---------------

3.2.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0,

3.2.2) Command Line Arguments:

   modem txs_in.bin tx_out.bin rxs_in0.bin rx_out.bin mpshowtim2.txt 2 0

   txs_in.bin ('uint8': TX input data during showtime)
   tx_out.bin ('int16': TX output data during showtime)
   rxs_in0.bin ('int16': RX input data during showtime)
   rx_out.bin ('uint8': RX output data during showtime)
   mpshowtim2.txt (test option flag file)

   2 and 0 are configuration numbers for TX and RX respectively.

   txs_in.bin, rxs_in0.bin and mpshowtim2.txt are provided in "testvec\g992_2\input"

3.2.3) Results:

   The output results should be compared to those in testvec\g992_2\showtime

3.2.4) Additional Tests:

3.2.4.1) To test showtime using the loop-back method, follow the steps below:

   1) run showtime using:
      modem txs_in.bin tx_out.bin rxs_in0.bin rx_out.bin mpshowtim2.txt 2 0

   2) copy "tx_out.bin" to "rxs_in2.bin"

    3) edit file "config.h" to change "#define RX_NUM_TONES GLITE_DS_NUM_TONES" to "#define RX_NUM_TONES GLITE_US_NUM_TONES"
      and rebuild the project
    (Note: one may also test downstream using the loop back method)

   4) run showtime using:
      modem txs_in.bin tx_out.bin rxs_in2.bin rx_out.bin mpshowtim2.txt 2 2

   You should not see CRC errors in trail.txt file!

-------------- 3.3 BERT ----------------

3.3.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0, but add the following definitions in "compiler.h":

   #define DO_BERT
   #define BERT_SF_CNT 20

3.3.2) Command Line Arguments:

    modem txs_in.bin tx_out.bin rx_bert.bin rx_out.bin mpbert2.txt 2 0

    txs_in.bin (dummy TX input file, real input transmit symbols are generated by function Tx_BERT_PN() )
    tx_out.bin ('int16': TX output data during showtime)
    rx_bert.bin ('int16': RX input data during showtime )
    rx_out.bin ('uint8': RX output data during showtime)
    mpbert2.txt (test option flag file)

    txs_in.bin, rx_bert.bin and mpbert2.txt are provided in "testvec\g992_2\input"

3.3.3) Results:

    The output results should be compared to those in testvec\g992_2\bert

3.2.4) Additional Tests:

    The BERT can also be tested using the loopback method as that used for testing SHOWTIME.


------------- 3.4 FAST RETRAIN -----------------

3.4.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0, but add the following definition in "compiler.h":

   #define TEST_FAST_RETRAIN

3.4.2) Command Line Arguments:

   modem txs_in.bin tx_out.bin fr_vec.bin rx_out.bin mpretrain2.txt

   txs_in.bin (dummy TX input file)
   tx_out.bin ('int16': TX output data during fast retrain)
   fr_vec.bin ('int16': RX input data during fast retrain)
   rx_out.bin (dummy RX output file)
   mpretrain2.txt (test option flag file)

   txs_in.bin, fr_vec.bin and mpretrain2.txt are provided in "testvec\g992_2\input"

3.4.3) Results:

   The output results should be compared with those in \testvec\g992_2\retrain

------------- 3.5 HANDSHAKING ------------------------------------------

Testing of Handshaking includes wake-up from Idle Link state.

3.6.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0.

3.6.2) Command Line Arguments:

   modem txs_in.bin tx_out.bin hndshk.bin rx_out.bin mpghs2.txt

   txs_in.bin (dummy TX input file)
   tx_out.bin ('int16': TX output data for handshaking)
   hndshk.bin ('int16': RX input data for handshaking)
   rx_out.bin (dummy RX output file)
   mpghs2.txt (test option flag file)

   txs_in.bin, hndshk.bin and mpghs2.txt are provided in "testvec\g992_2\input"

3.6.3) Results:

   The output results should be compared to those in testvec\g992_2\hndshk


-------------- 3.6 AOC TEST ----------------------

A separate main program is written to test AOC operation independently from the
other part of the system.

To build test program for testing AOC, use Microsoft VC++
to open the workspace test_aoc.dsw under build\g992_2\test_aoc

3.5.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0.

3.5.2) Command Line Arguments:

   test_aoc rx_aoc.asc

   rx_aoc.asc (RX input data for AOC test)

   rx_aoc is provided in "testvec\input"

3.5.3) Results:

   The output result should be compared with testvec\g992_2\aoc\trail.txt


-------------- 3.7 Indicator Bits TEST ----------------------

A separate main program is written to test Indicator Bits operation
independently from the other part of the system.

To build test program for testing AOC, use Microsoft VC++
to open the workspace test_aoc.dsw under build\g992_2\test_ib

3.7.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0.

3.7.2) Results:

   The transmitted indicator bits result should be compared with testvec\g992_2\ind_bits\ib_out.txt

   The received indicator bits trail file results should be compared
   with testvec\g992_2\ind_bits\trail_ib.txt


-------------- 3.8 EOC TEST ----------------------

A separate main program is written to test EOC operation independently from the
other part of the system.

To build test program for testing AOC, use Microsoft VC++
to open the workspace test_aoc.dsw under build\g992_2\test_eoc


3.8.1) Parameter Setting:

   Use the NORMAL setting as in Section 2.0.

3.8.2) Command Line Arguments:

   test_eoc rx_eoc.asc

   rx_eoc.asc (RX input data for EOC test)

   rx_eoc.asc is provided in "testvec\g992_2\input"

3.8.3) Results:

   The output results should be compared with those in "testvec\g992_2\eoc"



