优化一键仿真
This commit is contained in:
parent
a143ec8573
commit
cff21c2572
@ -370,9 +370,9 @@ class IcarusSimulate extends Simulate {
|
||||
const generateVvpName = hdlModule.name + '.vvp';
|
||||
|
||||
const outVvpPath = hdlPath.join(simConfig.simulationHome, generateVvpName);
|
||||
MainOutput.report(t('info.simulation.create-vvp', outVvpPath), {
|
||||
level: ReportType.Run
|
||||
});
|
||||
// MainOutput.report(t('info.simulation.create-vvp', outVvpPath), {
|
||||
// level: ReportType.Run
|
||||
// });
|
||||
|
||||
const vvpPath = simConfig.vvpPath;
|
||||
|
||||
@ -382,7 +382,7 @@ class IcarusSimulate extends Simulate {
|
||||
const vvpCwd = opeParam.openMode === 'file' ? cwd: opeParam.workspacePath;
|
||||
|
||||
const vvpCommand = `${vvpPath} ${outVvpPath}`;
|
||||
MainOutput.report(vvpCommand, { level: ReportType.Run });
|
||||
// MainOutput.report(vvpCommand, { level: ReportType.Run });
|
||||
|
||||
this.runVvp(vvpCommand, vvpCwd);
|
||||
});
|
||||
@ -427,7 +427,7 @@ class IcarusSimulate extends Simulate {
|
||||
if (match) {
|
||||
const vcdPath = match[1];
|
||||
const absVcdPath = hdlPath.resolve(cwd, vcdPath);
|
||||
MainOutput.report(t('info.simulate.vvp.vcd-generate', absVcdPath));
|
||||
MainOutput.report(t('info.simulate.vvp.vcd-generate', absVcdPath), { level: ReportType.Finish });
|
||||
} else {
|
||||
MainOutput.report(line.slice(9).trim());
|
||||
}
|
||||
@ -448,7 +448,10 @@ class IcarusSimulate extends Simulate {
|
||||
MainOutput.report(line.slice(10).trim(), { level: ReportType.Error });
|
||||
}
|
||||
} else {
|
||||
MainOutput.report(line, { level: ReportType.Info });
|
||||
const displayMessage = line.trim();
|
||||
if (displayMessage) {
|
||||
MainOutput.report(displayMessage, { level: ReportType.PrintOuput});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -489,7 +492,7 @@ class IcarusSimulate extends Simulate {
|
||||
// return;
|
||||
// }
|
||||
|
||||
const dependences = this.getAllOtherDependences(path, name);
|
||||
const dependences = this.getAllOtherDependences(path, name);
|
||||
const simulationCommand = this.getCommand(name, path, dependences);
|
||||
if (simulationCommand) {
|
||||
const cwd = hdlPath.resolve(path, '..');
|
||||
|
@ -33,7 +33,15 @@ enum ReportType {
|
||||
/**
|
||||
* 某些功能或者子进程在运行中产出的信息
|
||||
*/
|
||||
Run = 'Run'
|
||||
Run = 'Run',
|
||||
/**
|
||||
* 展示程序的输出
|
||||
*/
|
||||
PrintOuput = 'PrintOutput',
|
||||
/**
|
||||
* 代表程序的结束
|
||||
*/
|
||||
Finish = 'Finish'
|
||||
};
|
||||
|
||||
interface ReportOption {
|
||||
@ -96,13 +104,24 @@ class Output {
|
||||
option = option || { level: ReportType.Info, notify: false } as ReportOption;
|
||||
const level = option.level || ReportType.Info;
|
||||
const notify = option.notify || false;
|
||||
|
||||
|
||||
if (!this.skipMessage(level) && message) {
|
||||
const currentTime = this.getCurrentTime();
|
||||
this._output.appendLine('[' + level + ' - ' + currentTime + '] ' + message);
|
||||
|
||||
if (notify) {
|
||||
this.showInWindows('' + message, level);
|
||||
switch (option.level) {
|
||||
case ReportType.PrintOuput:
|
||||
this._output.appendLine(message.toString());
|
||||
break;
|
||||
case ReportType.Finish:
|
||||
this._output.appendLine('\n[' + level + ' - ' + currentTime + '] ' + message);
|
||||
break;
|
||||
|
||||
default:
|
||||
this._output.appendLine('[' + level + ' - ' + currentTime + '] ' + message);
|
||||
if (notify) {
|
||||
this.showInWindows('' + message, level);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -480,6 +480,8 @@ class HdlParam {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('fast:', fast);
|
||||
|
||||
// 1. 更新 macro
|
||||
moduleFile.updateMacro(fast.macro);
|
||||
|
||||
|
@ -71,6 +71,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "digital-ide.Finish",
|
||||
"match": "^(\\[Finish - (.*?)\\])(.*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "token.warn-token"
|
||||
},
|
||||
"2": {
|
||||
"name": "string"
|
||||
},
|
||||
"3": {
|
||||
"name": "token.warn-token"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "digital-ide.Launch",
|
||||
"match": "^(\\[Launch - (.*?)\\])([\\s\\S]*)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user