module mux2_1(y,z,e,I0,clk,reset);
input clk,reset;
input I0;
input [7:0]e;
wire I1;
output y;
output [7:0]z;
reg y;
assign z=e<<6;
xor gh(I1,y,I0);
always@(posedge clk)
begin
if (reset==0)
y=0;
else
y=I1;
end
endmodule
module masab();
reg clk,reset;
reg I0;
wire y;
wire [7:0]z;
reg [7:0]e;
mux2_1 fkgf(y,z,e,I0,clk,reset);
always #2 clk=~clk;
initial
begin
e=7'b1101010;
reset=0;clk=0;
#10 reset=1; I0=0;
#20 I0=1;
end
endmodule
This blog shares the convoluted concepts and explains them in the best possible ways to help electrical Engineers learn them.
No comments:
Post a Comment