-- File ball.vhd. Instantiated in top entity Model. -- Simplified source without discontinuity BREAKs. -- Use variable step and absolute tolerance 1e-3. ENTITY Ball IS GENERIC ( gravity : REAL := 9.81 ); PORT ( QUANTITY start, ground : IN REAL_VECTOR; QUANTITY s,v,a : OUT REAL_VECTOR ); END ENTITY Ball; ARCHITECTURE Simple OF Ball IS BEGIN BREAK s => start; --Initialization BREAK Cycle: FOR i IN 0 TO s'HIGH GENERATE IF s(i) > ground(i) -- 'ABOVE not implemented for vector items USE a(i) == -gravity; ELSE a(i) == -gravity - 200.0*v(i) - 10000000.0*( s(i)-ground(i) ); END USE; BREAK ON s(i)'ABOVE( ground(i) ); --Descriptive only END GENERATE; v'DOT == a; s'DOT == v; END ARCHITECTURE Simple;