//TODO: write BUS keyword
        public static void signalInterfaceSuffix(Signal signal, VhdlWriter writer, OutputModule output)
        {
            output.writeSubtypeIndication(signal.Type);

            if (signal.Kind == Signal.KindEnum.BUS)
            {
                writer.Append(' ').Append(signal.Kind.ToString());
            }
            else if (signal.Kind == Signal.KindEnum.REGISTER)
            {
                throw new Exception("Signal kind register isn't allowed in an interface declaration");
            }

            if (signal.DefaultValue != null)
            {
                writer.Append(" := ");
                output.writeExpression(signal.DefaultValue);
            }
        }
 public static void interfaceSuffix(VhdlObject @object, VhdlWriter writer, OutputModule output)
 {
     if (@object is Signal)
     {
         signalInterfaceSuffix((Signal)@object, writer, output);
     }
     else if (@object is Constant)
     {
         constantInterfaceSuffix((Constant)@object, writer, output);
     }
     else if (@object is Variable)
     {
         variableInterfaceSuffix((Variable)@object, writer, output);
     }
     else if (@object is FileObject)
     {
         fileInterfaceSuffix((FileObject)@object, writer, output);
     }
     else
     {
         throw new ArgumentException("Unknown interface element.");
     }
 }
 public VhdlConcurrentStatementVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
 public VhdlConfigurationVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
 public VhdlMiscellaneousElementOutput(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
 public static void fileInterfaceSuffix(FileObject file, VhdlWriter writer, OutputModule output)
 {
     output.writeSubtypeIndication(file.Type);
 }
 public static void constantInterfaceSuffix(Constant constant, VhdlWriter writer, OutputModule output)
 {
     output.writeSubtypeIndication(constant.Type);
     if (constant.DefaultValue != null)
     {
         writer.Append(" := ");
         output.writeExpression(constant.DefaultValue);
     }
 }
 //TODO: add mode
 public static void variableInterfaceSuffix(Variable variable, VhdlWriter writer, OutputModule output)
 {
     output.writeSubtypeIndication(variable.Type);
     if (variable.DefaultValue != null)
     {
         writer.Append(" := ");
         output.writeExpression(variable.DefaultValue);
     }
 }
Example #9
0
 public VhdlExpressionVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
Example #10
0
 public VhdlSequentialStatementVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
 public VhdlLibraryUnitVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }
Example #12
0
 public VhdlTypeVisitor(VhdlWriter writer, OutputModule output)
 {
     this.writer = writer;
     this.output = output;
 }