Loading files
using Hast.Common.Helpers;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace Hast.Layer.EmptyRepresentationFactories
{
internal static class EmptyHardwareDescriptionFactory
{
public static IHardwareDescription Create(IHardwareGenerationConfiguration configuration)
{
var mockHardwareEntryPointMappings = new Dictionary<string, int>();
for (int i = 0; i < configuration.HardwareEntryPointMemberFullNames.Count; i++)
{
mockHardwareEntryPointMappings[configuration.HardwareEntryPointMemberFullNames[i]] = i;
}
return new HardwareDescription(mockHardwareEntryPointMappings);
}
private class HardwareDescription : IHardwareDescription
{
public string TransformationId { get; } = Sha2456Helper.Empty();
public string Language => "VHDL";
public IReadOnlyDictionary<string, int> HardwareEntryPointNamesToMemberIdMappings { get; }
public IEnumerable<ITransformationWarning> Warnings => Enumerable.Empty<ITransformationWarning>();
public HardwareDescription(IReadOnlyDictionary<string, int> hardwareEntryPointNamesToMemberIdMappings)
{
HardwareEntryPointNamesToMemberIdMappings = hardwareEntryPointNamesToMemberIdMappings;
}
public Task Serialize(Stream stream)
{
throw new System.NotImplementedException();
}
}
}
}
651b5b7c8This file is pinned to the selected release. Download the original to open it in your design tool.