update
This commit is contained in:
parent
9562b4ece1
commit
549aed0a28
@ -335,7 +335,7 @@ import { instanceVlogCode } from '../../sim/instance';
|
|||||||
// clItem.detail = 'module';
|
// clItem.detail = 'module';
|
||||||
// suggestModules.push(clItem);
|
// suggestModules.push(clItem);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// return suggestModules;
|
// return suggestModules;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class Output {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MainOutput = new Output('Digital-IDE');
|
const MainOutput = new Output('Digital-IDE');
|
||||||
const LspOutput = new Output('Digital-IDE Language Server');
|
const LspOutput = new Output('Digital-IDE Linter');
|
||||||
const YosysOutput = new Output('Digital-IDE Yosys');
|
const YosysOutput = new Output('Digital-IDE Yosys');
|
||||||
const WaveViewOutput = new Output('Digital-IDE Wave Viewer');
|
const WaveViewOutput = new Output('Digital-IDE Wave Viewer');
|
||||||
|
|
||||||
|
@ -125,9 +125,6 @@ class LibManage {
|
|||||||
hdlFile.copyFile(src, dist);
|
hdlFile.copyFile(src, dist);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.remote2Local(del, (src, dist) => {
|
|
||||||
hdlFile.removeFile(dist);
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -221,72 +221,18 @@ class PrjManage {
|
|||||||
const defaultPrjPath = hdlPath.join(opeParam.workspacePath, 'prj');
|
const defaultPrjPath = hdlPath.join(opeParam.workspacePath, 'prj');
|
||||||
hdlDir.mkdir(defaultPrjPath);
|
hdlDir.mkdir(defaultPrjPath);
|
||||||
|
|
||||||
// basic path
|
// 如果 soc.core 有效,那么就是 LS,否则是 PL
|
||||||
const userPath = hdlPath.join(opeParam.workspacePath, 'user');
|
const nextmode = this.getNextMode(rawPrjInfo);
|
||||||
const softwarePath = hdlPath.join(userPath, 'Software');
|
|
||||||
const hardwarePath = hdlPath.join(userPath, 'Hardware');
|
|
||||||
|
|
||||||
const nextmode = this.getNextMode(rawPrjInfo);
|
|
||||||
const currmode = this.getCurrentMode(softwarePath, hardwarePath);
|
|
||||||
|
|
||||||
if (currmode === nextmode) {
|
const hardware = opeParam.prjInfo.arch.hardware;
|
||||||
const hardware = opeParam.prjInfo.arch.hardware;
|
const software = opeParam.prjInfo.arch.software;
|
||||||
const software = opeParam.prjInfo.arch.software;
|
|
||||||
|
hdlDir.mkdir(hardware.src);
|
||||||
hdlDir.mkdir(hardware.src);
|
hdlDir.mkdir(hardware.sim);
|
||||||
hdlDir.mkdir(hardware.sim);
|
hdlDir.mkdir(hardware.data);
|
||||||
hdlDir.mkdir(hardware.data);
|
if (nextmode === 'LS') {
|
||||||
if (currmode === 'LS') {
|
hdlDir.mkdir(software.src);
|
||||||
hdlDir.mkdir(software.src);
|
hdlDir.mkdir(software.data);
|
||||||
hdlDir.mkdir(software.data);
|
|
||||||
}
|
|
||||||
} else if (currmode === "PL" && nextmode === "LS") {
|
|
||||||
hdlDir.mkdir(hardwarePath);
|
|
||||||
|
|
||||||
for (const path of fs.readdirSync(userPath)) {
|
|
||||||
const filePath = hdlPath.join(userPath, path);
|
|
||||||
if (filePath !== 'Hardware') {
|
|
||||||
hdlDir.mvdir(filePath, hardwarePath, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const softwareDataPath = hdlPath.join(softwarePath, 'data');
|
|
||||||
const softwareSrcPath = hdlPath.join(softwarePath, 'src');
|
|
||||||
|
|
||||||
hdlDir.mkdir(softwareDataPath);
|
|
||||||
hdlDir.mkdir(softwareSrcPath);
|
|
||||||
}
|
|
||||||
else if (currmode === "LS" && nextmode === "PL") {
|
|
||||||
const needNotice = vscode.workspace.getConfiguration().get('digital-ide.prj.file.structure.notice', true);
|
|
||||||
if (needNotice) {
|
|
||||||
const res = await vscode.window.showWarningMessage(
|
|
||||||
"Software will be deleted.",
|
|
||||||
{ modal: true },
|
|
||||||
{ title: 'Yes', value: true },
|
|
||||||
{ title: 'No', value: false }
|
|
||||||
);
|
|
||||||
if (res?.value) {
|
|
||||||
hdlDir.rmdir(softwarePath);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
hdlDir.rmdir(softwarePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs.existsSync(hardwarePath)) {
|
|
||||||
for (const path of fs.readdirSync(hardwarePath)) {
|
|
||||||
const filePath = hdlPath.join(hardwarePath, path);
|
|
||||||
hdlDir.mvdir(filePath, userPath, true);
|
|
||||||
}
|
|
||||||
hdlDir.rmdir(hardwarePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
const userSrcPath = hdlPath.join(userPath, 'src');
|
|
||||||
const userSimPath = hdlPath.join(userPath, 'sim');
|
|
||||||
const userDataPath = hdlPath.join(userPath, 'data');
|
|
||||||
|
|
||||||
hdlDir.mkdir(userSrcPath);
|
|
||||||
hdlDir.mkdir(userSimPath);
|
|
||||||
hdlDir.mkdir(userDataPath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user