#fix sim
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 473 B After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 45 B After Width: | Height: | Size: 45 B |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -7,9 +7,9 @@
|
|||||||
"digital-ide.tool.instance.title": "Generate instance template from selected module",
|
"digital-ide.tool.instance.title": "Generate instance template from selected module",
|
||||||
"digital-ide.tool.testbench.title": "Generate testbench template from current file",
|
"digital-ide.tool.testbench.title": "Generate testbench template from current file",
|
||||||
"digital-ide.tool.icarus.simulateFile.title": "Do simulation for current file",
|
"digital-ide.tool.icarus.simulateFile.title": "Do simulation for current file",
|
||||||
"digital-ide.treeView.arch.expand.title": "expand all the items in tree view",
|
"digital-ide.treeView.arch.expand.title": "Expand all the items in tree view",
|
||||||
"digital-ide.treeView.arch.collapse.title": "collapse all the items in tree view",
|
"digital-ide.treeView.arch.collapse.title": "Collapse all the items in tree view",
|
||||||
"digital-ide.treeView.arch.refresh.title": "refresh the tree view",
|
"digital-ide.treeView.arch.refresh.title": "Refresh the tree view",
|
||||||
"digital-ide.treeView.arch.openFile.title": "Open the corresponding file in tree view",
|
"digital-ide.treeView.arch.openFile.title": "Open the corresponding file in tree view",
|
||||||
"digital-ide.tool.clean.title": "Clean the current project",
|
"digital-ide.tool.clean.title": "Clean the current project",
|
||||||
"digital-ide.soft.launch.title": "Launch SDK development assist function",
|
"digital-ide.soft.launch.title": "Launch SDK development assist function",
|
||||||
@ -27,18 +27,18 @@
|
|||||||
"digital-ide.hard.program.title": "Download the bit file into the device",
|
"digital-ide.hard.program.title": "Download the bit file into the device",
|
||||||
"digital-ide.hard.gui.title": "Open the GUI",
|
"digital-ide.hard.gui.title": "Open the GUI",
|
||||||
"digital-ide.hard.exit.title": "Exit the current project",
|
"digital-ide.hard.exit.title": "Exit the current project",
|
||||||
"digital-ide.pickLibrary.title": "select lib from custom & common",
|
"digital-ide.pickLibrary.title": "Select lib from custom & common",
|
||||||
"digital-ide.pl.setSrcTop.title": "set as top file of src",
|
"digital-ide.pl.setSrcTop.title": "Set as top file of src",
|
||||||
"digital-ide.pl.setSimTop.title": "set as top file of sim",
|
"digital-ide.pl.setSimTop.title": "Set as top file of sim",
|
||||||
"digital-ide.pl.addDevice.title": "add device",
|
"digital-ide.pl.addDevice.title": "Add device",
|
||||||
"digital-ide.pl.delDevice.title": "del device",
|
"digital-ide.pl.delDevice.title": "Del device",
|
||||||
"digital-ide.pl.addFile.title": "add file",
|
"digital-ide.pl.addFile.title": "Add file",
|
||||||
"digital-ide.pl.delFile.title": "del file",
|
"digital-ide.pl.delFile.title": "Del file",
|
||||||
"digital-ide.netlist.title": "netlist",
|
"digital-ide.netlist.title": "Netlist",
|
||||||
"digital-ide.fsm.title": "finite state machine",
|
"digital-ide.fsm.title": "Finite state machine",
|
||||||
"digital-ide.lsp.tool.insertTextToUri.title": "insert text to uri",
|
"digital-ide.lsp.tool.insertTextToUri.title": "Insert text to uri",
|
||||||
"digital-ide.lsp.tool.transformOldPropertyFile.title": "transform configure file from previous version to new version",
|
"digital-ide.lsp.tool.transformOldPropertyFile.title": "Transform configure file from previous version to new version",
|
||||||
"digital-ide.vhdl2vlog.title": "translate vhdl code to verilog code",
|
"digital-ide.vhdl2vlog.title": "Translate vhdl code to verilog code",
|
||||||
"digital-ide.fsm.show.title": "show FSM graph of current file",
|
"digital-ide.fsm.show.title": "Show FSM graph of current file",
|
||||||
"digital-ide.netlist.show.title": "show netlist of current file"
|
"digital-ide.netlist.show.title": "Show netlist of current file"
|
||||||
}
|
}
|
@ -67,7 +67,7 @@ class NetlistKernel {
|
|||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
const file = files[i];
|
const file = files[i];
|
||||||
if (os.platform().toLowerCase() === 'win32') {
|
if (os.platform().toLowerCase() === 'win32') {
|
||||||
console.log(this.kernel.FS.readdir('/'));
|
// console.log(this.kernel.FS.readdir('/'));
|
||||||
this.exec(`${command} /${file}`);
|
this.exec(`${command} /${file}`);
|
||||||
} else {
|
} else {
|
||||||
this.exec(`${command} /host/${file}`);
|
this.exec(`${command} /host/${file}`);
|
||||||
|
@ -22,10 +22,10 @@ class render{
|
|||||||
|
|
||||||
document.getElementById("next").onclick = function () {
|
document.getElementById("next").onclick = function () {
|
||||||
if (this.curNetIndex < this.netLists.length-1) {
|
if (this.curNetIndex < this.netLists.length-1) {
|
||||||
this.curNetIndex++;
|
this.curNetIndex ++;
|
||||||
this.showNetlist(this.netLists[this.curNetIndex]);
|
this.showNetlist(this.netLists[this.curNetIndex]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async showNetlist(netList, isClear) {
|
async showNetlist(netList, isClear) {
|
||||||
@ -35,15 +35,15 @@ class render{
|
|||||||
this.netLists.push(netList);
|
this.netLists.push(netList);
|
||||||
}
|
}
|
||||||
|
|
||||||
let netnode = this.showTreelist(netList);
|
const netnode = this.showTreelist(netList);
|
||||||
|
|
||||||
var setting = {};
|
const setting = {};
|
||||||
$(document).ready(function () {
|
$(document).ready(() => {
|
||||||
this.zTreeObj = $.fn.zTree.init($("#netTree"), setting, netnode);
|
this.zTreeObj = $.fn.zTree.init($("#netTree"), setting, netnode);
|
||||||
});
|
});
|
||||||
|
|
||||||
// remove embed
|
// remove embed
|
||||||
svgPanZoom(this.embed_svg).destroy();
|
// svgPanZoom(this.embed_svg).destroy();
|
||||||
this.svg = await netlistsvg.render(netlistsvg.digitalSkin, netList);
|
this.svg = await netlistsvg.render(netlistsvg.digitalSkin, netList);
|
||||||
|
|
||||||
//Add to container
|
//Add to container
|
||||||
|
4
resources/public/svg-pan-zoom.min.js
vendored
@ -2,7 +2,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as fspath from 'path';
|
import * as fspath from 'path';
|
||||||
|
|
||||||
import { opeParam, MainOutput, ReportType, AbsPath } from './global';
|
import { opeParam, MainOutput, AbsPath } from './global';
|
||||||
import { hdlParam } from './hdlParser';
|
import { hdlParam } from './hdlParser';
|
||||||
import * as manager from './manager';
|
import * as manager from './manager';
|
||||||
import * as func from './function';
|
import * as func from './function';
|
||||||
@ -63,6 +63,9 @@ async function launch(context: vscode.ExtensionContext) {
|
|||||||
|
|
||||||
MainOutput.report('Digital-IDE has launched, Version: 0.3.0');
|
MainOutput.report('Digital-IDE has launched, Version: 0.3.0');
|
||||||
MainOutput.report('OS: ' + opeParam.os);
|
MainOutput.report('OS: ' + opeParam.os);
|
||||||
|
|
||||||
|
console.log(hdlParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function activate(context: vscode.ExtensionContext) {
|
export function activate(context: vscode.ExtensionContext) {
|
||||||
|
@ -108,13 +108,17 @@ class VlogMacroCompletionProvider implements vscode.CompletionItemProvider {
|
|||||||
|
|
||||||
class VlogPositionPortProvider implements vscode.CompletionItemProvider {
|
class VlogPositionPortProvider implements vscode.CompletionItemProvider {
|
||||||
public async provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, context: vscode.CompletionContext): Promise<vscode.CompletionItem[] | vscode.CompletionList<vscode.CompletionItem> | null | undefined> {
|
public async provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, context: vscode.CompletionContext): Promise<vscode.CompletionItem[] | vscode.CompletionList<vscode.CompletionItem> | null | undefined> {
|
||||||
// console.log('VlogPositionPortProvider');
|
console.log('enter VlogPositionPortProvider');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const suggestPositionPorts: vscode.CompletionItem[] = [];
|
const suggestPositionPorts: vscode.CompletionItem[] = [];
|
||||||
const filePath = hdlPath.toSlash(document.fileName);
|
const filePath = hdlPath.toSlash(document.fileName);
|
||||||
const symbolResult = await vlogSymbolStorage.getSymbol(filePath);
|
const symbolResult = await vlogSymbolStorage.getSymbol(filePath);
|
||||||
if (!symbolResult) {
|
|
||||||
|
// console.log(symbolResult?.content);
|
||||||
|
// console.log(position.character, position.line);
|
||||||
|
|
||||||
|
if (!symbolResult) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class VlogLinter {
|
|||||||
async lint(document: vscode.TextDocument) {
|
async lint(document: vscode.TextDocument) {
|
||||||
const filePath = document.fileName;
|
const filePath = document.fileName;
|
||||||
const vlogAll = await vlogSymbolStorage.getSymbol(filePath);
|
const vlogAll = await vlogSymbolStorage.getSymbol(filePath);
|
||||||
console.log('lint all finish');
|
// console.log('lint all finish');
|
||||||
|
|
||||||
if (vlogAll) {
|
if (vlogAll) {
|
||||||
const diagnostics = this.provideDiagnostics(document, vlogAll);
|
const diagnostics = this.provideDiagnostics(document, vlogAll);
|
||||||
|
@ -203,6 +203,7 @@ function filterInstanceByPosition(position: vscode.Position, symbols: RawSymbol[
|
|||||||
}
|
}
|
||||||
for (const symbol of symbols) {
|
for (const symbol of symbols) {
|
||||||
const inst = module.getInstance(symbol.name);
|
const inst = module.getInstance(symbol.name);
|
||||||
|
|
||||||
if (positionAfterEqual(position, symbol.range.start) &&
|
if (positionAfterEqual(position, symbol.range.start) &&
|
||||||
positionAfterEqual(symbol.range.end, position) &&
|
positionAfterEqual(symbol.range.end, position) &&
|
||||||
inst) {
|
inst) {
|
||||||
|
@ -2,7 +2,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as fspath from 'path';
|
import * as fspath from 'path';
|
||||||
|
|
||||||
import { NetlistKernel } from '../../../resources/netlist';
|
import { NetlistKernel } from '../../../resources/netlist';
|
||||||
import { MainOutput, opeParam, ReportType, YosysOutput } from '../../global';
|
import { opeParam, ReportType, YosysOutput } from '../../global';
|
||||||
import { hdlParam } from '../../hdlParser';
|
import { hdlParam } from '../../hdlParser';
|
||||||
import { hdlFile, hdlPath } from '../../hdlFs';
|
import { hdlFile, hdlPath } from '../../hdlFs';
|
||||||
|
|
||||||
@ -54,6 +54,7 @@ class Netlist {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
prjFiles.forEach(file => YosysOutput.report('feed file: ' + file, ReportType.Debug));
|
||||||
this.kernel.load(prjFiles);
|
this.kernel.load(prjFiles);
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ class IcarusSimulate extends Simulate {
|
|||||||
const outVvpPath = '"' + hdlPath.join(simConfig.simulationHome, 'out.vvp') + '"';
|
const outVvpPath = '"' + hdlPath.join(simConfig.simulationHome, 'out.vvp') + '"';
|
||||||
const mainPath = '"' + path + '"';
|
const mainPath = '"' + path + '"';
|
||||||
|
|
||||||
const cmd = `${iverilogPath} ${argu} -o ${outVvpPath} -s ${name} ${macroIncludeArgs} ${mainPath} ${dependenceArgs} ${thirdLibraryArgs}`;
|
const cmd = `${iverilogPath} ${argu} -o ${outVvpPath} -s ${name} ${macroIncludeArgs} ${thirdLibraryArgs} ${mainPath} ${dependenceArgs}`;
|
||||||
MainOutput.report(cmd, ReportType.Run);
|
MainOutput.report(cmd, ReportType.Run);
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
@ -58,15 +58,15 @@ const PrjInfoDefaults: PrjInfoMeta = {
|
|||||||
|
|
||||||
get arch() {
|
get arch() {
|
||||||
return {
|
return {
|
||||||
prjPath: '.',
|
prjPath: '',
|
||||||
hardware: {
|
hardware: {
|
||||||
src: '.',
|
src: '',
|
||||||
sim: '.',
|
sim: '',
|
||||||
data: '.'
|
data: ''
|
||||||
},
|
},
|
||||||
software: {
|
software: {
|
||||||
src: '.',
|
src: '',
|
||||||
data: '.'
|
data: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -476,7 +476,7 @@ class PrjInfo implements PrjInfoMeta {
|
|||||||
if (iverilogCompileOptions.standard) {
|
if (iverilogCompileOptions.standard) {
|
||||||
this._iverilogCompileOptions.standard = iverilogCompileOptions.standard;
|
this._iverilogCompileOptions.standard = iverilogCompileOptions.standard;
|
||||||
}
|
}
|
||||||
if (iverilogCompileOptions.includes && iverilogCompileOptions.includes instanceof Array<Path>) {
|
if (iverilogCompileOptions.includes && iverilogCompileOptions.includes instanceof Array) {
|
||||||
this._iverilogCompileOptions.includes = [];
|
this._iverilogCompileOptions.includes = [];
|
||||||
for (const includePath of iverilogCompileOptions.includes) {
|
for (const includePath of iverilogCompileOptions.includes) {
|
||||||
const realIncludePath = includePath.replace(/\$\{workspace\}/g, this._workspacePath);
|
const realIncludePath = includePath.replace(/\$\{workspace\}/g, this._workspacePath);
|
||||||
@ -567,19 +567,26 @@ class PrjInfo implements PrjInfoMeta {
|
|||||||
|
|
||||||
public get hardwareSimPath(): AbsPath {
|
public get hardwareSimPath(): AbsPath {
|
||||||
const simPath = this._arch.hardware.sim;
|
const simPath = this._arch.hardware.sim;
|
||||||
|
const workspace = this._workspacePath;
|
||||||
if (fspath.isAbsolute(simPath)) {
|
if (fspath.isAbsolute(simPath)) {
|
||||||
return simPath;
|
return simPath;
|
||||||
|
} else if (simPath === '') {
|
||||||
|
return workspace;
|
||||||
}
|
}
|
||||||
const workspace = this._workspacePath;
|
|
||||||
return hdlPath.join(workspace, simPath);
|
return hdlPath.join(workspace, simPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get hardwareSrcPath(): AbsPath {
|
public get hardwareSrcPath(): AbsPath {
|
||||||
const srcPath = this._arch.hardware.src;
|
const srcPath = this._arch.hardware.src;
|
||||||
|
const workspace = this._workspacePath;
|
||||||
|
|
||||||
if (fspath.isAbsolute(srcPath)) {
|
if (fspath.isAbsolute(srcPath)) {
|
||||||
return srcPath;
|
return srcPath;
|
||||||
|
} else if (srcPath === '') {
|
||||||
|
return workspace;
|
||||||
}
|
}
|
||||||
const workspace = this._workspacePath;
|
console.log(hdlPath.join(workspace, srcPath));
|
||||||
|
|
||||||
return hdlPath.join(workspace, srcPath);
|
return hdlPath.join(workspace, srcPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ class PrjManage {
|
|||||||
// do search
|
// do search
|
||||||
const searchPaths = searchPathSet.files;
|
const searchPaths = searchPathSet.files;
|
||||||
|
|
||||||
const hdlFiles = hdlFile.getHDLFiles(searchPaths, ignores);
|
const hdlFiles = hdlFile.getHDLFiles(searchPaths, ignores);
|
||||||
return hdlFiles;
|
return hdlFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,7 @@ module Cordic #(
|
|||||||
output signed [XY_BITS-1:0] x_o,
|
output signed [XY_BITS-1:0] x_o,
|
||||||
output signed [XY_BITS-1:0] y_o,
|
output signed [XY_BITS-1:0] y_o,
|
||||||
output signed [PH_BITS-1:0] phase_out,
|
output signed [PH_BITS-1:0] phase_out,
|
||||||
|
input valid_in,
|
||||||
input valid_in,
|
|
||||||
output valid_out
|
output valid_out
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
"include": "#comments"
|
"include": "#comments"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": "#module_pattern"
|
"include": "#keywords"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": "#keywords"
|
"include": "#module_pattern"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": "#constants"
|
"include": "#constants"
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"name": "punctuation.terminator.expression.verilog"
|
"name": "punctuation.terminator.expression.verilog"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "meta.block.instantiation.parameterless.verilog",
|
"name": "variable.other.constant.instantiation.parameterless.verilog",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"include": "#comments"
|
"include": "#comments"
|
||||||
|