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.

A simple Verilog question about rising edge of a signal

Status
Not open for further replies.

nervecell_23

Member level 1
Joined
Apr 26, 2013
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,565
Hi guys,

I want to set a signal HIGH for only one clock cycle at the rising edge of another signal, can I use the following code?
Code:
always@((posedge clk)&&(posedge SIGNAL))
begin
    .......
end

Thanks!
 

Can you explain it more? Do you want to set a signal using two clocks?
 

Assume you need an edge detecting circuit.
EdgeDetect.png

Code:
assign out = Q1 & (!Q2);
always @(posedge clk or negedge rst)
	if (!rst)
		begin
			Q1 <= 1'b0;
			Q2 <= 1'b0;
		end
	else
		begin
			Q1 <= In;
			Q2 <= Q1;
		end
 

I think you can. But how you are going to limit it for one clock cycle?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top