From f73ce77d4cbe9181f58b2e1c68b6525b9b67dd68 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 28 Oct 2023 18:53:52 +0200 Subject: [PATCH] fix: alu arithmetical shift Has to have signed as arguments --- src/alu.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alu.sv b/src/alu.sv index 1be6dbe02aae425ffd96ce1d7cfabae5706903e4..8ffb0c18612c94eadec74979248145622d21746f 100755 --- a/src/alu.sv +++ b/src/alu.sv @@ -29,7 +29,7 @@ module alu( 3'b100 : out = a ^ real_b; 3'b101 : begin if (sign) - out = a >>> real_b; + out = signed'(a) >>> signed'(real_b); else out = a >> real_b; end