1
0

use UFix instead of Bits for arithmetic

This commit is contained in:
Andrew Waterman 2013-05-18 00:45:29 -07:00
parent dfa7a03f73
commit 1dab984231

View File

@ -669,7 +669,7 @@ class AMOALU(implicit conf: DCacheConfig) extends Component {
val word = io.typ === MT_W || io.typ === MT_WU || io.typ === MT_B || io.typ === MT_BU
val mask = Fix(-1,64) ^ (io.addr(2) << 31)
val adder_out = (io.lhs & mask) + (io.rhs & mask)
val adder_out = (io.lhs & mask).toUFix + (io.rhs & mask)
val cmp_lhs = Mux(word && !io.addr(2), io.lhs(31), io.lhs(63))
val cmp_rhs = Mux(word && !io.addr(2), io.rhs(31), io.rhs(63))