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.

verilog basic question on aynsc reset ???

Status
Not open for further replies.

mohi@608

Member level 4
Joined
Apr 4, 2012
Messages
69
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,719
well i want to have a async reset which is active high on a block which is operating at posedge of sys clock..
my code is as follows.......
Code:
always@(posedge sys_clk or posedge reset)
begin
if(reset)
......
.,,,
end(

my doubt is can we use both sy_clk and reset at posedge in order to fullfill the async condition ???...or is there any other method ???
 

There may be other methods, but this style is imposed by synthesis tools to generate the proper hardware logic.

The keyword posedge just means wait for the rising edge of a signal. And because you are waiting for two independent signal edges, they may be asynchronous to each other. If you had only

always @(posedge sys_clk)

Then the if (reset) would only be checked at the rising edge of sys_clk, making it synchronous.
 

since you have active high reset, most of the time it will be held low.What i suggest to use 2 separate always block.
always@(reset)
begin
...
end
always@(posedge sys_clk)
begin
if(~reset)
...
end

This would implement async reset as reset got nothing to do with clock. There will be time when system will see reset high at posedge of sys_clk, so implement second always block carefully.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top