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.

counter design with negative and positive edge

Status
Not open for further replies.

ASIC_intl

Banned
Joined
Jan 18, 2008
Messages
260
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
0
HI

I want to know the way of designing a counter using both the positive and negative edgse of the clock to get output waveforms which are not of 50% duty cycle.

Regards
 

You can try inserting buffers to get the output data away from the clock.
 

how about this following code? does this meet ur spec. ?

`define width 2
`define delay 2

module example(clk,rst,counter);

input clk,rst;
output [`width:0] counter;

reg [`width:0] counter;

always@(clk)
gen_clk = #`delay clk;

always@(posedge clk or negedge gen_clk or negedge rst)
if(!rst)
counter <= 'b0;
else
counter <= counter+1'b1;

endmodule
 

The suggested code isn't synthesizable cause it would require flip-flops that operate on both edges. They don't exist in FPGA or ASICs as far as I know. Also delay statements are usable in simulation only!

Various solutions for frequency dividers operating on both edges have been posted at EDAboard, I assume that you'll be able to find some of them, They are generally using positive and negative clocked flip-flops with combinational logic.
 

yes, its not a synthesizable option. it can only be used in behavioural modelling.
 

Hi FVM

Can u please let me know some websites in Edaboard or any other websites where I can find out solutions of frequency dividers operating in both the edges?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top