Reordered into alphabetical order
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
`timescale 1ns / 1ps
|
||||
|
||||
module BasicModules();
|
||||
endmodule
|
||||
|
||||
module gen_clock();
|
||||
|
||||
reg clk;
|
||||
@@ -17,6 +14,20 @@ module gen_clock();
|
||||
|
||||
endmodule
|
||||
|
||||
module mux(input wire [1:0] switch,
|
||||
input wire [8:0] A,B,C,D,
|
||||
output reg [8:0] out);
|
||||
|
||||
always @(A,B,C,D,switch) begin
|
||||
case (switch)
|
||||
2'b00 : out = A;
|
||||
2'b01 : out = B;
|
||||
2'b10 : out = C;
|
||||
default: out = D;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
module register(input wire clk, reset,
|
||||
input wire [1:0] En,
|
||||
input wire [8:0] Din,
|
||||
@@ -35,18 +46,3 @@ module register(input wire clk, reset,
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
module mux(input wire [1:0] switch,
|
||||
input wire [8:0] A,B,C,D,
|
||||
output reg [8:0] out);
|
||||
|
||||
always @(A,B,C,D,switch) begin
|
||||
case (switch)
|
||||
2'b00 : out = A;
|
||||
2'b01 : out = B;
|
||||
2'b10 : out = C;
|
||||
default: out = D;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
|
||||
|
||||
Reference in New Issue
Block a user