Git Product home page Git Product logo

Comments (9)

pavelkryukov avatar pavelkryukov commented on August 25, 2024

@NullByte4532 Is bubble sort a nice basis for this, how do you think?

from mips-traces.

NullByte4532 avatar NullByte4532 commented on August 25, 2024

i have just tried to write a program that would jump around a tree of conditional jumps based on value of $t0, and change that value after almost every jump, so in the end every condition has been true and false at least one time. In the end $t0 has a value of 42. But instructions BLTZ and BGTZ do not seem to work in simulator.

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

Alexey, I think you didn’t get the goal of the trace correctly (that’s not your fault but mine, as it is not described clearly here). Let’s postpone the discussion until branch prediction lecture is delivered.

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

@NullByte4532 So, I think you get the idea for such trace. Random branches are not good as they are not predictable by any hardware. We need something regular but tricky, that's why bubble sort looks promising here.

from mips-traces.

NullByte4532 avatar NullByte4532 commented on August 25, 2024

I cannot write an interesting branch prediction test when we have only one branching instruction implemented. Do i just write something using only beq or do i need to implement bgtz and bltz in the simulator first?

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

Why only one? We have four branches: beq, bgtz, blez, bne + all the jumps (see here: Supported MIPS instructions). bltz could be implemented via slt:

slt $at, $X, $zero
bne $at, $zero, target

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

But if you really want to use bltz and other instructions, you should ask @inedostoev who is implementing them at the moment.

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

@NullByte4532 bltz is implemented.

from mips-traces.

pavelkryukov avatar pavelkryukov commented on August 25, 2024

@NullByte4532 Any news about bubble sort?

from mips-traces.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.