-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathR13.v
41 lines (34 loc) · 770 Bytes
/
R13.v
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 02:11:01 06/02/2018
// Design Name:
// Module Name: R13
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module R13(swpreg,bus5,en,rst,swp2,clk
);
input en,rst,swp2;
input clk;
input [17:0] bus5;
output [17:0] swpreg;
reg [17:0] swpreg=18'd0;
always @ (negedge clk) begin
if (rst)
swpreg<=18'd0;
else if (swp2 & en)
swpreg<= bus5;
end
endmodule