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; } }