From 0029c7d710f18d8820464ed07d946af679d07285 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Wed, 8 Jan 2025 16:15:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BB=BC=E5=90=88=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=90=8E=E7=9A=84=20netlist=20=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/property-schema.json | 3 ++- src/function/dide-netlist/index.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/project/property-schema.json b/project/property-schema.json index 364c338..2a329ee 100644 --- a/project/property-schema.json +++ b/project/property-schema.json @@ -198,7 +198,8 @@ "xc7a35tftg256-1", "xc7a35tcsg324-1", "xc7z035ffg676-2", - "xc7z020clg484-1" + "xc7z020clg484-1", + "hello-world" ] } }, diff --git a/src/function/dide-netlist/index.ts b/src/function/dide-netlist/index.ts index 66ae7b1..bf3d2dc 100644 --- a/src/function/dide-netlist/index.ts +++ b/src/function/dide-netlist/index.ts @@ -178,6 +178,7 @@ function checkResource() { export async function openNetlistViewer(context: vscode.ExtensionContext, uri: vscode.Uri, moduleName: string) { checkResource(); const worker = new Worker(workerScriptPath); + let success = true; worker.on('message', message => { const command = message.command; @@ -185,8 +186,11 @@ export async function openNetlistViewer(context: vscode.ExtensionContext, uri: v switch (command) { case 'error-log-file': showErrorLogFile(data); + success = false; + break; + case 'finish': + break; - default: break; } @@ -221,8 +225,10 @@ export async function openNetlistViewer(context: vscode.ExtensionContext, uri: v worker.terminate(); - const render = new NetlistRender(); - render.create(moduleName); + if (success) { + const render = new NetlistRender(); + render.create(moduleName); + } } async function showErrorLogFile(data: any) {