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] Rising Edge Detector Synchronization Problem

Status
Not open for further replies.

hsnhsyn1

Junior Member level 1
Junior Member level 1
Joined
Mar 19, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,400
hello, i designed an edge detector in verilog. it's RTL seems correct, but in simulation the output pulse is delayed. The examples on the internet, the pulse starts exactly with the rising edge of the clock signal. i used no delay in simulation.
capture from the simulation
Capture.PNG

and the code
Code:
module re_detector(Clk, sign_in, Sync_clk);

// input ports
input Clk, sign_in;
// output ports
output wire Sync_clk;
reg 	Q;
wire 	sign_in;

always@(posedge Clk)begin
	Q <= sign_in;
end
assign Sync_clk = sign_in & (~Q);
endmodule
 

What's your problem? The simulation is obviously a timing simulation, using realistic chip timing. The output like expectable from a real chip.

Apparently you are using Altera QSIM which does a gate level timing simulation.
 

yes, i'm using quartus simulator. i'm new to designing in HDL and i don't know whether the results are correct. because in the examples i looked up, the output pulse (sync_clk) toggles as the input signal (sign_in) goes up. like in this one
PHP:
http://fpgacenter.com/examples/basic/edge_detector.php
 

Both results are correct, they just represent different types of simulation. Please consider that most of delay shown in the timing simulation is actually IO delay, which is large compared to internal logic cell delay.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top