diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index c93d9eb..8fade0c 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -24,5 +24,6 @@ "error.vcd-viewer.bad-view-file": "Ansichtsdatei ist beschädigt", "error.vcd-viewer.unexist-direct-vcd-file": "Die von der Ansichtsdatei referenzierte vcd-Datei existiert nicht", "info.welcome.join-qq-group": "Klicken Sie auf den Link, um der QQ-Gruppe beizutreten", - "info.level.test": "Dies ist ein einfaches Beispiel" + "info.level.test": "Dies ist ein einfaches Beispiel", + "info.progress.build-ip-module-tree": "构建 IP 模块树" } \ No newline at end of file diff --git a/l10n/bundle.l10n.en.json b/l10n/bundle.l10n.en.json index 67ff0e1..4dfc9cb 100644 --- a/l10n/bundle.l10n.en.json +++ b/l10n/bundle.l10n.en.json @@ -24,5 +24,6 @@ "error.vcd-viewer.bad-view-file": "View file is corrupted", "error.vcd-viewer.unexist-direct-vcd-file": "The vcd file pointed to by the view file does not exist", "info.welcome.join-qq-group": "Click the link to join the QQ group", - "info.level.test": "This is a simple example" + "info.level.test": "This is a simple example", + "info.progress.build-ip-module-tree": "构建 IP 模块树" } \ No newline at end of file diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index 0cd1ca1..52c835d 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -24,5 +24,6 @@ "error.vcd-viewer.bad-view-file": "ビューファイルが破損しています", "error.vcd-viewer.unexist-direct-vcd-file": "ビューファイルが指す vcd ファイルは存在しません", "info.welcome.join-qq-group": "リンクをクリックして QQ グループに参加", - "info.level.test": "これは簡単な例です" + "info.level.test": "これは簡単な例です", + "info.progress.build-ip-module-tree": "构建 IP 模块树" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index d530a2c..42dd382 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -24,5 +24,6 @@ "error.vcd-viewer.bad-view-file": "视图文件已损坏", "error.vcd-viewer.unexist-direct-vcd-file": "视图文件指向的 vcd 文件不存在", "info.welcome.join-qq-group": "点击链接加入 QQ 群", - "info.level.test": "这是一个简单的样例" + "info.level.test": "这是一个简单的样例", + "info.progress.build-ip-module-tree": "构建 IP 模块树" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 4df7ea5..6071aeb 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -24,5 +24,6 @@ "error.vcd-viewer.bad-view-file": "視圖文件已損壞", "error.vcd-viewer.unexist-direct-vcd-file": "視圖文件指向的 vcd 文件不存在", "info.welcome.join-qq-group": "點擊鏈接加入 QQ 群", - "info.level.test": "這是一個簡單的樣例" + "info.level.test": "這是一個簡單的樣例", + "info.progress.build-ip-module-tree": "构建 IP 模块树" } \ No newline at end of file diff --git a/resources/script/xilinx/launch.tcl b/resources/script/xilinx/launch.tcl new file mode 100644 index 0000000..30a83d4 --- /dev/null +++ b/resources/script/xilinx/launch.tcl @@ -0,0 +1,7 @@ +set_param general.maxThreads 8 +create_project template /home/dide/project/Digital-Test/DIDEtemp/prj/xilinx -part none -force +set_property SOURCE_SET sources_1 [get_filesets sim_1] +set_property top_lib xil_defaultlib [get_filesets sim_1] +update_compile_order -fileset sim_1 -quiet +source /home/dide/project/Digital-IDE/resources/script/xilinx/refresh.tcl -quiet +file delete /home/dide/project/Digital-IDE/resources/script/xilinx/launch.tcl -force diff --git a/resources/script/xilinx/refresh.tcl b/resources/script/xilinx/refresh.tcl new file mode 100644 index 0000000..04066fa --- /dev/null +++ b/resources/script/xilinx/refresh.tcl @@ -0,0 +1,40 @@ +remove_files -quiet [get_files] +set xip_repo_paths {} +set_property ip_repo_paths $xip_repo_paths [current_project] -quiet +update_ip_catalog -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/ip/xfft_v9/xfft_v9.xci -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/bimpy.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/bimpy.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/bitreverse.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/bitreverse.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/butterfly.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/butterfly.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/convround.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/convround.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/hwbfly.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/hwbfly.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/ifftmain.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/ifftmain.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/ifftstage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/ifftstage.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/laststage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/laststage.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/longbimpy.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/longbimpy.v -quiet +add_files /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/qtrstage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/src/ifft/qtrstage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-Test/DIDEtemp/user/sim/FFT_IFFT_tb.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/FFT_IFFT.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/stage/BF_stage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/stage/fft_stage.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/top/fft.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/top/ifft.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/utils/ftrans.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/FFT/Flow/utils/ftwiddle.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Memory/SRAM/Shift/shiftTaps.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/Complex/cmplAdsu.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/Complex/cmplMult.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Memory/SRAM/SDPRAM.v -quiet +add_files -fileset sim_1 /home/dide/project/Digital-IDE/library/Basic/Math/Advance/Complex/cordic.v -quiet +add_files -fileset constrs_1 /home/dide/project/Digital-Test/DIDEtemp/user/data -quiet +file delete /home/dide/project/Digital-IDE/resources/script/xilinx/refresh.tcl -force diff --git a/src/function/sim/instance.ts b/src/function/sim/instance.ts index f450b11..428d29a 100644 --- a/src/function/sim/instance.ts +++ b/src/function/sim/instance.ts @@ -302,8 +302,6 @@ function instanceByLangID(module: HdlModule): string { async function instantiation() { const module = await selectModuleFromAll(); if (module) { - console.log(module); - const code = instanceByLangID(module); const editor = vscode.window.activeTextEditor; if (editor) { diff --git a/src/function/sim/testbench.ts b/src/function/sim/testbench.ts index d8559cd..e6ae69d 100644 --- a/src/function/sim/testbench.ts +++ b/src/function/sim/testbench.ts @@ -62,10 +62,10 @@ async function testbench() { if (!hdlFile.isHDLFile(path)) { return; } - console.log(path); + // console.log(path); const currentHdlFile = hdlParam.getHdlFile(path); - console.log(currentHdlFile); + // console.log(currentHdlFile); if (!currentHdlFile) { vscode.window.showErrorMessage('There is no hdlFile respect to ' + path); diff --git a/src/global/lsp.ts b/src/global/lsp.ts index cb00295..5263696 100644 --- a/src/global/lsp.ts +++ b/src/global/lsp.ts @@ -37,6 +37,11 @@ export interface ICommonParam { param: string } +export type DoFastFileType = 'common' | 'ip' | 'primitives'; +export type DoFastToolChainType = 'xilinx' | 'efinity' | 'intel'; + export interface IDoFastParam { - path: string + path: string, + fileType: DoFastFileType, + toolChain: DoFastToolChainType } \ No newline at end of file diff --git a/src/global/prjInfo.ts b/src/global/prjInfo.ts index ccab57b..cfb6e41 100644 --- a/src/global/prjInfo.ts +++ b/src/global/prjInfo.ts @@ -613,7 +613,6 @@ class PrjInfo implements PrjInfoMeta { } else if (srcPath === '') { return workspace; } - console.log(hdlPath.join(workspace, srcPath)); return hdlPath.join(workspace, srcPath); } diff --git a/src/hdlParser/common.ts b/src/hdlParser/common.ts index 16702ad..8ff47ac 100644 --- a/src/hdlParser/common.ts +++ b/src/hdlParser/common.ts @@ -3,6 +3,7 @@ import * as vscode from 'vscode'; import { AbsPath, RelPath } from '../global'; import { HdlLangID } from '../global/enum'; +import { DoFastFileType } from '../global/lsp'; interface Position { // row/line of the cursor, index from 0 @@ -35,8 +36,9 @@ enum HdlFileType { Src = 'src', Sim = 'sim', LocalLib = 'local_lib', - RemoteLib = 'remote_lib' + RemoteLib = 'remote_lib' }; + enum InstModPathStatus {Current, Include, Others, Unknown}; // enum SymbolType { // Module = 'module', @@ -195,7 +197,8 @@ interface CommentResult { interface Fast { content: RawHdlModule[] languageId: string - macro: Macro + macro: Macro, + fileType: DoFastFileType } interface All { diff --git a/src/hdlParser/core.ts b/src/hdlParser/core.ts index 5bb6651..309f137 100644 --- a/src/hdlParser/core.ts +++ b/src/hdlParser/core.ts @@ -8,6 +8,7 @@ import { MainOutput, ReportType } from '../global/outputChannel'; import * as common from './common'; import { hdlFile, hdlPath } from '../hdlFs'; import { HdlSymbol } from './util'; +import { DoFastFileType } from '../global/lsp'; class HdlParam { private readonly topModules : Set = new Set(); @@ -52,7 +53,7 @@ class HdlParam { */ public async addHdlPath(path: AbsPath) { path = hdlPath.toSlash(path); - await this.initHdlFiles([path]); + await this.doHdlFast(path, 'common'); const hdlFile = this.getHdlFile(path); if (!hdlFile) { MainOutput.report('error happen when we attempt to add file by path: ' + path, ReportType.Error); @@ -225,15 +226,16 @@ class HdlParam { } } - private async doHdlFast(path: AbsPath) { + private async doHdlFast(path: AbsPath, fileType: DoFastFileType) { try { - const fast = await HdlSymbol.fast(path); + const fast = await HdlSymbol.fast(path, fileType); if (fast) { const languageId = hdlFile.getLanguageId(path); new HdlFile(path, languageId, fast.macro, - fast.content); + fast.content, + fast.fileType); } } catch (error) { MainOutput.report('Error happen when parse ' + path, ReportType.Error); @@ -241,29 +243,18 @@ class HdlParam { } } - public async initHdlFiles(hdlFiles: AbsPath[], progress?: vscode.Progress) { + + public async initializeHdlFiles(hdlFiles: AbsPath[], progress: vscode.Progress) { const { t } = vscode.l10n; let count: number = 0; let fileNum = hdlFiles.length; - // TODO: 找出最合理的核心数 const parallelChunk = Math.min(os.cpus().length, 32); console.log("use cpu: " + parallelChunk); - const pools: { id: number, promise: Promise, path: string }[] = []; const reportTitle = t('info.progress.build-module-tree'); - - progress?.report({ message: reportTitle + ` ${1}/${fileNum}`, increment: 0 }); - - // for (const path of hdlFiles) { - // count ++; - // console.log('send request: ' + path); - - // await this.doHdlFast(path); - // const increment = Math.floor(count / fileNum * 100); - // progress?.report({ message: reportTitle + ` ${count}/${fileNum}`, increment }); - // } + progress.report({ message: reportTitle + ` ${1}/${fileNum}`, increment: 0 }); async function consumePools() { for (const p of pools) { @@ -279,7 +270,7 @@ class HdlParam { count ++; console.log('send request: ' + path); - const p = this.doHdlFast(path); + const p = this.doHdlFast(path, 'common'); pools.push({ id: count, promise: p, path }); if (pools.length % parallelChunk === 0) { // 消费并发池 @@ -290,12 +281,49 @@ class HdlParam { if (pools.length > 0) { await consumePools(); } - } - public async initialize(hdlFiles: AbsPath[], progress: vscode.Progress) { - await this.initHdlFiles(hdlFiles, progress); + public async initializeIPsPath(IPsPath: string[], progress: vscode.Progress) { + const { t } = vscode.l10n; + let count: number = 0; + let fileNum = IPsPath.length; + + const parallelChunk = Math.min(os.cpus().length, 32); + console.log("use cpu: " + parallelChunk); + + const pools: { id: number, promise: Promise, path: string }[] = []; + const reportTitle = t('info.progress.build-ip-module-tree'); + progress.report({ message: reportTitle + ` ${1}/${fileNum}`, increment: 0 }); + + async function consumePools() { + for (const p of pools) { + const increment = Math.floor(p.id / fileNum * 100); + await p.promise; + console.log("handle id " + p.id + ' increment: ' + increment); + progress?.report({ message: reportTitle + ` ${p.id}/${fileNum}`, increment }); + } + pools.length = 0; + } + + for (const path of IPsPath) { + count ++; + console.log('send request: ' + path); + + const p = this.doHdlFast(path, 'ip'); + pools.push({ id: count, promise: p, path }); + if (pools.length % parallelChunk === 0) { + // 消费并发池 + await consumePools(); + } + } + + if (pools.length > 0) { + await consumePools(); + } + } + + public async makeAllInstance() { for (const hdlFile of this.getAllHdlFiles()) { hdlFile.makeInstance(); } @@ -352,7 +380,7 @@ class HdlParam { public async addHdlFile(path: AbsPath) { path = hdlPath.toSlash(path); - await this.initHdlFiles([path]); + await this.doHdlFast(path, 'common'); const moduleFile = this.getHdlFile(path); if (!moduleFile) { MainOutput.report('error happen when create moduleFile ' + path, ReportType.Warn); @@ -665,9 +693,7 @@ class HdlModule { // search included file for (const include of this.file.macro.includes) { const absIncludePath = hdlPath.rel2abs(this.path, include.path); - console.log(absIncludePath); const includeFile = hdlParam.getHdlFile(absIncludePath); - console.log(includeFile); if (includeFile) { excludeFile.add(includeFile); @@ -810,18 +836,21 @@ class HdlFile { public path: string; public languageId: HdlLangID; public type: common.HdlFileType; + public doFastType: DoFastFileType; public macro: common.Macro; private readonly nameToModule: Map; constructor(path: string, languageId: HdlLangID, macro: common.Macro, - modules: common.RawHdlModule[]) { + modules: common.RawHdlModule[], + doFastType: DoFastFileType) { this.path = path; this.languageId = languageId; this.macro = macro; this.type = hdlFile.getHdlFileType(path); + this.doFastType = doFastType; // add to global hdlParam hdlParam.setHdlFile(this); diff --git a/src/hdlParser/util.ts b/src/hdlParser/util.ts index 7b8d76f..1c24f15 100644 --- a/src/hdlParser/util.ts +++ b/src/hdlParser/util.ts @@ -1,34 +1,18 @@ import * as vscode from 'vscode'; import { hdlFile } from '../hdlFs'; import { HdlLangID } from '../global/enum'; -import { AbsPath, LspClient } from '../global'; -import { DoFastRequestType, ITextDocumentItem, CustomParamRequestType, UpdateFastRequestType } from '../global/lsp'; +import { AbsPath, LspClient, opeParam } from '../global'; +import { DoFastRequestType, ITextDocumentItem, CustomParamRequestType, UpdateFastRequestType, DoFastFileType, DoFastToolChainType } from '../global/lsp'; import { Fast, RawHdlModule } from './common'; - -async function doFastApi(path: string): Promise { +async function doFastApi(path: string, fileType: DoFastFileType): Promise { try { const client = LspClient.DigitalIDE; const langID = hdlFile.getLanguageId(path); + const toolChain = opeParam.prjInfo.toolChain as DoFastToolChainType; if (client) { - const response = await client.sendRequest(DoFastRequestType, { path }); - response.languageId = langID; - return response; - } - } catch (error) { - console.error("error happen when run doFastApi, " + error); - console.error("error file path: " + path); - return undefined; - } -} - -async function updateFastApi(path: string): Promise { - try { - const client = LspClient.DigitalIDE; - const langID = hdlFile.getLanguageId(path); - if (client) { - const response = await client.sendRequest(UpdateFastRequestType, { path }); + const response = await client.sendRequest(DoFastRequestType, { path, fileType, toolChain }); response.languageId = langID; return response; } @@ -46,26 +30,8 @@ namespace HdlSymbol { * @param path 文件绝对路径 * @returns */ - export function fast(path: AbsPath): Promise { - const langID = hdlFile.getLanguageId(path); - switch (langID) { - case HdlLangID.Verilog: - case HdlLangID.Vhdl: - case HdlLangID.SystemVerilog: - return doFastApi(path); - default: return new Promise(resolve => resolve(undefined)); - } - } - - export function updateFast(path: AbsPath): Promise { - const langID = hdlFile.getLanguageId(path); - switch (langID) { - case HdlLangID.Verilog: - case HdlLangID.Vhdl: - case HdlLangID.SystemVerilog: - return updateFastApi(path); - default: return new Promise(resolve => resolve(undefined)); - } + export function fast(path: AbsPath, fileType: DoFastFileType): Promise { + return doFastApi(path, fileType); } } diff --git a/src/manager/PL/xilinx.ts b/src/manager/PL/xilinx.ts index 3c2d924..203df66 100644 --- a/src/manager/PL/xilinx.ts +++ b/src/manager/PL/xilinx.ts @@ -269,6 +269,7 @@ class XilinxOperation { // 导入非本地的设计源文件 const HDLFiles = hdlParam.getAllHdlFiles(); for (const file of HDLFiles) { + // TODO: 新增library的add_files if (file.type === "src") { scripts.push(`add_files ${file.path} -quiet`); } diff --git a/src/manager/prj.ts b/src/manager/prj.ts index 3043881..4c684f1 100644 --- a/src/manager/prj.ts +++ b/src/manager/prj.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import * as vscode from 'vscode'; import * as fs from 'fs'; +import * as fspath from 'path'; import { AbsPath, IProgress, LspClient, MainOutput, opeParam, ReportType } from '../global'; import { PathSet } from '../global/util'; @@ -94,7 +95,11 @@ class PrjManage { } /** - * get all the hdl files that to be parsed in the project + * @description 获取所有的用户 hdl 文件,包括: + * - sim + * - src + * - common lib + * - custom lib * @returns */ public async getPrjHardwareFiles(): Promise { @@ -126,47 +131,76 @@ class PrjManage { return hdlFiles; } - + /** + * @description 获取当前项目中所有的 IP 文件夹 + */ + public async getPrjIPs() { + const toolchain = opeParam.prjInfo.toolChain; + + switch (toolchain) { + case 'xilinx': + return this.getXilinxIPs(); + break; + + default: + break; + } + return []; + } + + public getXilinxIPs() { + const srcFolder = opeParam.prjInfo.arch.hardware.src; + const ipFolder = hdlPath.resolve(srcFolder, '../ip'); + const validIPs: string[] = []; + if (fs.existsSync(ipFolder) && hdlFile.isDir(ipFolder)) { + for (const folder of fs.readdirSync(ipFolder)) { + const folderPath = hdlPath.join(ipFolder, folder); + if (this.isValidXilinxIP(folderPath)) { + validIPs.push(folderPath); + } + } + } + return validIPs; + } + + public isValidXilinxIP(folderPath: string): boolean { + const folderName = fspath.basename(folderPath); + const descriptionFile = folderName + '.vho'; + const descriptionFilePath = hdlPath.join(folderPath, descriptionFile); + return fs.existsSync(descriptionFilePath); + } public async initialise(context: vscode.ExtensionContext, progress: vscode.Progress, countTimeCost: boolean = true) { if (countTimeCost) { console.time('launch'); - } + } + + // 初始化 OpeParam + // 包含基本的插件的文件系统信息、用户配置文件和系统配置文件的合并数据结构 const refreshPrjConfig = await this.initOpeParam(context); MainOutput.report('finish initialise opeParam', ReportType.Info); prjManage.refreshPrjFolder(refreshPrjConfig); - const hdlFiles = await this.getPrjHardwareFiles(); - MainOutput.report(`finish collect ${hdlFiles.length} hdl files`, ReportType.Info); + // 解析 hdl 文件,构建 hdlParam + const hdlFiles = await this.getPrjHardwareFiles(); + await hdlParam.initializeHdlFiles(hdlFiles, progress); + + // 根据 toolchain 解析合法的 IP,构建 hdlParam + const IPsPath = await this.getPrjIPs(); + await hdlParam.initializeIPsPath(IPsPath, progress); + + // TODO: 解析原语并构建 - await hdlParam.initialize(hdlFiles, progress); + + // 构建 instance 解析 + await hdlParam.makeAllInstance(); + + // 分析依赖关系错位情况 const unhandleNum = hdlParam.getUnhandleInstanceNumber(); MainOutput.report(`finish analyse ${hdlFiles.length} hdl files, find ${unhandleNum} unsolved instances`, ReportType.Info); - // 完成后端向前端发送消息的注册 - const mainClient = LspClient.DigitalIDE; - if (mainClient !== undefined) { - await mainClient.onReady(); - mainClient.onNotification('update/fast', async (params: any) => { - try { - const fast = params.fast as Fast; - const path = params.path as string; - console.log("[receive notification] path: " + path); - hdlParam.updateFast(path, fast); - refreshArchTree(); - } catch (error) { - console.error("error happen when update fast: " + error); - } - }); - - // mainClient.onNotification('update/string', async (params: any) => { - // console.log('[StringNotificationType] receive from backend'); - // console.log(params); - // }); - } this.pl = new PlManage(); - // TODO : finish it later // this.ps = new PsManage(); MainOutput.report('create pl', ReportType.Info); diff --git a/src/monitor/event.ts b/src/monitor/event.ts index 596d03a..d5d2aa3 100644 --- a/src/monitor/event.ts +++ b/src/monitor/event.ts @@ -146,8 +146,8 @@ class HdlAction extends BaseAction { return; } - const fast = await HdlSymbol.updateFast(path); - console.log('get update fast'); + const fast = await HdlSymbol.fast(path, 'common'); + console.log('update fast: ' + path); if (!fast) { // vscode.window.showErrorMessage('error happen when parse ' + path + '\nFail to update');