Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to implement functions in VHDL

Status
Not open for further replies.

sivamit

Full Member level 4
Joined
Dec 1, 2005
Messages
202
Helped
20
Reputation
40
Reaction score
14
Trophy points
1,298
Activity points
2,664
Hi,
Could please help me to implement functons in VHDL .
In C language we call functions whenever we want to execute some particular block of codes and get the result.
I am confused since inside architecture body statements are not sequential..this may call the 'function code' even when it is not supposed to..
My intention is to develop a UART block and send data whenever I want to...
Please Help....
waiting for ur reply...
 

aji_vlsi

Advanced Member level 2
Joined
Sep 10, 2004
Messages
646
Helped
84
Reputation
168
Reaction score
12
Trophy points
1,298
Location
Bangalore, India
Activity points
4,975
Re: function in VHDL

sivamit said:
Hi,
Could please help me to implement functons in VHDL .
In C language we call functions whenever we want to execute some particular block of codes and get the result.
I am confused since inside architecture body statements are not sequential..this may call the 'function code' even when it is not supposed to..
My intention is to develop a UART block and send data whenever I want to...
Please Help....
waiting for ur reply...
Inside architetcure, process blocks are sequential.

Code:
architetcure tb of tb_ent is
  function f1();...
begin
  p1 : process
    f1();
    wait for 100 ns;
   f1();
   wait;
  end process p1;

end architecture tb;
A quick search (codesearch) would give full blown examples too. For instance see:

http://home.comcast.net/~mike_treseler/

HTH
Ajeetha, CVC
www.noveldv.com
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top