更新 netlist
This commit is contained in:
parent
d1276ea2e9
commit
9166852c49
1
digital-netlist-render
Submodule
1
digital-netlist-render
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f148e9a24fbafd144c3961b36ebd6c3266335beb
|
@ -100,5 +100,9 @@
|
||||
"info.netlist.launch-netlist": "Netlist wird gestartet",
|
||||
"info.netlist.not-found-payload": "Die Lastressource des Netlists konnte nicht gefunden werden. Bitte überprüfen Sie, ob das Installationsverzeichnis beschädigt ist!",
|
||||
"info.netlist.not-support-vhdl": "Das aktuelle Netlist unterstützt vorübergehend kein VHDL und andere Sprachen!",
|
||||
"info.netlist.generate-network": "Netzwerktopologie wird generiert"
|
||||
"info.netlist.generate-network": "Netzwerktopologie wird generiert",
|
||||
"error.cannot-gen-netlist": "Netlist-Datei konnte nicht generiert werden!",
|
||||
"info.common.confirm": "Bestätigen",
|
||||
"info.command.structure.reload-vscode": "Vscode neu starten",
|
||||
"error.look-up-log": "Fehlerprotokoll anzeigen"
|
||||
}
|
@ -100,5 +100,9 @@
|
||||
"info.netlist.launch-netlist": "Starting Netlist",
|
||||
"info.netlist.not-found-payload": "Unable to find the load resource of the netlist, please check if the installation directory is corrupted!",
|
||||
"info.netlist.not-support-vhdl": "The current netlist temporarily does not support VHDL and other languages!",
|
||||
"info.netlist.generate-network": "Generating network topology"
|
||||
"info.netlist.generate-network": "Generating network topology",
|
||||
"error.cannot-gen-netlist": "Unable to generate Netlist file!",
|
||||
"info.common.confirm": "Confirm",
|
||||
"info.command.structure.reload-vscode": "Restart Vscode",
|
||||
"error.look-up-log": "View error log"
|
||||
}
|
@ -100,5 +100,9 @@
|
||||
"info.netlist.launch-netlist": "Netlistを起動中",
|
||||
"info.netlist.not-found-payload": "ネットリストのロードリソースが見つかりません。インストールディレクトリが破損していないか確認してください!",
|
||||
"info.netlist.not-support-vhdl": "現在のネットリストは一時的にVHDLやその他の言語をサポートしていません!",
|
||||
"info.netlist.generate-network": "ネットワークトポロジを生成中"
|
||||
"info.netlist.generate-network": "ネットワークトポロジを生成中",
|
||||
"error.cannot-gen-netlist": "ネットリストファイルを生成できません!",
|
||||
"info.common.confirm": "確認",
|
||||
"info.command.structure.reload-vscode": "Vscodeを再起動",
|
||||
"error.look-up-log": "エラーログを表示"
|
||||
}
|
@ -100,5 +100,9 @@
|
||||
"info.netlist.launch-netlist": "正在启动 Netlist",
|
||||
"info.netlist.not-found-payload": "无法找到 netlist 的负载资源,请检查安装目录是否损坏!",
|
||||
"info.netlist.not-support-vhdl": "当前 netlist 暂时不支持 VHDL 和其他语言!",
|
||||
"info.netlist.generate-network": "正在生成网络拓扑"
|
||||
"info.netlist.generate-network": "正在生成网络拓扑",
|
||||
"error.cannot-gen-netlist": "无法生成 Netlist 文件!",
|
||||
"info.common.confirm": "确认",
|
||||
"info.command.structure.reload-vscode": "重启 Vscode",
|
||||
"error.look-up-log": "查看错误日志"
|
||||
}
|
@ -100,5 +100,9 @@
|
||||
"info.netlist.launch-netlist": "正在啟動Netlist",
|
||||
"info.netlist.not-found-payload": "無法找到 netlist 的負載資源,請檢查安裝目錄是否損壞!",
|
||||
"info.netlist.not-support-vhdl": "當前 netlist 暫時不支援 VHDL 和其他語言!",
|
||||
"info.netlist.generate-network": "正在生成網路拓撲"
|
||||
"info.netlist.generate-network": "正在生成網路拓撲",
|
||||
"error.cannot-gen-netlist": "無法生成Netlist檔案!",
|
||||
"info.common.confirm": "確認",
|
||||
"info.command.structure.reload-vscode": "重啟 Vscode",
|
||||
"error.look-up-log": "查看錯誤日誌"
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
"l10n": "./l10n",
|
||||
"icon": "images/icon.png",
|
||||
"engines": {
|
||||
"vscode": "^1.95.0"
|
||||
"vscode": "^1.94.0"
|
||||
},
|
||||
"keywords": [
|
||||
"FPGA Develop Support",
|
||||
|
@ -83,6 +83,10 @@ class Netlist {
|
||||
const wasm = this.wasm;
|
||||
const wasi = this.makeWasi(targetYs);
|
||||
|
||||
const netlistPayloadFolder = hdlPath.join(opeParam.prjInfo.prjPath, 'netlist');
|
||||
const targetJson = hdlPath.join(netlistPayloadFolder, moduleName + '.json');
|
||||
hdlFile.rmSync(targetJson);
|
||||
|
||||
await vscode.window.withProgress({
|
||||
location: vscode.ProgressLocation.Notification,
|
||||
title: t('info.netlist.generate-network'),
|
||||
@ -94,6 +98,19 @@ class Netlist {
|
||||
const exitCode = wasi.start(instance);
|
||||
});
|
||||
|
||||
if (!fs.existsSync(targetJson)) {
|
||||
const logFilePath = hdlPath.join(opeParam.prjInfo.prjPath, 'netlist', 'netlist.log');
|
||||
const res = await vscode.window.showErrorMessage(
|
||||
t('error.cannot-gen-netlist'),
|
||||
{ title: t('error.look-up-log'), value: true }
|
||||
)
|
||||
if (res?.value) {
|
||||
const document = await vscode.workspace.openTextDocument(vscode.Uri.file(logFilePath));
|
||||
await vscode.window.showTextDocument(document);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.create(moduleName);
|
||||
}
|
||||
|
||||
@ -145,10 +162,9 @@ class Netlist {
|
||||
|
||||
private makeWasi(target: string) {
|
||||
// 创建日志文件路径
|
||||
// const logFilePath = hdlPath.join(opeParam.workspacePath, 'wasi_log.txt');
|
||||
// hdlFile.removeFile(logFilePath);
|
||||
// 创建可写流,将标准输出和标准错误重定向到日志文件
|
||||
// const logFd = fs.openSync(logFilePath, 'a');
|
||||
const logFilePath = hdlPath.join(opeParam.prjInfo.prjPath, 'netlist', 'netlist.log');
|
||||
hdlFile.removeFile(logFilePath);
|
||||
const logFd = fs.openSync(logFilePath, 'a');
|
||||
|
||||
return new WASI({
|
||||
version: 'preview1',
|
||||
@ -164,7 +180,7 @@ class Netlist {
|
||||
},
|
||||
stdin: process.stdin.fd,
|
||||
stdout: process.stdout.fd,
|
||||
stderr: process.stderr.fd,
|
||||
stderr: logFd,
|
||||
// stdout: logFd,
|
||||
// stderr: logFd,
|
||||
env: process.env
|
||||
|
Loading…
x
Reference in New Issue
Block a user