Verilog Code For Seven Segment Display
Verilog Code For Seven Segment Display
//Verilog module
module BCD to segment7(BCD,SEG)
Unknown
end
assign distance = (dist_counter ** (-1)) * 340; // speed of sound in
air
endmodule
input clk,
input rst_n,
input cclk,
genvar i;
generate
.rst(rst),
.clk(clk),
.compare(i),
.pwm(led[i])
);
end
endgenerate
endmodule
else
temp <= 0;
assign clkout = temp|clk;
endmodule
Ex:
initial clk = 0;
always #10 clk = ~clk;
Ex:
always begin
clk = 0;
#10;
clk = 1;
#10;
end
OR
always
begin
clk = 0;
end
always @(*)
begin
end
endmodule
Lab 5
// Code your design here
/*
Author:- Alfred Li
Company: HKUspace
*/
output pem_out;
input [3:0]ratio;
adder_4bit u2
(.a(ratio),.b(count),.cin(1'b0),.sum(),.cout(pwm_out));