1. A modeling tool generating a mixed-signal finite state machine model of a system from a state diagram, the modeling tool performing steps including: allowing a user to define an analog variable through a set of state equations corresponding to different states in the state diagram; forming a composite equation for the analog variable constructed as a weighted sum of the set of state equations; and using a set of ramp functions as weights in the composite equation varying continuously between 0 and 1, the set of ramp functions forming a state vector and ensuring continuity of the analog variable during a state transition.