Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ public async Task<bool> SimulateAsync(string fullPath)
var relativeFolderPath = Path.GetRelativePath(root.FullPath, folderPath);

var vvpPath = Path.Combine(relativeFolderPath, Path.GetFileNameWithoutExtension(fullPath) + ".vvp").ToUnixPath();

var activeTestBenchRelative = Path.GetRelativePath(root.FullPath, fullPath).ToUnixPath();

var verilogFiles = root.GetFiles("*.v")
.Where(x => !root.IsCompileExcluded(x))
.Select(x => $"{x.ToUnixPath()}");
.Select(x => x.ToUnixPath())
.Where(x => !root.IsTestBench(x) ||
string.Equals(x, activeTestBenchRelative, StringComparison.OrdinalIgnoreCase));

_mainDockService.Show<IOutputService>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Styling;
using OneWare.Essentials.Extensions;
using OneWare.Essentials.Models;
using OneWare.Essentials.Services;
using OneWare.UniversalFpgaProjectSystem;
Expand Down Expand Up @@ -51,6 +52,6 @@ public static void UpdateProjectProperties(UniversalFpgaProjectRoot project, str
if (!hasPcfInclude)
project.Properties.AddToStringArray("include", "*.pcf");

project.Properties.SetString("ossCad/constraintFile", constraintFile);
project.Properties.SetString("ossCad/constraintFile", constraintFile?.ToUnixPath());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Avalonia.Media;
using Microsoft.Extensions.Logging;
using OneWare.Essentials.Controls;
using OneWare.Essentials.Extensions;
using OneWare.Essentials.Helpers;
using OneWare.Essentials.Models;
using OneWare.Essentials.Services;
Expand Down Expand Up @@ -214,13 +215,26 @@ public async Task SaveAsync()
{
foreach (var (setting, key) in _dynamicSettingsKeys)
{
_root.Properties.SetNode(key, JsonValue.Create(setting.Value));
_root.Properties.SetNode(key, CreateSettingNode(setting, key));
}

await _projectExplorerService.SaveProjectAsync(_root);
await _projectExplorerService.ReloadProjectAsync(_root);
}

private static JsonNode? CreateSettingNode(TitledSetting setting, string key)
{
return setting switch
{
FolderPathSetting or FilePathSetting => JsonValue.Create((setting.Value as string)?.ToUnixPath()),
ListBoxSetting when key is "include" or "exclude" => new JsonArray(
((ObservableCollection<string>)setting.Value)
.Select(item => JsonValue.Create(item.ToUnixPath()))
.ToArray()),
_ => JsonValue.Create(setting.Value)
};
}

public async Task SaveAndCloseAsync(FlexibleWindow window)
{
await SaveAsync();
Expand Down
Loading