ultralowpower
Newbie level 5

exponential vhdl
Hi,
I am trying to do a behavioral model for an OOK modulator who is a simple RLC parallel at an MOSFET N drain, which the MOSFET has a switched behavior controlled by a pulsed signal at gate.
When the pulse is on gate('1'), the current flows across the channel and the RLC is energized and the output of modulator has a sinusoidal signal with frequency and amplitude predefined by a carrier signal (RLC params).
When the gate hasn't signal ('0'), the output has a exponential behavior until the complete RLC desenergized.
I am trying to describe this behavior in VHDL-AMS, but the exponential behavior only is showed in the first cycle os input signal. I thing the exponential signal is present for all simulator, because I improved "tau" and the exponencial behavior extends for all the time, independent of the other signal present on pulse. How I can solve this problem about the exponential periodic signal?
I really thanks for answers and sorry about my English because is not my primary language.
Brito.
I am put my code here:
--------------------------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.electrical_systems.all;
USE ieee.math_real.all;
USE ieee.std_logic_1164.all;
ENTITY modask IS
GENERIC ( amplitude : REAL := 1.0;
tau : REAL := 0.1e-6;
freq : REAL := 400.0e6;
phase : REAL := 0.0;
offset : REAL := 0.0;
delay : REAL := 0.0 );
PORT ( TERMINAL ref, askout : ELECTRICAL;
askin : IN STD_LOGIC );
END modask;
ARCHITECTURE modask_arch OF modask IS
QUANTITY vaskout ACROSS iaskout THROUGH askout TO ref;
BEGIN
IF askin = '0' USE
vaskout == offset + (amplitude*exp(-(NOW/tau)))*sin(math_2_pi*freq*(NOW)+phase);
ELSE
vaskout == offset + amplitude * sin(math_2_pi*freq*(NOW-delay)+phase);
END USE;
END modask_arch;
-------------------------------------------------------------------------------------------------
Hi,
I am trying to do a behavioral model for an OOK modulator who is a simple RLC parallel at an MOSFET N drain, which the MOSFET has a switched behavior controlled by a pulsed signal at gate.
When the pulse is on gate('1'), the current flows across the channel and the RLC is energized and the output of modulator has a sinusoidal signal with frequency and amplitude predefined by a carrier signal (RLC params).
When the gate hasn't signal ('0'), the output has a exponential behavior until the complete RLC desenergized.
I am trying to describe this behavior in VHDL-AMS, but the exponential behavior only is showed in the first cycle os input signal. I thing the exponential signal is present for all simulator, because I improved "tau" and the exponencial behavior extends for all the time, independent of the other signal present on pulse. How I can solve this problem about the exponential periodic signal?
I really thanks for answers and sorry about my English because is not my primary language.
Brito.
I am put my code here:
--------------------------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.electrical_systems.all;
USE ieee.math_real.all;
USE ieee.std_logic_1164.all;
ENTITY modask IS
GENERIC ( amplitude : REAL := 1.0;
tau : REAL := 0.1e-6;
freq : REAL := 400.0e6;
phase : REAL := 0.0;
offset : REAL := 0.0;
delay : REAL := 0.0 );
PORT ( TERMINAL ref, askout : ELECTRICAL;
askin : IN STD_LOGIC );
END modask;
ARCHITECTURE modask_arch OF modask IS
QUANTITY vaskout ACROSS iaskout THROUGH askout TO ref;
BEGIN
IF askin = '0' USE
vaskout == offset + (amplitude*exp(-(NOW/tau)))*sin(math_2_pi*freq*(NOW)+phase);
ELSE
vaskout == offset + amplitude * sin(math_2_pi*freq*(NOW-delay)+phase);
END USE;
END modask_arch;
-------------------------------------------------------------------------------------------------