-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignExtensionShiftAmount.v
More file actions
36 lines (32 loc) · 880 Bytes
/
SignExtensionShiftAmount.v
File metadata and controls
36 lines (32 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 10/19/2019 12:17:20 PM
// Design Name:
// Module Name: SignExtensionShiftAmount
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module SignExtensionShiftAmount(Input, Output );
/* A 16-Bit input word */
input [4:0] Input;
/* A 32-Bit output word */
output reg [31:0] Output; //using always @
//output [31:0] out; //using assign stateme
parameter ONES = 27'b111111111111111111111111111, ZEROES = 27'b000000000000000000000000000;
always @(Input)
begin
Output <= {ZEROES, Input};
end
endmodule