summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shifter.v10
1 files changed, 1 insertions, 9 deletions
diff --git a/shifter.v b/shifter.v
index 4d7b6b6..01fa40c 100644
--- a/shifter.v
+++ b/shifter.v
@@ -16,13 +16,10 @@ module shifter (
extend == 2'b10 ? {16{v[dir == 1'b0 ? 0 : 15]}} : v
};
- wire [15:0] barrelResult;
- wire [15:0] otherResult;
-
wire [4:0] dirAndAmount;
assign dirAndAmount = {dir, by[3:0]};
- assign barrelResult =
+ assign result =
|(by[15:4]) ? x[15:0] :
dirAndAmount == 5'h1F ? {x[14:0], x[31 ]} :
dirAndAmount == 5'h1E ? {x[13:0], x[31:30]} :
@@ -56,9 +53,4 @@ module shifter (
dirAndAmount == 5'h0E ? x[17: 2] :
dirAndAmount == 5'h0F ? x[16: 1] :
x[31:16];
-
- assign otherResult =
- |(by[15:4]) ? x[15:0] : barrelResult;
-
- assign result = extend == 2'b11 ? barrelResult : otherResult;
endmodule