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:
“Wise Draco comes, deep in the midnight roll
Of black artillery; he comes, though late;
In code corroborating Calvins creed
And cynic tyrannies of honest kings;
He comes, nor parlies; and the Town, redeemed,
Gives thanks devout; nor, being thankful, heeds
The grimy slur on the Republics faith implied,
Which holds that Man is naturally good,
Andmoreis Natures Roman, never to be
scourged.”
—Herman Melville (18191891)
“Acknowledge your will and speak to us all, This alone is what I will to be! Hang your own penal code up above you: we want to be its enforcers!”
—Friedrich Nietzsche (18441900)