执行 0.4.0 第二轮迭代测试
This commit is contained in:
parent
1b5f821f38
commit
f6d6f47b62
Binary file not shown.
@ -75,7 +75,7 @@ function instanceVhdlCode(module: HdlModule) {
|
|||||||
instContent += `generic map(\n${param})\n`;
|
instContent += `generic map(\n${param})\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
instContent += `port map(\n${port});\n`;
|
instContent += `port map(\n${port.trim()}\n);\n`;
|
||||||
|
|
||||||
return instContent;
|
return instContent;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ class IcarusSimulate extends Simulate {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// icarus 不支持 IP
|
// icarus 不支持 IP
|
||||||
if (dep.startsWith(opeParam.prjInfo.ipPath)) {
|
if (opeParam.prjInfo.ipPath.length > 0 && dep.startsWith(opeParam.prjInfo.ipPath)) {
|
||||||
MainOutput.report(t('error.simluate.icarus.use-ip', dep), { level: ReportType.Error });
|
MainOutput.report(t('error.simluate.icarus.use-ip', dep), { level: ReportType.Error });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,21 @@ function exportFilelist(view: ModuleDataItem) {
|
|||||||
deps.others.forEach(path => fileset.add(path));
|
deps.others.forEach(path => fileset.add(path));
|
||||||
deps.include.forEach(path => fileset.add(path));
|
deps.include.forEach(path => fileset.add(path));
|
||||||
const filelist = [view.path];
|
const filelist = [view.path];
|
||||||
filelist.push(...fileset);
|
|
||||||
|
for (const dep of fileset) {
|
||||||
|
// 去除其中的原语
|
||||||
|
if (dep === 'xilinx-primitives') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去除其中的 IP 文件
|
||||||
|
if (opeParam.prjInfo.ipPath.length > 0 && dep.startsWith(opeParam.prjInfo.ipPath)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
filelist.push(dep);
|
||||||
|
}
|
||||||
|
|
||||||
askUserToSaveFilelist(filelist);
|
askUserToSaveFilelist(filelist);
|
||||||
} else {
|
} else {
|
||||||
vscode.window.showErrorMessage('fail to get deps of view ' + view.name);
|
vscode.window.showErrorMessage('fail to get deps of view ' + view.name);
|
||||||
|
@ -10,7 +10,6 @@ import { getIconConfig } from '../../hdlFs/icons';
|
|||||||
import { DoFastFileType } from '../../global/lsp';
|
import { DoFastFileType } from '../../global/lsp';
|
||||||
import { t } from '../../i18n';
|
import { t } from '../../i18n';
|
||||||
|
|
||||||
let needExpand = true;
|
|
||||||
|
|
||||||
interface ModuleDataItem {
|
interface ModuleDataItem {
|
||||||
icon: string, // 图标
|
icon: string, // 图标
|
||||||
@ -118,10 +117,13 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
|
|||||||
let collapsibleState;
|
let collapsibleState;
|
||||||
if (!expandable) {
|
if (!expandable) {
|
||||||
collapsibleState = vscode.TreeItemCollapsibleState.None;
|
collapsibleState = vscode.TreeItemCollapsibleState.None;
|
||||||
} else if (needExpand) {
|
} else {
|
||||||
collapsibleState = vscode.TreeItemCollapsibleState.Expanded;
|
// 默认只让 src 和 sim 展开
|
||||||
} else {
|
if (element.parent === undefined) {
|
||||||
collapsibleState = vscode.TreeItemCollapsibleState.Collapsed;
|
collapsibleState = vscode.TreeItemCollapsibleState.Expanded;
|
||||||
|
} else {
|
||||||
|
collapsibleState = vscode.TreeItemCollapsibleState.Collapsed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const treeItem = new vscode.TreeItem(itemName, collapsibleState);
|
const treeItem = new vscode.TreeItem(itemName, collapsibleState);
|
||||||
@ -179,7 +181,7 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
|
|||||||
const hardwarePath = opeParam.prjInfo.arch.hardware;
|
const hardwarePath = opeParam.prjInfo.arch.hardware;
|
||||||
const moduleType = element.name as keyof (SrcPath & SimPath);
|
const moduleType = element.name as keyof (SrcPath & SimPath);
|
||||||
|
|
||||||
const topModules = hdlParam.getTopModulesByType(moduleType);
|
const topModules = hdlParam.getTopModulesByType(moduleType);
|
||||||
const topModuleItemList = topModules.map<ModuleDataItem>(module => ({
|
const topModuleItemList = topModules.map<ModuleDataItem>(module => ({
|
||||||
icon: this.judgeTopModuleIconByDoFastType(module.file.doFastType),
|
icon: this.judgeTopModuleIconByDoFastType(module.file.doFastType),
|
||||||
type: moduleType,
|
type: moduleType,
|
||||||
|
@ -314,7 +314,7 @@ class HdlParam {
|
|||||||
for (const p of pools) {
|
for (const p of pools) {
|
||||||
const increment = Math.floor(p.id / fileNum * 100);
|
const increment = Math.floor(p.id / fileNum * 100);
|
||||||
await p.promise;
|
await p.promise;
|
||||||
console.log("handle id " + p.id + ' increment: ' + increment);
|
// console.log("handle id " + p.id + ' increment: ' + increment);
|
||||||
progress?.report({ message: reportTitle + ` ${p.id}/${fileNum}`, increment });
|
progress?.report({ message: reportTitle + ` ${p.id}/${fileNum}`, increment });
|
||||||
}
|
}
|
||||||
pools.length = 0;
|
pools.length = 0;
|
||||||
@ -351,7 +351,7 @@ class HdlParam {
|
|||||||
for (const p of pools) {
|
for (const p of pools) {
|
||||||
const increment = Math.floor(p.id / fileNum * 100);
|
const increment = Math.floor(p.id / fileNum * 100);
|
||||||
await p.promise;
|
await p.promise;
|
||||||
console.log("handle id " + p.id + ' increment: ' + increment);
|
// console.log("handle id " + p.id + ' increment: ' + increment);
|
||||||
progress?.report({ message: reportTitle + ` ${p.id}/${fileNum}`, increment });
|
progress?.report({ message: reportTitle + ` ${p.id}/${fileNum}`, increment });
|
||||||
}
|
}
|
||||||
pools.length = 0;
|
pools.length = 0;
|
||||||
@ -454,14 +454,15 @@ class HdlParam {
|
|||||||
|
|
||||||
public updateFast(path: string, fast: common.Fast) {
|
public updateFast(path: string, fast: common.Fast) {
|
||||||
const moduleFile = this.getHdlFile(path);
|
const moduleFile = this.getHdlFile(path);
|
||||||
|
|
||||||
if (moduleFile === undefined) {
|
if (moduleFile === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. update marco directly
|
// 1. 更新 macro
|
||||||
moduleFile.updateMacro(fast.macro);
|
moduleFile.updateMacro(fast.macro);
|
||||||
|
|
||||||
// 2. update modules one by one
|
// 2. 增量更新所有 module
|
||||||
const uncheckedModuleNames = new Set<string>();
|
const uncheckedModuleNames = new Set<string>();
|
||||||
for (const name of moduleFile.getAllModuleNames()) {
|
for (const name of moduleFile.getAllModuleNames()) {
|
||||||
uncheckedModuleNames.add(name);
|
uncheckedModuleNames.add(name);
|
||||||
@ -482,7 +483,7 @@ class HdlParam {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. delete module not visited yet
|
// 3. 删除没有被访问到的 module
|
||||||
for (const moduleName of uncheckedModuleNames) {
|
for (const moduleName of uncheckedModuleNames) {
|
||||||
moduleFile.deleteHdlModule(moduleName);
|
moduleFile.deleteHdlModule(moduleName);
|
||||||
}
|
}
|
||||||
@ -1078,7 +1079,7 @@ export class HdlFile {
|
|||||||
hdlParam.setHdlFile(this);
|
hdlParam.setHdlFile(this);
|
||||||
|
|
||||||
// make nameToModule
|
// make nameToModule
|
||||||
this.nameToModule = new Map<string, HdlModule>();
|
this.nameToModule = new Map<string, HdlModule>();
|
||||||
for (const rawHdlModule of modules) {
|
for (const rawHdlModule of modules) {
|
||||||
this.createHdlModule(rawHdlModule);
|
this.createHdlModule(rawHdlModule);
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,13 @@ class HdlIgnore {
|
|||||||
let relativePath = hdlPath.toPureRelativePath(hdlPath.relative(workspace, path));
|
let relativePath = hdlPath.toPureRelativePath(hdlPath.relative(workspace, path));
|
||||||
|
|
||||||
for (const pattern of this.patterns) {
|
for (const pattern of this.patterns) {
|
||||||
|
// 1. 如果当前 pattern 是一个文件夹,则通过包含前缀匹配
|
||||||
|
const patternAbsPath = hdlPath.join(workspace, pattern);
|
||||||
|
if (fspath.isAbsolute(patternAbsPath) && relativePath.startsWith(pattern)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 通过 glob 进行匹配
|
||||||
const matched = minimatch(relativePath, pattern);
|
const matched = minimatch(relativePath, pattern);
|
||||||
if (matched) {
|
if (matched) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user