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.

[SOLVED] Clock generator in verilog?

Status
Not open for further replies.

krishanu007

Member level 2
Member level 2
Joined
Apr 8, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore,India
Activity points
1,594
I want a synthesizable clock generator code in verilog.
please dont give me always #delay clk = ~clk :p
& dont tell me to search google for PLL..
give me material (picture or block diagram or explanation of code) of how its done.:grin:??
 

You can't create generator without external reference clock signal.
So you can only create digital dividers with verilog. You can alse crete ,ultipliers using xor but this requires detailed timing analyses.

// divide-by-2
////////////////////////////////////////////////
input ref_clk;
output reg clk;

always@(posedge ref_clk)
clk<=~clk;
////////////////////////////////////////////////


// multiple-by-2
////////////////////////////////////////
input ref_clk;
output clk;
wire delay_ref_clk;
buf(delay_ref_clk, ref_clk); // this delay used to create new clock pulses
xor(clk, delay_ref_clk, ref_clk);
////////////////////////////////////////
 

hi
what do you mean synthesize clock generator in verilog?
on which platform do you want to synthesize your code?
if you use FPGA you must have a physical oscillator anyway
such as an external crystal oscillator or so,and you can use PLL or prescaler code in verilog to
increase or decrease of clock frequency.

"always #delay clk = ~clk"
is just for simulation in test bench!

also you can try inverter ring oscillator but i'm not sure it work or not!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top