Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
899f3b070This file is pinned to the selected release. Download the original to open it in your design tool.
using Hast.VhdlBuilder.Representation;
using Hast.VhdlBuilder.Representation.Declaration;
namespace Hast.Transformer.Vhdl.ArchitectureComponents;
public class BasicComponent : ArchitectureComponentBase
{
public IVhdlElement Declarations { get; set; }
public IVhdlElement Body { get; set; }
public BasicComponent(string name)
: base(name)
{
}
public override IVhdlElement BuildDeclarations() => BuildDeclarationsBlock(Declarations);
public override IVhdlElement BuildBody()
{
if (Body == null) return Empty.Instance;
return new LogicalBlock(
new LineComment(Name + " start"),
Body,
new LineComment(Name + " end"));
}
}