-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstant_unit.v
More file actions
44 lines (41 loc) · 803 Bytes
/
constant_unit.v
File metadata and controls
44 lines (41 loc) · 803 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
37
38
39
40
41
42
43
44
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 10/22/2022 06:37:51 PM
// Design Name:
// Module Name: constant_unit
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module constant_unit(
input [5:0] IM,
input CS,
output [7:0] CU_out);
reg [7:0] constantunit;
always@(*)
begin
if (CS==0)
begin
constantunit[5:0]=IM;
constantunit[7:6]=2'b00;
end
else if (CS==1)
begin
constantunit[5:0]=IM;
constantunit[7]=IM[5];
constantunit[6]=IM[5];
end
end
assign CU_out=constantunit;
endmodule