Urgent ~~Simulator Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Milk

    Urgent ~~Simulator Question

    Hi all,
    Can anyone help me to do this Question. Coz this is my first time study C++
    language and my lecture want me to do this kind of program, i really don't
    have any ideal
    pls help me

    here is the Question::
    Improve the following (badly written) matrix multiplicationp rogram and
    translate it into MIPs assembly language then assemble into machine language
    (hexadecimal representation) . You may use a compiler to produce an assembly
    language file and SPIM to produce the final hexadecimal machine language but
    it WILL be faster to compile the program manually given past experience by
    students. It will also mean you need to implement less instructions in the
    simulator, or put it another way, do LESS WORK.

    #define n varies see belowtypedef char index_;typedef longint
    matrix[n + 1][n + 1];main(){ index_ i, j, k; matrix a, b, c; for (j = 0;
    j< n; j++) { for (i = 0; i< n; i++) { a[i][j] = i * j; b[i][j]
    = a[i][j]; } } for (i = 0; i< n; i++) { for (k = 0; k< n; k++)
    { c[k][i] = 0.0; for (j = 0; j < n; j++) c[k][i] += a[k][j]
    * b[j][i]; } }}
    Write a simulator for the final version of the pipelined datapath from your
    text book adding a 1-bit branch predictor and assuming two pipeline delays
    for the data memory. The branch logic MUST remain in the ALU stage; do not
    move it back to the register/decode stage. You MUST use branch flushing (do
    NOT use branch delay slots), you MUST implement data forwarding and detect
    and resolve load hazards.



    Beware the text has a number of errors.

    The simulator must display on screen the contents of pipeline and registers
    being used and 8 memory locations commencing with one currently being
    accessed. A simple text based display is acceptable as long as the screen
    does not scroll every clock cycle! The simulator must also support single
    step operation and be able to run until a particular instruction address is
    reached. The simulator must read in the hexadecimal format machine
    instructions. You may choose what language to use.

    You are only required to implement the instructions used in the
    multiplication program. For Assignment 1 use 16x16 matrices only. The Branch
    Target Buffer must have only 1 entry only (to simplify the problem!).



    ~ Let us linux ~


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
  • Victor Bazarov

    #2
    Re: Urgent ~~Simulator Question

    "Milk" <milkmilk776@ya hoo.com> wrote...[color=blue]
    > Hi all,
    > Can anyone help me to do this Question. [...][/color]

    This is answered in the FAQ (http://www.parashift.com/c++-faq-lite/)
    Enter "homework" into the search field.


    Comment

    • Victor Bazarov

      #3
      Re: Urgent ~~Simulator Question

      "Milk" <milkmilk776@ya hoo.com> wrote...[color=blue]
      > Hi all,
      > Can anyone help me to do this Question. [...][/color]

      This is answered in the FAQ (http://www.parashift.com/c++-faq-lite/)
      Enter "homework" into the search field.


      Comment

      • David Harmon

        #4
        Re: Urgent ~~Simulator Question

        On 11 Apr 2004 00:50:16 +0800 in comp.lang.c++, "Milk"
        <milkmilk776@ya hoo.com> wrote,[color=blue]
        >Can anyone help me to do this Question. Coz this is my first time study C++
        >language and my lecture want me to do this kind of program, i really don't
        >have any ideal[/color]

        "Don't have any idea" questions are often beyond the help that you can
        expect from newsgroups. I think you should go talk to your instructor
        about why his class is not working for you.
        [color=blue]
        >here is the Question::
        >Improve the following (badly written) matrix multiplicationp rogram and
        >translate it into MIPs assembly language then assemble into machine language[/color]

        Of course the assembly language part of that is not on topic here. Did
        you have a question about the C++ part?
        [color=blue]
        >Write a simulator for the final version of the pipelined datapath from your
        >text book adding a 1-bit branch predictor and assuming two pipeline delays[/color]

        That's a pretty large project; you should not expect to accomplish it
        without spending some time on it. Your "Urgent" subject suggests that
        you thought otherwise.

        Comment

        • David Harmon

          #5
          Re: Urgent ~~Simulator Question

          On 11 Apr 2004 00:50:16 +0800 in comp.lang.c++, "Milk"
          <milkmilk776@ya hoo.com> wrote,[color=blue]
          >Can anyone help me to do this Question. Coz this is my first time study C++
          >language and my lecture want me to do this kind of program, i really don't
          >have any ideal[/color]

          "Don't have any idea" questions are often beyond the help that you can
          expect from newsgroups. I think you should go talk to your instructor
          about why his class is not working for you.
          [color=blue]
          >here is the Question::
          >Improve the following (badly written) matrix multiplicationp rogram and
          >translate it into MIPs assembly language then assemble into machine language[/color]

          Of course the assembly language part of that is not on topic here. Did
          you have a question about the C++ part?
          [color=blue]
          >Write a simulator for the final version of the pipelined datapath from your
          >text book adding a 1-bit branch predictor and assuming two pipeline delays[/color]

          That's a pretty large project; you should not expect to accomplish it
          without spending some time on it. Your "Urgent" subject suggests that
          you thought otherwise.

          Comment

          • Claudio Puviani

            #6
            Re: Urgent ~~Simulator Question

            > [snip]

            Your urgent request is important to us. Please stay on the newsgroup and a
            representative will be with you as soon as possible.

            The average wait time is...

            THREE

            ....days.

            <elevator music>


            Comment

            • Claudio Puviani

              #7
              Re: Urgent ~~Simulator Question

              > [snip]

              Your urgent request is important to us. Please stay on the newsgroup and a
              representative will be with you as soon as possible.

              The average wait time is...

              THREE

              ....days.

              <elevator music>


              Comment

              • Milk

                #8
                Re: Urgent ~~Simulator Question

                Hi, Victor Bazarov"
                i really can't find it..coz a lot page so would u mind tell me which day and
                year i need to looking for it?

                "Milk" <milkmilk776@ya hoo.com> ¼¶¼g©ó¶l¥ó·s»D: 4078f8b8@lungfu nggdn.org...[color=blue]
                > Hi all,
                > Can anyone help me to do this Question. Coz this is my first time study[/color]
                C++[color=blue]
                > language and my lecture want me to do this kind of program, i really don't
                > have any ideal
                > pls help me
                >
                > here is the Question::
                > Improve the following (badly written) matrix multiplicationp rogram and
                > translate it into MIPs assembly language then assemble into machine[/color]
                language[color=blue]
                > (hexadecimal representation) . You may use a compiler to produce an[/color]
                assembly[color=blue]
                > language file and SPIM to produce the final hexadecimal machine language[/color]
                but[color=blue]
                > it WILL be faster to compile the program manually given past experience by
                > students. It will also mean you need to implement less instructions in the
                > simulator, or put it another way, do LESS WORK.
                >
                > #define n varies see belowtypedef char index_;typedef[/color]
                longint[color=blue]
                > matrix[n + 1][n + 1];main(){ index_ i, j, k; matrix a, b, c; for (j =[/color]
                0;[color=blue]
                > j< n; j++) { for (i = 0; i< n; i++) { a[i][j] = i * j;[/color]
                b[i][j][color=blue]
                > = a[i][j]; } } for (i = 0; i< n; i++) { for (k = 0; k< n; k++)
                > { c[k][i] = 0.0; for (j = 0; j < n; j++) c[k][i] +=[/color]
                a[k][j][color=blue]
                > * b[j][i]; } }}
                > Write a simulator for the final version of the pipelined datapath from[/color]
                your[color=blue]
                > text book adding a 1-bit branch predictor and assuming two pipeline delays
                > for the data memory. The branch logic MUST remain in the ALU stage; do not
                > move it back to the register/decode stage. You MUST use branch flushing[/color]
                (do[color=blue]
                > NOT use branch delay slots), you MUST implement data forwarding and detect
                > and resolve load hazards.
                >
                >
                >
                > Beware the text has a number of errors.
                >
                > The simulator must display on screen the contents of pipeline and[/color]
                registers[color=blue]
                > being used and 8 memory locations commencing with one currently being
                > accessed. A simple text based display is acceptable as long as the screen
                > does not scroll every clock cycle! The simulator must also support single
                > step operation and be able to run until a particular instruction address[/color]
                is[color=blue]
                > reached. The simulator must read in the hexadecimal format machine
                > instructions. You may choose what language to use.
                >
                > You are only required to implement the instructions used in the
                > multiplication program. For Assignment 1 use 16x16 matrices only. The[/color]
                Branch[color=blue]
                > Target Buffer must have only 1 entry only (to simplify the problem!).
                >
                >
                >
                > ~ Let us linux ~[/color]


                ~ Let us linux ~


                -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                Comment

                • Milk

                  #9
                  Re: Urgent ~~Simulator Question

                  Hi, Victor Bazarov"
                  i really can't find it..coz a lot page so would u mind tell me which day and
                  year i need to looking for it?

                  "Milk" <milkmilk776@ya hoo.com> ¼¶¼g©ó¶l¥ó·s»D: 4078f8b8@lungfu nggdn.org...[color=blue]
                  > Hi all,
                  > Can anyone help me to do this Question. Coz this is my first time study[/color]
                  C++[color=blue]
                  > language and my lecture want me to do this kind of program, i really don't
                  > have any ideal
                  > pls help me
                  >
                  > here is the Question::
                  > Improve the following (badly written) matrix multiplicationp rogram and
                  > translate it into MIPs assembly language then assemble into machine[/color]
                  language[color=blue]
                  > (hexadecimal representation) . You may use a compiler to produce an[/color]
                  assembly[color=blue]
                  > language file and SPIM to produce the final hexadecimal machine language[/color]
                  but[color=blue]
                  > it WILL be faster to compile the program manually given past experience by
                  > students. It will also mean you need to implement less instructions in the
                  > simulator, or put it another way, do LESS WORK.
                  >
                  > #define n varies see belowtypedef char index_;typedef[/color]
                  longint[color=blue]
                  > matrix[n + 1][n + 1];main(){ index_ i, j, k; matrix a, b, c; for (j =[/color]
                  0;[color=blue]
                  > j< n; j++) { for (i = 0; i< n; i++) { a[i][j] = i * j;[/color]
                  b[i][j][color=blue]
                  > = a[i][j]; } } for (i = 0; i< n; i++) { for (k = 0; k< n; k++)
                  > { c[k][i] = 0.0; for (j = 0; j < n; j++) c[k][i] +=[/color]
                  a[k][j][color=blue]
                  > * b[j][i]; } }}
                  > Write a simulator for the final version of the pipelined datapath from[/color]
                  your[color=blue]
                  > text book adding a 1-bit branch predictor and assuming two pipeline delays
                  > for the data memory. The branch logic MUST remain in the ALU stage; do not
                  > move it back to the register/decode stage. You MUST use branch flushing[/color]
                  (do[color=blue]
                  > NOT use branch delay slots), you MUST implement data forwarding and detect
                  > and resolve load hazards.
                  >
                  >
                  >
                  > Beware the text has a number of errors.
                  >
                  > The simulator must display on screen the contents of pipeline and[/color]
                  registers[color=blue]
                  > being used and 8 memory locations commencing with one currently being
                  > accessed. A simple text based display is acceptable as long as the screen
                  > does not scroll every clock cycle! The simulator must also support single
                  > step operation and be able to run until a particular instruction address[/color]
                  is[color=blue]
                  > reached. The simulator must read in the hexadecimal format machine
                  > instructions. You may choose what language to use.
                  >
                  > You are only required to implement the instructions used in the
                  > multiplication program. For Assignment 1 use 16x16 matrices only. The[/color]
                  Branch[color=blue]
                  > Target Buffer must have only 1 entry only (to simplify the problem!).
                  >
                  >
                  >
                  > ~ Let us linux ~[/color]


                  ~ Let us linux ~


                  -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
                  http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
                  -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

                  Comment

                  • Victor Bazarov

                    #10
                    Re: Urgent ~~Simulator Question

                    "Milk" <milkmilk776@ho tmail.com> wrote...[color=blue]
                    > Hi, Victor Bazarov"
                    > i really can't find it..coz a lot page so would u mind tell me which day[/color]
                    and[color=blue]
                    > year i need to looking for it?[/color]

                    i have no ideal what you wrote.


                    Comment

                    Working...