Need help with ALU design instructions

  • Thread starter Thread starter esmeco
  • Start date Start date
  • Tags Tags
    Alu Design
AI Thread Summary
The discussion focuses on implementing "branch if greater than or equal" (BGE) and "set if less than" (SLT) instructions in a 16-bit ALU for MIPS architecture. The user proposes using XOR to handle overflow for SLT, suggesting that the signal bit could be connected to the ALU's less input. However, they express confusion about how to combine the SLT and branch equal (BEQ) operations to effectively implement BGE. The user seeks guidance on integrating these components within their ALU design. Overall, the thread highlights the challenges of implementing conditional branching and comparison operations in ALU design.
esmeco
Messages
144
Reaction score
0

Homework Statement




Hello!

I need to implement a "branch if greater than or equal" and a "set if less than" in my 16-bit ALU (MIPS architecture),but I'm having some difficulties with it.




Homework Equations



The "set if less than" I think,if one considers overflow,it could be implemented XOR-ing the signal bit with the overflow and then,connecting it to the less input (setting all less bits less the LSB to 0) of ALU 0,right?


The Attempt at a Solution



The "branch if greater than or equal" is what giving me some troubles.
I know that a "branch if greater than or equal" is a pseudo-instruction that can be done as a slt and a beq.
But how do I mplement that in my ALU?If the slt above mentioned is correct and considering I also have designed a beq(NOR dos bits do resultado),how do I put these 2 together in order to create a bge?

Thanks in advance for all the help!
 
Physics news on Phys.org
I really need some help on this!
 
Back
Top