-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathR8.v
More file actions
46 lines (42 loc) · 920 Bytes
/
Copy pathR8.v
File metadata and controls
46 lines (42 loc) · 920 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
45
46
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 14:30:55 05/30/2018
// Design Name:
// Module Name: R8
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module R_8(wr,rst,clr,enY,enS,swp2,clk,bus3,bus5,data
);
input wr,enY,enS,rst,clr,swp2;
input clk;
input [7:0] bus5;
//output [7:0] bus4;
input [7:0] bus3;
output reg [7:0] data= 8'b0;
always @ (negedge clk) begin
if (rst)
data<= 8'b0;
else if (enY) begin
if (wr)
data <= bus3;
else if (clr)
data<= 8'b0; end
//if (enS) begin
if (swp2 & enS)
data<= bus5;
//end
end
endmodule