From 5524921da946a47c34c22b3f22bfcca4fa25aedb Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Wed, 27 Nov 2024 22:22:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20windows=20=E4=B8=8A?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E4=BB=BF=E7=9C=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/function/sim/simulate.ts | 3 ++- src/global/prjInfo.ts | 11 +++++++++++ src/monitor/hdl.ts | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/function/sim/simulate.ts b/src/function/sim/simulate.ts index 4c4e511..47d4d26 100644 --- a/src/function/sim/simulate.ts +++ b/src/function/sim/simulate.ts @@ -90,7 +90,8 @@ class Simulate { const setting = vscode.workspace.getConfiguration(); // make simulation dir - const defaultSimulationDir = hdlPath.join(opeParam.prjInfo.arch.prjPath, 'icarus'); + const defaultSimulationDir = hdlPath.join(opeParam.prjInfo.prjPath, 'icarus'); + simConfig.simulationHome = setting.get('digital-ide.function.simulate.simulationHome', ''); if (!fs.existsSync(simConfig.simulationHome)) { simConfig.simulationHome = defaultSimulationDir; diff --git a/src/global/prjInfo.ts b/src/global/prjInfo.ts index f19bbec..98dbe46 100644 --- a/src/global/prjInfo.ts +++ b/src/global/prjInfo.ts @@ -652,6 +652,17 @@ class PrjInfo implements PrjInfoMeta { return hdlPath.join(extensionPath, 'library'); } + /** + * @description 获取 prjPath + */ + public get prjPath(): AbsPath { + const prjPath = this.arch.prjPath; + if (prjPath === undefined || prjPath.length === 0) { + return this._workspacePath; + } + return prjPath; + } + public json(): RawPrjInfo { return { toolChain: this._toolChain, diff --git a/src/monitor/hdl.ts b/src/monitor/hdl.ts index 33b70b8..66093c5 100644 --- a/src/monitor/hdl.ts +++ b/src/monitor/hdl.ts @@ -154,7 +154,7 @@ export class HdlAction extends BaseAction { private isvalid(path: AbsPath): boolean { const prjInfo = opeParam.prjInfo; if (path.startsWith(prjInfo.hardwareSrcPath) || path.startsWith(prjInfo.hardwareSimPath)) { - if (!hdlIgnore.isignore(path)) { + if (!hdlIgnore.isignore(path) && hdlFile.isHDLFile(path)) { return true; } }