Common Questions About Mano's Simple Machine Projects

Last updated 2002/03/27

New and updated entries are highlighted.


Contents

Notes:

  1. Do not use StorageObject's backDoor function

Questions:

  1. Is the provided implementation of CIR and CIL broken?

Notes

     
  1. StorageObject void backDoor (long x): The StorageObject class does contain a function void backDoor (long x) that allows you to load a value into any storage object. You are not allowed to use this function, as it is a hack that exists for testing. Any use of this function will result in point loss on the lab.

Questions

     
  1. > It looks like the mano program in ~icsg720/pub/bin.solaris/small_mano
    > might have an error in it when executing CIR/CIL instructions.  After
    > loading a hexadecimal 8001 into AC, CIR yields a 4000 value in AC and
    > CIL yields 0002.  It looks like it's not picking up the 1 bits on the
    > ends when circulating.
    

    The program is correct, Mano's definition of CIR/CIL are different from the standard. What he does is rotate the AC through the E register so...

    Inital          E=0 AC=8001
    after CIR       E=1 AC=4000
    after CIL       E=1 AC=0002
    

    What is happening is the E register is acting like the 17th bit of the AC for purpose of the rotate. So if we start with an E=1...

    Inital          E=1 AC=8001
    after CIR       E=1 AC=C000
    after CIL       E=1 AC=0003
    

    This can be seen in the RTL for the instruction (note that these are all done in parallel):

    CIR     rB(7):  AC <- shrAC, AC(15) <- E, E <- AC(0)
    CIL     rB(6):  AC <- shlAC, AC(0) <- E, E <- AC(15)
    


Back toCourse Home Page
Back toMy Home Page