Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Expose commands #694

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ vsc-extension-quickstart.md
**/.eslintrc.json
**/*.map
**/*.ts
user.teros-hdl.config.json
user.teros-hdl.config.json
.github
auto_package
tests
tests_impr
42 changes: 42 additions & 0 deletions auto_package/command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,48 @@
when: "viewItem =~ /snapshotviewer/"
group: "inline"

- name: project.quartus.rtlAnalyzer
title: "TerosHDL [Quartus]: Open RTL Analyzer"

- name: project.quartus.compileDesigh
title: "TerosHDL [Quartus]: Run Compile Design"

- name: project.quartus.analysisAndSynthesis
title: "TerosHDL [Quartus]: run Analysis and Synthesis"

- name: project.quartus.analysisAndElaboration
title: "TerosHDL [Quartus]: run Analysis and Elaboration"

- name: project.quartus.synthesis
title: "TerosHDL [Quartus]: run Synthesis"

- name: project.quartus.earlyTimingAnalysis
title: "TerosHDL [Quartus]: run Early Timing Analysis"

- name: project.quartus.fitter
title: "TerosHDL [Quartus]: run Fitter"

- name: project.quartus.fitterImplement
title: "TerosHDL [Quartus]: run Fitter Implement"

- name: project.quartus.plan
title: "TerosHDL [Quartus]: run Plan"

- name: project.quartus.place
title: "TerosHDL [Quartus]: run Place"

- name: project.quartus.route
title: "TerosHDL [Quartus]: run Route"

- name: project.quartus.fitterFinalize
title: "TerosHDL [Quartus]: run Fitter Finalize"

- name: project.quartus.timingAnalysisSignoff
title: "TerosHDL [Quartus]: run Timing Analysis Signoff"

- name: project.quartus.assembler
title: "TerosHDL [Quartus]: run Assembler"

## Watcher
- name: view.watcher.add
title: "Add"
Expand Down
2 changes: 1 addition & 1 deletion auto_package/templates/info.nj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"displayName": "TerosHDL",
"publisher": "teros-technology",
"description": "Powerful toolbox for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ",
"version": "6.0.13",
"version": "6.0.14",
"engines": {
"vscode": "^1.74.0"
},
Expand Down
18 changes: 0 additions & 18 deletions buildLinux.sh

This file was deleted.

1 change: 0 additions & 1 deletion clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

