Hi! I'm trying to make some models for pulse width modulators but I'm having problems to describe it in modelica.
My background is in VHDL-AMS and many times I use the instruction "wait for", for example when making testbenches:
loop
wait for 1ms;
clock<=not clock;
end loop;
this produces a clock signal of 2ms of period.
How can I make this in Modelica????
other problem that I have is in code like this:
loop
clock<=not clock;
delay<=calculate_delay();
wait for delay;
end loop;
with this I get a clock signal with variable period.
At the end I only need to program events at an specified time, but I don't want to use something like:
if time>delay then...
because I thing that this slows down the simulation while finding the exact point when time=delay. am I right???
Thanks
