+-------------------------------------------------------------------------+
|                                                                         |
| Can you give me an example of how to use the DSP56000/1 Simulator ?     |
|                                                                         |
+-------------------------------------------------------------------------+

Example DSP56000/1 Simulator Session using Input and Output Data Files

The example DSP56000/1 Simulator session described below was developed for
an IBM PC environment. The example session assumes the following file
directory structure:

                              +----------+
                              | DSP56001 |
                              +----------+
                                    |
                                    |
                        -------------------------
                        |                       |
                        |                       |
                     +-----+                 +-----+
                     | ASM |                 | SIM |
                     +-----+                 +-----+

Files:            asm56000.exe            sim56000.exe
                  lgsol1.asm              lgin.io
                < lgsol1.lod > -------- < lgsol1.lod >
                < lgsol1.lst >          < lgout.io >

Note: Files that are created by the DSP56000/1 Assembler or Simulator are
      shown above in < brackets >. The user does not need to create these
      files prior to working through the session described below. All other
      files should exist in their respective directories as shown above.
      The prompt from the ASM directory will be shown as "DSP56001\ASM>",
      the prompt from the SIM directory will be shown as "DSP56001\SIM>" and
      the prompt from within the DSP56000/1 Simulator will be shown as ">".

Steps: 1) Obtain DSP56000/1 assembly language source file.

          The assembly language program to be simulated can be created
          using an editor or downloaded from Dr. BuB. For this example,
          the assembly language source file "lgsol1.asm" should be
          downloaded from Dr. BuB. Remember to copy the downloaded file
          "lgsol1.asm" into the ASM directory as shown above.

       2) Assemble the assembly language source file "lgsol1.asm" using the
          DSP56000/1 Assembler.

               DSP56001\ASM>asm56000 -b -l lgsol1.asm
          
          This command assembles the DSP56000/1 assembly language source      
          file "lgsol1.asm" which was downloaded from Dr. BuB. The assembler
          output listing is placed in the file "lgsol1.lst" and the
          assembler output load file is placed in the file "lgsol1.lod".

       3) Create the input data file to be used by the DSP56000/1 Simulator.

               DSP560001\ASM>cd ..\SIM
               DSP560001\SIM>  (Use the editor program of your choice
                               to create the input data file "lgin.io".)
               DSP560001\SIM>type lgin.io

          The first command changes the current directory to the SIM
          directory. The second command will vary depending upon the
          editor used to create the simulator's input data file "lgin.io".
          Note that this file should be located in the SIM directory as
          shown above. The third command is used to verify that the
          contents of the newly created input data file are correct.

          Note: The contents of the DSP56000/1 Simulator input file           
              "lgin.io" are shown later in this file for reference.

       4) Simulate the assembly language program using the DSP56000/1 
          Simulator.

               DSP56001\SIM>copy ..\ASM\lgsol1.lod
               DSP56001\SIM>sim56000 

          The first command copies the assembler output load file
          "lgsol1.lod" from the ASM directory to the SIM directory.
          The second command invokes the DSP56000/1 Simulator.

          Once the DSP56000/1 Simulator has been invoked, the simulator's
          prompt ">" should appear as shown below. The following simulator
          commands should then be entered, one at a time, as shown.

               >reset s

                    This command sets the simulator to the reset state.

               >change bcr 0

                    This command changes the Port A Bus Control Register
                    (bcr) contents to 0. This means that all external
                    memory and external I/O accesses will require zero
                    wait states for purposes of simulation.

               >display on x:0..$a x:$20..$29

                    This command enables the display of two banks of 
                    X memory in the DSP56000/1.

               >load lgsol1

                    This command loads the file "lgsol1.lod" into the
                    simulator. The simulator should initialize the contents
                    of the Program Counter (pc) register to the top of the
                    lgsol1 program at p:$100.

               >input y:$ffff lgin.io

                    This command defines the file "lgin.io" as an input file
                    to the DSP56000/1 Simulator. Thus, all read operations
                    from the DSP56000/1 external I/O memory location y:$ffff
                    will get their data value from the file "lgin.io".

               >output y:$fffe lgout.io

                    This command defines the file "lgout.io" as an output
                    file to the DSP56000/1 Simulator. Thus, all write
                    operations to the DSP56000/1 external I/O memory
                    location y:$fffe will put their data value into the
                    file "lgout.io".

               >break pc>$139

                    This command defines a breakpoint for any program memory
                    location greater than p:$139. If the Program Counter
                    (pc) register should ever exceed p:$139, program
                    simulation will halt and display the currently enabled
                    registers and memory locations.

               >display

                    This command displays all of the currently enabled
                    registers and memory locations. This command is used
                    here to verify that all changes have been made and that
                    everything is in order prior to actual simulation.

               >go

                    This command enables program simulation beginning at
                    the current value of the Program Counter (pc). Program
                    simulation will continue until a previously defined 
                    breakpoint is encountered.

               >quit

                    This command exits the DSP56000/1 Simulator and returns
                    the "DSP56001\SIM>" prompt. Note that the DSP56000/1
                    Simulator output file "lgout.io" will not be available
                    for inspection until the simulator has been terminated
                    using the "quit" command.

       5) Verify that the contents of the DSP56000/1 Simulator output file
          "lgout.io" are correct.

               DSP560001\SIM>type lgout.io

          Note: The contents of the DSP56000/1 Simulator output file
                "lgout.io" are shown later in this file for reference.

       DSP56000/1 Simulator Input Data File: "lgin.io"

       +------------------------------------------------------------+
       | 1                                                          |
       | 400000 200000 200000 200000 200000 200000                  |
       | 200000 200000 200000 200000 200000                         |
       +------------------------------------------------------------+

       The first value in the input data file represents the number of
       speech data frames to be processed by the "lgsol1" program. This
       program performs Linear Predictive Coding (LPC) analysis on speech
       data using the Leroux - Gueguen (LG) algorithm. The following eleven
       (11) values in the input data file represent the normalized
       autocorrelation coefficients required to perform a tenth order LPC
       analysis.

       Note: All DSP56000/1 input data files must be composed of standard
             ASCII characters.

       DSP56000/1 Simulator Output Data File: "lgout.io"

       +------------------------------------------------------------+
       | C00000                                                     |
       | D55556                                                     |
       | E00000                                                     |
       | E66667                                                     |
       | EAAAAC                                                     |
       | EDB6DD                                                     |
       | F00001                                                     |
       | F1C71D                                                     |
       | F33333                                                     |
       | F45D18                                                     |
       +------------------------------------------------------------+

       The ten values in the output data file shown above are the output
       of the LG LPC algorithm. These ten (10) values represent the desired
       reflection coefficents (K's) produced by the tenth order LPC
       analysis.

       Note: All DSP56000/1 output data files are composed of standard
             ASCII characters.



