Fix mismatch in AMO logic of serpent cache missunit.

This commit is contained in:
Michael Schaffner 2018-11-28 02:34:46 +01:00
parent 0408e9fc38
commit 5a9835d40e
No known key found for this signature in database
GPG key ID: 7AA09AE049819C2C

View file

@ -201,8 +201,8 @@ module serpent_dcache_missunit #(
///////////////////////////////////////////////////////
// if size = 32bit word, select appropriate offset, replicate for openpiton...
assign amo_data = (amo_req_i.size==2'b10) ? {amo_req_i.operand_b[amo_req_i.operand_a[2]*32 +: 32],
amo_req_i.operand_b[amo_req_i.operand_a[2]*32 +: 32]} :
assign amo_data = (amo_req_i.size==2'b10) ? {amo_req_i.operand_b[0 +: 32],
amo_req_i.operand_b[0 +: 32]} :
amo_req_i.operand_b;
// always sign extend 32bit values