From 2886673c941fae0be1b500d1ec2669b732c95837 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Fri, 10 Jan 2025 17:54:43 +0800 Subject: [PATCH] update --- l10n/bundle.l10n.de.json | 4 ++- l10n/bundle.l10n.en.json | 4 ++- l10n/bundle.l10n.ja.json | 4 ++- l10n/bundle.l10n.zh-cn.json | 4 ++- l10n/bundle.l10n.zh-tw.json | 4 ++- resources/script/xilinx/simulate.tcl | 18 ++++++++++++ src/function/dide-netlist/index.ts | 3 +- src/manager/PL/xilinx.ts | 42 ++++++++++++++++++++++++++++ 8 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 resources/script/xilinx/simulate.tcl diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index 26310e9..8df01b2 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -124,5 +124,7 @@ "error.not-valid-browser": "{0} ist kein gültiger Browser-Pfad!", "info.config-browser-path": "Browser-Pfad konfigurieren", "info.pdf.exporting": "PDF wird nach {0} exportiert", - "info.generate-pdf-to": "PDF wurde unter {0} generiert" + "info.generate-pdf-to": "PDF wurde unter {0} generiert", + "info.vivado-gui.started": "Vivado GUI wird gestartet, bitte warten Sie einen Moment", + "ok": "Gut" } \ No newline at end of file diff --git a/l10n/bundle.l10n.en.json b/l10n/bundle.l10n.en.json index 5764fc0..6e0b938 100644 --- a/l10n/bundle.l10n.en.json +++ b/l10n/bundle.l10n.en.json @@ -124,5 +124,7 @@ "error.not-valid-browser": "{0} is not a valid browser path!", "info.config-browser-path": "Configure browser path", "info.pdf.exporting": "Exporting PDF to {0}", - "info.generate-pdf-to": "PDF has been generated to {0}" + "info.generate-pdf-to": "PDF has been generated to {0}", + "info.vivado-gui.started": "Vivado GUI is starting, please wait a moment", + "ok": "Good" } \ No newline at end of file diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index 76192ad..ed37dfe 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -124,5 +124,7 @@ "error.not-valid-browser": "{0} は有効なブラウザのパスではありません!", "info.config-browser-path": "ブラウザのパスを設定", "info.pdf.exporting": "PDFを{0}にエクスポート中", - "info.generate-pdf-to": "PDFは{0}に生成されました" + "info.generate-pdf-to": "PDFは{0}に生成されました", + "info.vivado-gui.started": "Vivado GUI を起動しています、少々お待ちください", + "ok": "良い" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index 953bc9f..b327d92 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -124,5 +124,7 @@ "error.not-valid-browser": "{0} 并不是一个有效的浏览器路径!", "info.config-browser-path": "配置浏览器路径", "info.pdf.exporting": "正在导出 pdf 到 {0}", - "info.generate-pdf-to": "pdf 已经生成至 {0}" + "info.generate-pdf-to": "pdf 已经生成至 {0}", + "info.vivado-gui.started": "Vivado GUI 正在启动中,稍等片刻", + "ok": "好的" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 9ee0e87..8aec2ff 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -124,5 +124,7 @@ "error.not-valid-browser": "{0} 並不是一個有效的瀏覽器路徑!", "info.config-browser-path": "配置瀏覽器路徑", "info.pdf.exporting": "正在導出PDF到{0}", - "info.generate-pdf-to": "PDF 已生成至 {0}" + "info.generate-pdf-to": "PDF 已生成至 {0}", + "info.vivado-gui.started": "Vivado GUI 正在啟動中,稍等片刻", + "ok": "好的" } \ No newline at end of file diff --git a/resources/script/xilinx/simulate.tcl b/resources/script/xilinx/simulate.tcl new file mode 100644 index 0000000..5556bcb --- /dev/null +++ b/resources/script/xilinx/simulate.tcl @@ -0,0 +1,18 @@ + +if {[current_sim] != ""} { + relaunch_sim -quiet +} else { + launch_simulation -quiet +} + +set curr_wave [current_wave_config] +if { [string length $curr_wave] == 0 } { + if { [llength [get_objects]] > 0} { + add_wave / + set_property needs_save false [current_wave_config] + } else { + send_msg_id Add_Wave-1 WARNING "No top level signals found. Simulator will start without a wave window. If you want to open a wave window go to 'File->New Waveform Configuration' or type 'create_wave_config' in the TCL console." + } +} +run 1us +file delete c:/Users/11934/Project/Digital-IDE/digital-ide/resources/script/xilinx/simulate.tcl -force diff --git a/src/function/dide-netlist/index.ts b/src/function/dide-netlist/index.ts index bf3d2dc..661ecfc 100644 --- a/src/function/dide-netlist/index.ts +++ b/src/function/dide-netlist/index.ts @@ -20,7 +20,6 @@ interface SimpleOpe { extensionPath: string } -const workerScriptPath = hdlPath.join(__dirname, 'worker.js'); class NetlistRender { panel?: vscode.WebviewPanel; @@ -177,6 +176,7 @@ function checkResource() { export async function openNetlistViewer(context: vscode.ExtensionContext, uri: vscode.Uri, moduleName: string) { checkResource(); + const workerScriptPath = hdlPath.join(opeParam.extensionPath, 'out', 'function', 'dide-netlist', 'worker.js'); const worker = new Worker(workerScriptPath); let success = true; @@ -245,6 +245,7 @@ async function showErrorLogFile(data: any) { export async function runYsScript(context: vscode.ExtensionContext, uri: vscode.Uri) { checkResource(); + const workerScriptPath = hdlPath.join(opeParam.extensionPath, 'out', 'function', 'dide-netlist', 'worker.js'); const worker = new Worker(workerScriptPath); worker.on('message', message => { diff --git a/src/manager/PL/xilinx.ts b/src/manager/PL/xilinx.ts index 0b792b9..a75e68f 100644 --- a/src/manager/PL/xilinx.ts +++ b/src/manager/PL/xilinx.ts @@ -444,6 +444,10 @@ class XilinxOperation { * @param context */ public refresh(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Refresh", + { title: 'ok', value: true } + ); const cmd = this.getRefreshXprDesignSourceCommand(); context.process?.stdin.write(cmd + '\n'); } @@ -477,6 +481,11 @@ class XilinxOperation { } public simulateGui(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Simulate GUI", + { title: 'ok', value: true } + ); + const scriptPath = `${this.xilinxPath}/simulate.tcl`; const script = ` @@ -508,6 +517,11 @@ file delete ${scriptPath} -force\n`; } public simulateCli(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Simulate CLI", + { title: 'ok', value: true } + ); + const scriptPath = hdlPath.join(this.xilinxPath, 'simulate.tcl'); const script = ` if {[current_sim] != ""} { @@ -536,6 +550,11 @@ file delete ${scriptPath} -force\n`; } public synth(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Synth", + { title: 'ok', value: true } + ); + let quietArg = ''; if (opeParam.prjInfo.enableShowLog) { quietArg = '-quiet'; @@ -550,6 +569,11 @@ file delete ${scriptPath} -force\n`; } impl(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Impl", + { title: 'ok', value: true } + ); + let quietArg = ''; if (opeParam.prjInfo.enableShowLog) { quietArg = '-quiet'; @@ -566,6 +590,10 @@ file delete ${scriptPath} -force\n`; } build(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Build", + { title: 'ok', value: true } + ); let quietArg = ''; if (this.prjConfig.enableShowLog) { quietArg = '-quiet'; @@ -595,6 +623,11 @@ file delete ${scriptPath} -force\n`; generateBit(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: BitStream", + { title: 'ok', value: true } + ); + let scripts: string[] = []; let core = this.prjConfig.soc.core; let sysdefPath = `${this.prjInfo.path}/${this.prjInfo.name}.runs` + @@ -626,6 +659,11 @@ file delete ${scriptPath} -force\n`; } program(context: PLContext) { + vscode.window.showInformationMessage( + "Xilinx: Program", + { title: 'ok', value: true } + ); + let scriptPath = `${this.xilinxPath}/program.tcl`; let script = ` open_hw -quiet @@ -672,6 +710,10 @@ file delete ${scriptPath} -force\n`; } tclProcess.stdin.write('start_gui -quiet\n'); + vscode.window.showInformationMessage( + t('info.vivado-gui.started'), + { title: t('ok'), value: true } + ); HardwareOutput.report(t('info.pl.gui.report-title'), { level: ReportType.Info });