diff --git a/README.md b/README.md index 4997e315..baa41669 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,135 @@ +**Index** -# TerosHDL +1. [Introduction](#id1) +2. [Thanks](#id2) +3. [Go to definition](#id3) +4. [Hover](#id4) +5. [Template generator](#id5) +6. [Documenter](#id6) +7. [Errors checking](#id7) +8. [Style checking](#id8) +9. [Formatting](#id9) +10. [Dependencies viewer](#id10) +11. [Future work](#id11) -Teros Technology: http://www.terostech.com/ +# 1. Introduction +Our philosophy is: think in hardware, develop hardware, take advantage of software tools. -**Our philosophy is: think in hardware, develop hardware, [take advantage of software tools.](https://github.com/qarlosalberto/fpga-knife)** +The goal of TerosHDL is make the FPGA development easier and reliable. It is a powerful open source IDE. -The goal of TerosHDL is make the FPGA development easier and reliable. It is a powerful open source IDE. +# 2. Thanks +- Verilog HDL/SystemVerilog (https://marketplace.visualstudio.com/items?itemName=mshr-h.VerilogHDL) +- VUnit (https://vunit.github.io/) +- VSG (https://github.com/jeremiah-c-leary/vhdl-style-guide) -Currently we support: +# 3. Go to definition -- Ghdl. -- ModelSim. -- Vhdl -- VUnit. +You can jump to the definition with Ctrl+Click. -Soon we will support Verilog and others simulators. +![alt text](./resources/images/readme/goto.png "title") +# 4. Hover -## Dependencies +If you hover over a symbol, a preview of the declaration will appear. -- Symbolator: https://kevinpt.github.io/symbolator/#installation -- Git -- TerosHDLbackend >= 0.1.1: -```pip install TerosHDL``` -- VUnit: -```pip install vunit_hdl``` +![alt text](resources/images/readme/hover.png "title") +# 5. Template generator + +## Supported templates + +| Verilog | VHDL | +| --------: | --------- | +| Testbench | Testbench | +| cocotb | cocotb | +| VUnit | VUnit | +| Signals | Signals | +| Component | Component | +| Instance | Instance | +| Verilator | | + +## Usage Instructions + +1. Open a VHDL/Verilog file. +2. Select the template icon. + ![alt text](./resources/images/readme/sample_templates_select.png "title") +3. Choose a template type. + +# 6. Documenter + +## Special comment symbols + +You can configure what symbol will be used to extract the comments in the HDL file. In the following example is used the symbol "!": + +``` +--! This is a description +--! of the entity. +entity counter is + port ( + clk: in std_logic; --! Clock comment + out_data: out std_logic --! Description port comment + ); +end counter; +``` + +## Usage Instructions + +1. Open a VHDL/Verilog file. +2. Select the documenter icon. + ![alt text](./resources/images/readme/sample_documenter_select.png "title") +3. TerosHDL will show the generated documentation. + ![alt text](./resources/images/readme/sample_documenter_viewer.png "title") +4. Export your documentation to PDF, Markdown, HTML or SVG diagram. +5. Edit your VHDL/Verilog file and save it. The preview will show automatically. + +# 7. Errors checking + +## Supported linters + +| Verilog | VHDL | +| --------: | -------- | +| ModelSim | ModelSim | +| Vivado | Vivado | +| Icarus | GHDL | +| Verilator | | + +## Configuration + +# 8. Style checking + +## Supported linters + +| Verilog | VHDL | +| ------: | ---- | +| Verible | VSG | + +## Configuration + +# 9. Formatting + +## Supported formatters + +| Verilog | VHDL | +| ------: | ---------- | +| iStyle | Standalone | + +## Configuration + +# 10. Dependencies viewer + +## Usage Instructions + +1. Open the command palette: `Ctrl+Shift+P` and select **_Open dependencies viewer_** + ![alt text](./resources/images/readme/sample_dependencies_select.png "title") +2. Add a HDL files to the viewer (you can mix verilog and VHDL). + ![alt text](./resources/images/readme/sample_dependencies_add.png "title") +3. TerosHDL will generate the dependencies graph: + ![alt text](./resources/images/readme/sample_dependencies_viewer.png "title") +4. You can reset your viewer: + ![alt text](./resources/images/readme/sample_dependencies_clear.png "title") +5. You can generate the indexed markdown documentation for all the files. + ![alt text](./resources/images/readme/sample_dependencies_documentation.png "title") + +# 11. Future work diff --git a/package.json b/package.json index 38191cef..a4778ea5 100644 --- a/package.json +++ b/package.json @@ -250,10 +250,9 @@ "description": "Select verilog formatter", "type": "string", "enum": [ - "Istyle", - "verible" + "iStyle" ], - "default": "Istyle" + "default": "iStyle" }, "teroshdl.formatter.verilog.type.istyle.style": { "description": "Predefined Styling options", diff --git a/resources/dependencies_viewer.html b/resources/dependencies_viewer.html deleted file mode 100644 index 552d2e83..00000000 --- a/resources/dependencies_viewer.html +++ /dev/null @@ -1,179 +0,0 @@ - - -
-
- - - - -
-
- - \ No newline at end of file diff --git a/resources/dependencies_viewer/dependencies_viewer.html b/resources/dependencies_viewer/dependencies_viewer.html index 572c941d..ffd98411 100644 --- a/resources/dependencies_viewer/dependencies_viewer.html +++ b/resources/dependencies_viewer/dependencies_viewer.html @@ -13,7 +13,7 @@
- + diff --git a/resources/images/readme/goto.png b/resources/images/readme/goto.png new file mode 100644 index 00000000..5a291c39 Binary files /dev/null and b/resources/images/readme/goto.png differ diff --git a/resources/images/readme/hover.png b/resources/images/readme/hover.png new file mode 100644 index 00000000..93b503a7 Binary files /dev/null and b/resources/images/readme/hover.png differ diff --git a/resources/images/readme/sample.png b/resources/images/readme/sample.png new file mode 100644 index 00000000..5d4be9a8 Binary files /dev/null and b/resources/images/readme/sample.png differ diff --git a/resources/images/readme/sample_dependencies.png b/resources/images/readme/sample_dependencies.png new file mode 100644 index 00000000..8e007cc7 Binary files /dev/null and b/resources/images/readme/sample_dependencies.png differ diff --git a/resources/images/readme/sample_dependencies_add.png b/resources/images/readme/sample_dependencies_add.png new file mode 100644 index 00000000..ae7f74de Binary files /dev/null and b/resources/images/readme/sample_dependencies_add.png differ diff --git a/resources/images/readme/sample_dependencies_clear.png b/resources/images/readme/sample_dependencies_clear.png new file mode 100644 index 00000000..6f7e567a Binary files /dev/null and b/resources/images/readme/sample_dependencies_clear.png differ diff --git a/resources/images/readme/sample_dependencies_documentation.png b/resources/images/readme/sample_dependencies_documentation.png new file mode 100644 index 00000000..0c63d2f3 Binary files /dev/null and b/resources/images/readme/sample_dependencies_documentation.png differ diff --git a/resources/images/readme/sample_dependencies_select.png b/resources/images/readme/sample_dependencies_select.png new file mode 100644 index 00000000..17c0bf33 Binary files /dev/null and b/resources/images/readme/sample_dependencies_select.png differ diff --git a/resources/images/readme/sample_dependencies_viewer.png b/resources/images/readme/sample_dependencies_viewer.png new file mode 100644 index 00000000..20d0e0e6 Binary files /dev/null and b/resources/images/readme/sample_dependencies_viewer.png differ diff --git a/resources/images/readme/sample_documenter_select.png b/resources/images/readme/sample_documenter_select.png new file mode 100644 index 00000000..340e9e0a Binary files /dev/null and b/resources/images/readme/sample_documenter_select.png differ diff --git a/resources/images/readme/sample_documenter_viewer.png b/resources/images/readme/sample_documenter_viewer.png new file mode 100644 index 00000000..0c30aa15 Binary files /dev/null and b/resources/images/readme/sample_documenter_viewer.png differ diff --git a/resources/images/readme/sample_formatter_select.png b/resources/images/readme/sample_formatter_select.png new file mode 100644 index 00000000..495d50c5 Binary files /dev/null and b/resources/images/readme/sample_formatter_select.png differ diff --git a/resources/images/readme/sample_templates_select.png b/resources/images/readme/sample_templates_select.png new file mode 100644 index 00000000..0c461d3a Binary files /dev/null and b/resources/images/readme/sample_templates_select.png differ diff --git a/resources/images/readme/sample_templates_type.png b/resources/images/readme/sample_templates_type.png new file mode 100644 index 00000000..e78ba264 Binary files /dev/null and b/resources/images/readme/sample_templates_type.png differ diff --git a/resources/preview_module_doc.html b/resources/preview_module_doc.html deleted file mode 100644 index c43a0127..00000000 --- a/resources/preview_module_doc.html +++ /dev/null @@ -1,178 +0,0 @@ - - -
-
- - - - -
-
- - - diff --git a/src/lib/dependencies_viewer/dependencies_viewer.ts b/src/lib/dependencies_viewer/dependencies_viewer.ts index 3c20be05..2d47ca9a 100644 --- a/src/lib/dependencies_viewer/dependencies_viewer.ts +++ b/src/lib/dependencies_viewer/dependencies_viewer.ts @@ -100,10 +100,14 @@ export default class Dependencies_viewer_manager { return dependencies_dot; } - private async update_viewer(){ let dot = await this.get_dot(); - await this.panel?.webview.postMessage({ command: "update", message: dot}); + if (dot === undefined){ + vscode.window.showInformationMessage("Please, install Python 3."); + } + else{ + await this.panel?.webview.postMessage({ command: "update", message: dot}); + } } //Clear diff --git a/src/lib/formatter/formatter_manager.ts b/src/lib/formatter/formatter_manager.ts index 7a7d365f..8e562c4f 100644 --- a/src/lib/formatter/formatter_manager.ts +++ b/src/lib/formatter/formatter_manager.ts @@ -28,10 +28,12 @@ export default class Formatter_manager { private lang : string = ""; private formatter_name : string = ""; private formatter; + private subscriptions: vscode.Disposable[] | undefined; constructor(language: string) { this.lang = language; this.config_formatter(); + vscode.workspace.onDidChangeConfiguration(this.config_formatter, this, this.subscriptions); } public async format (code){