rm -rf node_modules
rm -rf out
rm -rf yarn.lock
rm -rf package-lock.json
58 changes: 57 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "TerosHDL",
"publisher": "teros-technology",
"description": "Powerful toolbox for ASIC/FPGA: state machine viewer, linter, documentation, snippets... and more! ",
"version": "6.0.13",
"version": "6.0.14",
"engines": {
"vscode": "^1.74.0"
},
Expand Down Expand Up @@ -645,6 +645,62 @@
},
"title": "Open Snapshop Viewer"
},
{
"command": "teroshdl.project.quartus.rtlAnalyzer",
"title": "TerosHDL [Quartus]: Open RTL Analyzer"
},
{
"command": "teroshdl.project.quartus.compileDesigh",
"title": "TerosHDL [Quartus]: Run Compile Design"
},
{
"command": "teroshdl.project.quartus.analysisAndSynthesis",
"title": "TerosHDL [Quartus]: run Analysis and Synthesis"
},
{
"command": "teroshdl.project.quartus.analysisAndElaboration",
"title": "TerosHDL [Quartus]: run Analysis and Elaboration"
},
{
"command": "teroshdl.project.quartus.synthesis",
"title": "TerosHDL [Quartus]: run Synthesis"
},
{
"command": "teroshdl.project.quartus.earlyTimingAnalysis",
"title": "TerosHDL [Quartus]: run Early Timing Analysis"
},
{
"command": "teroshdl.project.quartus.fitter",
"title": "TerosHDL [Quartus]: run Fitter"
},
{
"command": "teroshdl.project.quartus.fitterImplement",
"title": "TerosHDL [Quartus]: run Fitter Implement"
},
{
"command": "teroshdl.project.quartus.plan",
"title": "TerosHDL [Quartus]: run Plan"
},
{
"command": "teroshdl.project.quartus.place",
"title": "TerosHDL [Quartus]: run Place"
},
{
"command": "teroshdl.project.quartus.route",
"title": "TerosHDL [Quartus]: run Route"
},
{
"command": "teroshdl.project.quartus.fitterFinalize",
"title": "TerosHDL [Quartus]: run Fitter Finalize"
},
{
"command": "teroshdl.project.quartus.timingAnalysisSignoff",
"title": "TerosHDL [Quartus]: run Timing Analysis Signoff"
},
{
"command": "teroshdl.project.quartus.assembler",
"title": "TerosHDL [Quartus]: run Assembler"
},
{
"command": "teroshdl.view.watcher.add",
"icon": {
Expand Down
67 changes: 66 additions & 1 deletion src/teroshdl/features/tree_views/tasks/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import * as vscode from "vscode";
import * as element from "./element";
import { Multi_project_manager } from 'colibri/project_manager/multi_project_manager';
import { TaskDecorator } from "./element";
import { Task, TaskDecorator } from "./element";
import { ChildProcess, spawn } from "child_process";
import { LogView } from "../../views/logs";
import * as tree_kill from 'tree-kill';
Expand Down Expand Up @@ -95,6 +95,71 @@ export class Tasks_manager extends BaseView {
vscode.commands.registerCommand("teroshdl.view.tasks.clean", () => this.clean());
vscode.commands.registerCommand("teroshdl.view.tasks.device", () => this.device());
vscode.commands.registerCommand("teroshdl.view.tasks.console", () => this.openConsole());


// Quartus Commands
vscode.commands.registerCommand("teroshdl.project.quartus.rtlAnalyzer",
() => this.runQuartusTask(e_taskType.QUARTUS_RTL_ANALYZER));

vscode.commands.registerCommand("teroshdl.project.quartus.compileDesigh",
() => this.runQuartusTask(e_taskType.QUARTUS_COMPILEDESIGN));

vscode.commands.registerCommand("teroshdl.project.quartus.analysisAndSynthesis",
() => this.runQuartusTask(e_taskType.QUARTUS_ANALYSISSYNTHESIS));

vscode.commands.registerCommand("teroshdl.project.quartus.analysisAndElaboration",
() => this.runQuartusTask(e_taskType.QUARTUS_ANALYSISELABORATION));

vscode.commands.registerCommand("teroshdl.project.quartus.synthesis",
() => this.runQuartusTask(e_taskType.QUARTUS_SYNTHESIS));

vscode.commands.registerCommand("teroshdl.project.quartus.earlyTimingAnalysis",
() => this.runQuartusTask(e_taskType.QUARTUS_EARLYTIMINGANALYSIS));

vscode.commands.registerCommand("teroshdl.project.quartus.fitter",
() => this.runQuartusTask(e_taskType.QUARTUS_FITTER));

vscode.commands.registerCommand("teroshdl.project.quartus.fitterImplement",
() => this.runQuartusTask(e_taskType.QUARTUS_FITTERIMPLEMENT));

vscode.commands.registerCommand("teroshdl.project.quartus.plan",
() => this.runQuartusTask(e_taskType.QUARTUS_PLAN));

vscode.commands.registerCommand("teroshdl.project.quartus.place",
() => this.runQuartusTask(e_taskType.QUARTUS_PLACE));

vscode.commands.registerCommand("teroshdl.project.quartus.route",
() => this.runQuartusTask(e_taskType.QUARTUS_ROUTE));

vscode.commands.registerCommand("teroshdl.project.quartus.fitterFinalize",
() => this.runQuartusTask(e_taskType.QUARTUS_FITTERFINALIZE));

vscode.commands.registerCommand("teroshdl.project.quartus.timingAnalysisSignoff",
() => this.runQuartusTask(e_taskType.QUARTUS_TIMING));

vscode.commands.registerCommand("teroshdl.project.quartus.assembler",
() => this.runQuartusTask(e_taskType.QUARTUS_ASSEMBLER));
}

private runQuartusTask(task: e_taskType) {
const allTaskItems = <element.Task[]>this.tree.data;
function searchTask(taskItesm: element.Task[]) {
for (const taskItem of taskItesm) {
if (taskItem.taskDefinition.name === task) {
return taskItem;
}
if (taskItem.children) {
const result = searchTask(taskItem.children);
if (result) {
return result;
}
}
}
}
const taskItem = searchTask(allTaskItems);
if (taskItem) {
this.run(taskItem);
}
}

/**
Expand Down
Loading