Skip to content

Commit

Permalink
Solve naming conflict with Yosys
Browse files Browse the repository at this point in the history
Yosys and other synthesis tools already have internal ALU blocks which
collide with a module named ALU
  • Loading branch information
David Lanzendörfer committed Aug 19, 2024
1 parent dbcb06a commit 4eaca97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/rocket/ALU.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ abstract class AbstractALU[T <: ALUFN](val aluFn: T)(implicit p: Parameters) ext
}

class ALU(implicit p: Parameters) extends AbstractALU(new ALUFN)(p) {
override def desiredName = "RocketALU"

// ADD, SUB
val in2_inv = Mux(aluFn.isSub(io.fn), ~io.in2, io.in2)
val in1_xor_in2 = io.in1 ^ in2_inv
Expand Down

0 comments on commit 4eaca97

Please sign in to comment.