Skip to content

Commit

Permalink
createjsonnetlist return status
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Dec 2, 2024
1 parent 2721ab5 commit db290c8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/OneWare.OssCadSuiteIntegration/Yosys/YosysService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public async Task<bool> AssembleAsync(UniversalFpgaProjectRoot project, FpgaMode
return status.success;
}

[Obsolete (message: "Use CreateJsonNetListAsync instead")]
public async Task CreateNetListJsonAsync(IProjectFile verilog)
{
await childProcessService.ExecuteShellAsync("yosys", [
Expand All @@ -134,4 +135,15 @@ await childProcessService.ExecuteShellAsync("yosys", [
],
Path.GetDirectoryName(verilog.FullPath)!, "Create Netlist...");
}

public async Task<bool> CreateJsonNetListAsync(IProjectFile verilog)
{
var result = await childProcessService.ExecuteShellAsync("yosys", [
"-p", "hierarchy -auto-top; proc; opt; memory -nomap; wreduce -memx; opt_clean", "-o",
$"{verilog.Header}.json", verilog.Header
],
Path.GetDirectoryName(verilog.FullPath)!, "Create Netlist...");

return result.success;
}
}

0 comments on commit db290c8

Please sign in to comment.