_TOP_MENU

Showing posts with label Clock Dividers. Show all posts
Showing posts with label Clock Dividers. Show all posts

Mar 22, 2024

Table of Contents


Here is the blog site map. Feel free to post your feedback to improve it further. 

CONTENTS

1.Introduction : 

1.1  Career Growth in VLSI Industry

1.2  The Future of Semiconductor 

2. VLSI Topics

2.1  Semiconductor Job Portal - Intern & freshers  

2.2  Digital Design for Beginners and Professionals

2.3  Career Growth in VLSI Industry

2.4  The Future of Semiconductor 

2.6  VLSI Industry Update

2,7  List of Semiconductor Companies

2.8  Top 10 VLSI companies

2.9  VLSI Industry Updates

2.10 Engineering Basics

2.11 Open Sourced FREE CAD/EDA VLSI tools 

2.12 List of top 10 companies in Semiconductor - 2021 

2.13 The best top 20 universities for MS in Digital VLSI in USA

2.14 Solution: Verilog HDL A guide to Digital Design and Synthesis - Samir Palnitkar 

2.15 Question Answer on VLSI Semiconductor 


 3. Digital Design:

3.1  Low Power Design Technique

3.7  UPF Example 

3.23 Type of Adders with Verilog Code

3.24 VHDL operator 

3.25 Asynchronous FIFO with Programmable Depth

3.26 Asic Implementation Design Cycle 

3.27  Comparing AMBA AHB to AXI Bus using System Modeling. 

3.28 Difference between I2C or CAN protocol ? 

3.29  Retention Cells - UPF



4. Semiconductor Interface/Bus Protocols

4.4  SPI

4.7  Microwire IP Interface 

6.18 Verilog code for Synchronous FIFO ( First In First Out  )


10.3 Physical Aware Synthesis 


11. Integrated-Circuit Fabrication


12. AHB-AXI Protocol 


13. PCIe Protocol 


14. Solution  :Samir Palnitkar : A Guide to Digital Design and Synthesis 

15. Place holder5


16. DAA


17. Scripting/Others

17.3  GVIM Help


18. Interview Preparation

18.5 Digital Design Interview Question on PCIe express 

 

19. Academic/ Educational Projects with Micro-Architecture and Verilog code

19.4  Microwire IP  


20. Verification


21. Physical Design

21.2 Physical Design - Common Questions  


22. General Question:

22.1  Logical Question

22.2  APTITUDE Question for Interviews


22B . VLSI Quiz 

22B.1  Quiz1 : Digital Design


23. Non-VLSI Topics:

23.8 How to start a academic project 

23.9  Team Leadership Score check 

23.10 Team Leadership Question/Answer

23.11 Being productive while working from home 


24. Salary Around the Globe

24.1 Norway Salary - Average salary for Senior Software Engineer in Norway with 10+ years experience? 

24.2  Sweden Salary - An Average salary in Sweden for IT professional  


25. Job Opportunities in Norway 

25.1  Norway Salary - Average salary for Senior Software Engineer in Norway with 10+ years experience? 

25.2  Is it hard to get a job in Norway, as a foreigner?

25.3  Living cost in Norway , compared with India

 

26. Finland Opportunities in IT Sector

26.1  Moving to Finland from India , is it worth ?

27. Funny Posts ( non technical )

27.1 40+ Photos That Evoke a Lot of Curious Questions and Can’t Be Explained


Feb 2, 2014

Clock Dividers and Multipliers



Q1 How to generate a divide by -N clock ?

Generate Divide by 2 Clock - 

Below is circuit for Divide by 2 clock , this is nothing but a T-FlipFlop.





Divide by 3 Clock with 50% duty cycle - 

To generate divide by 3 clock with 50 % duty cycle, you need to use negedge and posedge flops. There is not much logic between the flops, so signals going from posedge to negedge or negedge to posedge , will not be having any timing issue. Half clock cycle will be sufficient to meet the timing. But if frequency is too high , then check gate timing. Half clock cycle may be close to meet timing.



Most solutions that came in, utilized 4 or 5 flip flops plus a lot more logic than I believe is necessary. The solution, which I believe is minimal requires 3 flops - two working on the rising edge of the clock and generating a count-to-3 counter and an additional flop working on the falling edge of the clock.


Below is block diagram which shows the posedge and negedge flops.


Below is RTL code in Verilog, it is not  synthesizable but anyone can make it using reset the flops.

---------------------------
module clk_div_3;

reg clk=0;

parameter PERD = 10 ;
always  #PERD clk = ~clk;
reg [1:0] cnt = 0;
reg cnt_lsb_negedge;

always @(posedge clk)begin
if(cnt == 0)
 cnt <= 2;
         else
  cnt = cnt -1 ;
end
wire cnt_lsb;

assign cnt_lsb = (cnt ==2);

always @(negedge clk)
cnt_lsb_negedge <= cnt_lsb;

real cur_time;
real prev_time;
always @(clk) begin
cur_time <= $time;
  prev_time <= cur_time;
end

wire div_3;
assign div_3 = ~((cnt_lsb) || (cnt_lsb_negedge));

endmodule
----------------------------------------------



Divide by 5 Clock - 

To generate div-5 clock , you can use Mod5 counte 3 flops. there are 2 options.
1st option - for mod5 counter , toggle signal in every 3 count and then 2 count , this will give you div5 clock but duty cycle will be 40/60% .

2nd option -  for 50% duty cycle, you need one negedge flop to detect negedge after count 1 , assuming counter will start from 0.

So here is the logic -

counter --   0 ,1 ,2, 3, 4 ,0, 1, 2 ,3 ,4        --- 60 / 40 % duty cycle
counter --   0 ,1 ,2, 3, 4 ,0, 1, 2 ,3 ,4 ,

at counter value 2, use negedge to detect and then you can use some gates to generate divided by clock.

All odd number divider works on same logic, you just need to pick correct counter to generate clock and optimize logic.

You also need to consider the gate delay here, due to combinational gates , a glitch may propagate to design. Draw your circuit on paper and draw waveform out of it. If there is glitch then your clock divider will not work. Make sure there should not be any glitch.


Clock Multiplier 

Normally we use PLL/DLL  to generate desire clock frequency, but that will come in cost and area. there are other alternative ways to generate clock multiplication , like multiply by 2, use posedge and negedge of clock. If there is a requirement of precise frequency , you can use delay gates and generate clock out of it.




-- Rahul J