Esempio n. 1
0
 public Entity(RenderState renderer, RenderStateProcess renderproc)
 {
     RS      = renderer;
     RSP     = renderproc;
     Network = renderer.Network;
     Process = renderproc.Process;
 }
Esempio n. 2
0
 /// <summary>
 /// Constructs a new instance of the bus
 /// </summary>
 /// <param name="source">The process declaration</param>
 /// <param name="process">The resolved process definition</param>
 /// <param name="type">The process type</param>
 public Process(AST.InstanceDeclaration source, AST.Process process, ProcessType type)
 {
     Source            = source ?? throw new ArgumentNullException(nameof(source));
     ProcessDefinition = process ?? throw new ArgumentNullException(nameof(process));
     Type       = type;
     Statements = ProcessDefinition.Statements.Select(x => x.Clone()).ToArray();
 }
Esempio n. 3
0
 public static string BusNameToValidName(AST.Bus bus, AST.Process proc = null)
 {
     if (proc != null && proc.LocalBusNames != null && proc.LocalBusNames.ContainsKey(bus))
     {
         return(ToValidName(proc.LocalBusNames[bus]));
     }
     return(ToValidName(bus.InstanceName));
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SME.VHDL.RenderStateProcess"/> class.
 /// </summary>
 /// <param name="parent">The parent render state.</param>
 /// <param name="process">The process to render.</param>
 public RenderStateProcess(RenderState parent, AST.Process process)
 {
     Parent     = parent;
     Process    = process;
     Helper     = new RenderHelper(parent, process);
     TypeLookup = parent.TypeLookup;
     TypeScope  = parent.TypeScope;
 }
Esempio n. 5
0
 public static string BusSignalToValidName(AST.Process process, AST.Signal signal)
 {
     return(ToValidName(signal.Name));
 }
Esempio n. 6
0
 public static string ProcessNameToValidName(AST.Process process)
 {
     return(ToValidName(process.InstanceName));
 }
Esempio n. 7
0
 public static string ProcessNameToFileName(AST.Process process)
 {
     return(ToValidName(process.Name) + ".cpp");
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SME.CPP.RenderStateProcess"/> class.
 /// </summary>
 /// <param name="parent">The parent render state.</param>
 /// <param name="process">The process to render.</param>
 public RenderStateProcess(RenderState parent, AST.Process process)
 {
     Parent    = parent;
     Process   = process;
     TypeScope = parent.TypeScope;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SME.VHDL.RenderHelper"/> class.
 /// </summary>
 /// <param name="parent">The <see cref="RenderState"/> instance to use.</param>
 /// <param name="process">The <see cref="AST.Process"/> instance to use</param>
 public RenderHelper(RenderState parent, AST.Process process)
 {
     Parent  = parent;
     Process = process;
 }