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.

How to synchronize module a and b of my Verilog code?

Status
Not open for further replies.

SUNBELT

Member level 2
Joined
Oct 4, 2005
Messages
42
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,652
Verilog guestion

I have to modules:

module a(......, output reg f,.....)

always @(posedge clock) begin
.....
.....
.....
if (.....)
f=1;
else if (....)
f=0;
end
endmodule

module b(...., input f,.....)
a call(....,.f(f),...);

always @(posedge clock) begin
I use f here end
endmodule
my problem is that the changes in f in "module a" appears one clock cycle later in "module b". I think f in "module a" changes after it is used in "module b". How can I synchronize them? Is there any way to solve this problem?
 

Re: Verilog guestion

That is the inherent property of RTL .... or if you look at the the RTL schematic in your synthesis tool it will be in master slave configuration in this case...

I am open for corrections

Barath Ramesh.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top