-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRegBcontroller.v
More file actions
36 lines (34 loc) · 766 Bytes
/
Copy pathRegBcontroller.v
File metadata and controls
36 lines (34 loc) · 766 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: 23:59:28 06/04/2018
// Design Name:
// Module Name: RegBcontroller
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module RegBcontroller(bus,read,reg_addr,R1,R2
);
output reg [7:0] bus;
input read,reg_addr;
input [7:0] R1,R2;
always @(read or reg_addr or R1 or R2)
if (read)
if (reg_addr)
bus<=R2;
else
bus<=R1;
else
bus<=8'b0;
endmodule