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.

doubt in using function

Status
Not open for further replies.

alangs

Member level 3
Joined
Feb 5, 2010
Messages
57
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
india
Activity points
1,681
can we call a function in ever posedge of clk.....

for example
always @ (posedge clk)begin
a= function [b,c];

function[7:0]out;
input b,c;
out = b+c;
endfunction
end

whether this possible.....
 

yeah, you can use the function inside a "always" statement. You just need to define the function outside the always statement.
As function is simply a group of combinatorial circuit elements. So they can be called inside a always statement.

--vipin
https://vhdlguru.blogspot.com/
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top