------------------------------------------------------------------------------- -- Second Order Lowpass filter -- -- Transfer Function: -- -- w1*w2 -- H(s) = k * ---------------- -- (s + w1)(s + w2) -- -- DC Gain = k ------------------------------------------------------------------------------- -- Use IEEE_proposed instead of disciplines library IEEE; use IEEE.electrical_systems.all; library IEEE; use ieee.math_real.all; entity lpf_1_e is generic ( fp : real; -- pole freq gain : real := 1.0); -- filter gain port ( terminal input: electrical; terminal output: electrical); end entity lpf_1_e; architecture simple of lpf_1_e is QUANTITY vin ACROSS input TO ELECTRICAL_REF; QUANTITY vout ACROSS iout THROUGH output TO ELECTRICAL_REF; constant wp : real := math_2_pi*fp; constant num : real_vector := (0 => wp*gain); -- 0=> is needed to give -- index when only a single -- element is used. constant den : real_vector := (wp, 1.0); quantity vin_temp : real; begin vin_temp == vin; -- intermediate variable (vin) req'd for now vout == vin_temp'ltf(num, den); end architecture simple;