/// <summary> /// Creates a conditional signal assignment. /// </summary> /// <param name="target">the target of this signal assignment</param> /// <param name="conditionalWaveforms">the assigned waveform</param> public ConditionalSignalAssignment(SignalAssignmentTarget target, List <ConditionalWaveformElement> conditionalWaveforms) { this.target = target; this.conditionalWaveforms = new List <ConditionalWaveformElement>(conditionalWaveforms); delayMechanism = DelayMechanism.INERTIAL; }
/// <summary> /// Creates a conditional signal assignment. /// </summary> /// <param name="target">the target of this signal assignment</param> /// <param name="value">the assigned value</param> public ConditionalSignalAssignment(SignalAssignmentTarget target, Expression @value) { this.target = target; this.conditionalWaveforms = new List <ConditionalWaveformElement>(); WaveformElement element = new WaveformElement(@value); this.conditionalWaveforms.Add(new ConditionalWaveformElement(new List <WaveformElement>(new WaveformElement[] { element }))); delayMechanism = DelayMechanism.INERTIAL; }
/// <summary> /// Creates a signal assignment. /// </summary> /// <param name="target">the signal assignement target</param> /// <param name="waveformElements">the waveform</param> public SignalAssignment(SignalAssignmentTarget target, List <WaveformElement> waveformElements) { this.target = target; this.waveform.AddRange(waveformElements); delayMechanism = VHDL.DelayMechanism.INERTIAL; if ((waveform.Capacity == 1) && (waveform[0].After == null)) { delayMechanism = VHDL.DelayMechanism.DUTY_CYCLE; } }
public override void AddEvent(ulong NOW, ulong after, AbstractValue value, DelayMechanism delayMechanism) { IList <AbstractValue> childs = (value as CompositeValue).GetChilds(); for (int i = 0; i < dumps.Count; i++) { dumps[i].AddEvent(NOW, after, childs[i], delayMechanism); } foreach (AbstractValue i in childs) { i.Dispose(); } }
public void delayMechanism(DelayMechanism delayMechanism) { if (delayMechanism == DelayMechanism.INERTIAL) { writer.Append(KeywordEnum.INERTIAL.ToString()); } else if (delayMechanism == DelayMechanism.TRANSPORT) { writer.Append(KeywordEnum.TRANSPORT.ToString()); } else { writer.Append(KeywordEnum.REJECT.ToString()).Append(' '); output.writeExpression(delayMechanism.PulseRejectionLimit); writer.Append(' ').Append(KeywordEnum.INERTIAL.ToString()); } }