Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Vscode extension #437

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bfd0eb1
Added commit of module snippet
quekyj Jul 25, 2023
668ac09
Update Readme and several snippets
quekyj Aug 8, 2023
28b21fb
Add ROHD example
quekyj Aug 8, 2023
684a628
Added ROHD snippet
quekyj Aug 11, 2023
3734f9a
Added details to package.json
quekyj Aug 11, 2023
442e140
Add License
quekyj Aug 11, 2023
23f2773
Fix spacing in module
quekyj Aug 11, 2023
4a3ccd5
Add readme.md
quekyj Nov 14, 2023
b06554c
Clean up package
quekyj Nov 14, 2023
1b91924
Removed default readme.md
quekyj Nov 14, 2023
e94eb2f
Removed redundance code
quekyj Nov 14, 2023
69dc901
Remove the command entry
quekyj Nov 14, 2023
91f8607
Remove gif
quekyj Nov 14, 2023
1c764a3
Add rohd testbench snippet
quekyj Nov 19, 2023
9ce7dac
Add vscode readme version check to config test
quekyj Dec 14, 2023
35f5100
Merge branch 'main' into vscode-extension
quekyj Dec 14, 2023
8292e58
Check for vscode readme version
quekyj Dec 14, 2023
486b50b
update the message for extension
quekyj Dec 14, 2023
7396baa
Add ROHD-VF testbench
quekyj Dec 14, 2023
01314b9
Add more prefix for Testbench
quekyj Dec 14, 2023
3b5ceca
Fix broken link for ROHD FSM auto complete snippet
quekyj Dec 14, 2023
09e749e
Add comment for sequential & Add output and logic to create module
quekyj Dec 14, 2023
0ccd597
Fix conditional assign
quekyj Dec 14, 2023
93a0462
Clarify on the conditional assignment
quekyj Dec 14, 2023
a286b88
ditch the waitNegEdges Function
quekyj Dec 14, 2023
51f82f9
update build devtool version (#17)
quekyj Mar 12, 2024
89fdef6
Fix version issue in build-devtools
quekyj Mar 13, 2024
72cd948
Merge branch 'main' of https://github.com/quekyj/rohd
quekyj Mar 13, 2024
aa45a45
Merge branch 'intel:main' into main
quekyj Apr 8, 2024
dd15957
Merge branch 'main' into vscode-extension
quekyj Apr 15, 2024
196d1d2
remove example.dart
quekyj Apr 15, 2024
9b99e6e
use new simulation method
quekyj Apr 15, 2024
9e7f23c
Fix markdown lint
quekyj May 8, 2024
bac4fc7
update the config version code
quekyj May 9, 2024
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
9 changes: 9 additions & 0 deletions test/config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,13 @@ void main() async {
deleteTemporaryDump(dumpName);
});
}

test('should update the vscode readme version', () async {
const version = Config.version;

final file = File('vs_code/README.md');
final contents = await file.readAsString();

expect(contents.contains(version), true);
});
}
24 changes: 24 additions & 0 deletions vs_code/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
5 changes: 5 additions & 0 deletions vs_code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
out
dist
node_modules
.vscode-test/
*.vsix
7 changes: 7 additions & 0 deletions vs_code/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
34 changes: 34 additions & 0 deletions vs_code/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
11 changes: 11 additions & 0 deletions vs_code/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions vs_code/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
10 changes: 10 additions & 0 deletions vs_code/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
9 changes: 9 additions & 0 deletions vs_code/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "rohd" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
28 changes: 28 additions & 0 deletions vs_code/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (C) 2021-2023 Intel Corporation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 changes: 30 additions & 0 deletions vs_code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Visual Studio Code ROHD Snippets

This Visual Studio Code extension provides commonly used ROHD framework snippets, facilitating usage of auto-complete features.

## What's ROHD

ROHD (pronounced as "road") is a framework for describing and verifying hardware using the Dart programming language. For more information about ROHD, please visit [https://intel.github.io/rohd-website/](https://intel.github.io/rohd-website).

## Features

Currently, this extension follows the conventions in ROHD [v0.5.3](https://github.com/intel/rohd/releases/tag/v0.5.1). It suggests auto-completions when you start typing the prefixes as shown in the table below:

| Name | Prefix | Description |
| :---: | :---: | :--: |
| ROHD Counter Example | `example` | Generates an ROHD Counter Example |
| Module | `module` or `mod` or `Mod` or `Module` | Creates an ROHD Module Class |
| Sequential Logic | `seq` or `sequential` or `Seq` | Builds an ROHD Sequential Logic |
| Combinational Logic | `comb` | Constructs an ROHD Combinational Logic |
| Simple Assign (<=) | `assign` | Demonstrates an example of the Assignment Operator used outside combinational or sequential contexts |
| Conditional Assign (<) | `assign` | Demonstrates an example of the Assignment Operator used within combinational or sequential contexts |
| If | `if` or `If` | Constructs an 'IF' conditional block for use within sequential or combinational contexts |
| Case | `case` or `Case` | Creates a 'CASE' conditional block for use within sequential or combinational contexts |
| CaseZ | `caseZ` or `CaseZ` | Builds a 'CASEZ' conditional block for use within sequential or combinational contexts |
| Simulation | `sim` or `Simulator` or `simulation` | Templates a signal Simulation |
| Finite State Machine | `fsm` or `FSM` | Creates a Finite State Machine template example for simplified FSM usage |
quekyj marked this conversation as resolved.
Show resolved Hide resolved
| ROHD-VF Testbench | `vf` or `tb` or `testbench` | Creates a ROHD-VF template |

## Reporting Issues

Issues on either ROHD or VSCode snippets should be filed in [https://github.com/intel/rohd/issues](https://github.com/intel/rohd/issues).
Loading
Loading