Code Example
In VHDL-AMS, a design consists at a minimum of an entity which describes the interface and an architecture which contains the actual implementation. In addition, most designs import library modules. Some designs also contain multiple architectures and configurations.
A simple ideal diode in VHDL-AMS would look something like this:
-- (this is a VHDL comment) library IEEE; use IEEE.math_real.all; use IEEE.electrical_systems.all; -- this is the entity entity DIODE is generic (iss : current := 1.0e-14; -- Saturation current af : real := 1.0; -- Flicker noise coefficient kf : real := 0.0); -- Flicker noise exponent port (terminal anode, cathode : electrical); end entity DIODE; architecture IDEAL of DIODE is quantity v across i through anode to cathode; constant vt : voltage := 0.0258; -- Thermal voltage at 300 K begin i == iss * (exp(v/vt) - 1.0); end architecture IDEAL;Read more about this topic: VHDL-AMS
Famous quotes containing the word code:
“Hollywood keeps before its child audiences a string of glorified young heroes, everyone of whom is an unhesitating and violent Anarchist. His one answer to everything that annoys him or disparages his country or his parents or his young lady or his personal code of manly conduct is to give the offender a sock in the jaw.... My observation leads me to believe that it is not the virtuous people who are good at socking jaws.”
—George Bernard Shaw (18561950)
“...I had grown up in a world that was dominated by immature age. Not by vigorous immaturity, but by immaturity that was old and tired and prudent, that loved ritual and rubric, and was utterly wanting in curiosity about the new and the strange. Its era has passed away, and the world it made has crumbled around us. Its finest creation, a code of manners, has been ridiculed and discarded.”
—Ellen Glasgow (18731945)