Paul
|
Hi Mark,
sorry for the late reply. I'm not sure to fully get what you would like to do, as quantities are of type real (voltage, current are subtypes). I understand you would like to convert it into an event-driven signal?
To reconstruct an electrical signal from a real value is quite simple. Real xy_real to electrical xy_elec conversion: xy_elec == xy_real'ramp(risetime, falltime) where rise and fall times are expressed as real numbers (not TIME) and define the behavior of the signal between two values.
It is however more difficult to introduce events in a continuous-time quantity. You can either sample it at a fixed sampling rate (which may slow down your simulation considerably) or use a multi-level quantizer to get the amplitude resolution you want (in case of high-frequency signals this will also slow down the simulation).
Alternatively, if you don't care about the event-driven behavior, you could do your math in a straight-forward way using quantities.
Paul
|