protected override void visitConditionalSignalAssignment(ConditionalSignalAssignment statement)
        {
            appendLabel(statement);
            if (statement.Postponed)
            {
                writer.Append(KeywordEnum.POSTPONED.ToString()).Append(' ');
            }

            output.writeSignalAssignmentTarget(statement.Target);
            writer.Append(" <= ");

            if (statement.Guarded)
            {
                writer.Append(KeywordEnum.GUARDED.ToString()).Append(' ');
            }

            if (statement.DelayMechanism != null)
            {
                output.getMiscellaneousElementOutput().delayMechanism(statement.DelayMechanism);
                writer.Append(' ');
            }

            bool first = true;

            foreach (ConditionalSignalAssignment.ConditionalWaveformElement element in statement.ConditionalWaveforms)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    writer.Append(' ').Append(KeywordEnum.ELSE.ToString()).Append(' ');
                }

                output.getMiscellaneousElementOutput().waveform(element.Waveform);

                if (element.Condition != null)
                {
                    writer.Append(' ').Append(KeywordEnum.WHEN.ToString()).Append(' ');
                    output.writeExpression(element.Condition);
                }
            }
            writer.Append(';').NewLine();
        }
Exemplo n.º 2
0
        protected override void visitSignalAssignment(SignalAssignment statement)
        {
            appendLabel(statement);
            output.writeSignalAssignmentTarget(statement.Target);
            writer.Append(" <= ");

            if (statement.DelayMechanism != null)
            {
                output.getMiscellaneousElementOutput().delayMechanism(statement.DelayMechanism);
                writer.Append(' ');
            }

            output.getMiscellaneousElementOutput().waveform(statement.Waveform);
            writer.Append(";").NewLine();
        }