Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Clock Divider and selection

Status
Not open for further replies.

prabhu.er

Newbie level 5
Joined
Oct 13, 2007
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
clock divider verilog code

Dear All,

Here, I given clock selection logic. please help this verilog code is ok or not for Digital ASIC Design and this code is good for synthesis?


module clk_sel(
clk1,
clk2,
clk3,
sel_val,
sel_en,

clk_out
)

input clk1, clk2, clk3, clk4;
input [1:0] sel_val;
input sel_en;

output clk_out;
wire clk_out;

reg sig_clk_out;


assign clk_out = (sel_en) ? sig_clk_out : 1'b0;

always @ (sel_val or clk1 or clk2 or clk3 or clk3)
// In sensitivity list I given all clock signal it is correct
begin
sig_clk_out = 1'b0;

case(sel_val)

2'b00:
sig_clk_out = clk1;
2'b01:
sig_clk_out = clk2;

2'b10:
sig_clk_out = clk3;

2'b11:
sig_clk_out = clk4;

default:
sig_clk_out = 1'b0;
endcase

end

endmoudule



Regards,
Prabhu
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top