aboutsummaryrefslogtreecommitdiff
path: root/src/rtl/shl32.v
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2015-04-21 16:09:11 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2015-04-21 16:09:11 +0200
commit29d52d2a0878647a47bc573a6f10bc3637d99266 (patch)
treec645714be0fee20cd55d7f4bf731eb6ace40ba69 /src/rtl/shl32.v
parentb8e6a576f11a0f91d31413e4249505d053030403 (diff)
Update of modexp to include more of the integration of residue calculator. Update of shl and shr to simplify code. shl and shr could be replaced by functions.
Diffstat (limited to 'src/rtl/shl32.v')
-rw-r--r--src/rtl/shl32.v28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/rtl/shl32.v b/src/rtl/shl32.v
index d0dd1bc..42521fd 100644
--- a/src/rtl/shl32.v
+++ b/src/rtl/shl32.v
@@ -1,8 +1,8 @@
//======================================================================
//
-// shr32.v
-// ---------
-// 32bit shifter with carry in / carry out.
+// shl32.v
+// -------
+// 32bit left shift with carry in / carry out
//
//
// Author: Peter Magnusson
@@ -36,18 +36,18 @@
//
//======================================================================
-
module shl32(
- input [31 : 0] a,
- input carry_in,
- output wire [31 : 0] amul2,
- output wire carry_out);
+ input wire [31 : 0] a,
+ input wire carry_in,
+ output wire [31 : 0] amul2,
+ output wire carry_out
+ );
- reg [32 : 0] shl_result;
+ assign amul2 = {a[30 : 0], carry_in};
+ assign carry_out = a[31];
- assign amul2 = shl_result[31:0];
- assign carry_out = shl_result[32];
+endmodule // shl32
- always @(a, carry_in)
- shl_result = { a, carry_in };
-endmodule
+//======================================================================
+// EOF shl32.v
+//======================================================================