Skip to content

Commit

Permalink
VUnit, OSVVM, linter interface support
Browse files Browse the repository at this point in the history
  • Loading branch information
qarlosalberto committed Jan 11, 2023
1 parent 9adb105 commit ca9bb1e
Show file tree
Hide file tree
Showing 42 changed files with 4,474 additions and 184 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ jobs:
- name: Prepare colibri2
run: |
git clone https://github.com/TerosTechnology/colibri2.git -b main
cd colibri2
cd ..
git clone https://github.com/TerosTechnology/colibri.git -b main
cd colibri
npm install
cp -R out ../node_modules/teroshdl2/
./copy.sh
cd ..
rm -rf colibri2
rm -rf colibri
- name: Build
id: build
Expand All @@ -63,7 +64,7 @@ jobs:
# npm run-script generate-examples
# # cd node_modules/teroshdl; npm install; cd ../../
# npm install
# cd node_modules/teroshdl2; npm install; cd ../../
# cd node_modules/teroshdl; npm install; cd ../../
vsce package --allow-star-activation
file=`ls *.vsix`
echo ${{ env.version }}
Expand Down
125 changes: 125 additions & 0 deletions auto_package/command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
################################################################################
# Others
################################################################################

- name: go_to_parent
title: Go to parent file

- name: open
title: Open file with TerosHDL

################################################################################
# Project manager
################################################################################

## Project
- name: view.project.add
title: "Add project"
icon: add
where: ["view/title"]
when: "view == teroshdl-project"

- name: view.project.delete
title: "Delete project"
icon: chrome-close
where: ["view/item/context"]
when: "viewItem == project"
group: "inline"

## Source
- name: view.source.add
title: "Add"
icon: add
where: ["view/title"]
when: "view == teroshdl-view-source"

- name: view.source.add_source_to_library
title: "Add to library"
icon: add
where: ["view/item/context"]
when: "viewItem == library"
group: "inline"

- name: view.source.delete_library
title: "Delete library"
icon: dash
where: ["view/item/context"]
when: "viewItem == library"
group: "inline"

- name: view.source.delete_source
title: "Delete source"
icon: dash
where: ["view/item/context"]
when: "viewItem == source"
group: "inline"

- name: view.source.select_toplevel
title: "Select source as toplevel"
icon: check
where: ["view/item/context"]
when: "viewItem == source"
group: "inline"

## Runs
- name: view.runs.run_all
title: "Run all"
icon: run-all
where: ["view/title"]
when: "view == teroshdl-view-runs"

- name: view.runs.refresh
title: "Refresh"
icon: refresh
where: ["view/title"]
when: "view == teroshdl-view-runs"

- name: view.runs.run
title: "Run"
icon: run
where: ["view/item/context"]
when: "viewItem == run"
group: "inline"

## Watcher
- name: view.watcher.add
title: "Add"
icon: add
where: ["view/title"]
when: "view == teroshdl-view-watcher"

- name: view.watcher.delete
title: "Delete watcher"
icon: dash
where: ["view/item/context"]
when: "viewItem == watcher"
group: "inline"

################################################################################
# Editor
################################################################################
- name: generate_template
title: "TerosHDL: Generate template"
icon: file-code
where: ["editor/title"]

- name: state_machine.viewer
title: State machine viewer
icon: state-machine
where: ["editor/title"]

- name: netlist.viewer
title: Netlist viewer
icon: list-tree
where: ["editor/title"]

- name: format
title: Format
icon: check
where: ["editor/title"]

- name: documentation.module
title: Module documentation preview
icon: book
where: ["editor/title"]

30 changes: 30 additions & 0 deletions auto_package/generate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import json
import os

import jinja2
import yaml

command_path = os.path.join(os.path.dirname(__file__), "command.yml")
with open(command_path, encoding="UTF-8") as file:
command_list = yaml.load(file, Loader=yaml.FullLoader)

language_path = os.path.join(os.path.dirname(__file__), "language.yml")
with open(language_path, encoding="UTF-8") as file:
language_list = yaml.load(file, Loader=yaml.FullLoader)

script_path = os.path.join(os.path.dirname(__file__), "script.yml")
with open(script_path, encoding="UTF-8") as file:
script_list = yaml.load(file, Loader=yaml.FullLoader)

template_path = os.path.join(os.path.dirname(__file__), "templates", "package.nj")
with open(template_path, encoding="UTF-8") as file:
template_str = file.read()
template = (
jinja2.Environment(loader=jinja2.FileSystemLoader("./templates"))
.from_string(template_str)
.render(command_list=command_list, language_list=language_list, script_list=script_list)
)

output_path = os.path.join(os.path.dirname(__file__), "..", "package.json")
with open(output_path, mode="w", encoding="UTF-8") as file:
file.write(template)
49 changes: 49 additions & 0 deletions auto_package/language.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- id: "vhdl"
extensions: [".vhd", ".vho", ".vhdl", ".vhd"]
configuration: "./configs/vhdl.configuration.json"
snippets: "./snippets/vhdl/vhdl.json"
aliases: ["VHDL", "vhdl"]

- id: "verilog"
extensions: [".v", ".vh", ".vl"]
configuration: "./configs/verilog.configuration.json"
snippets: "./snippets/verilog/verilog.json"
aliases: ["Verilog", "verilog"]

- id: "systemverilog"
extensions: [".sv", ".svh", ".SV"]
configuration: "./configs/systemverilog.configuration.json"
snippets: "./snippets/systemverilog/systemverilog.json"
aliases: ["System Verilog", "systemverilog"]

- id: "vcd"
extensions: [".vcd"]

- id: "gtkw_waveconfig"
extensions: [".gtkw"]

- id: "gtkw_wavebin"
extensions: [".fst", ".ghw"]

- id: "tcl"
extensions: [".tcl", ".pro"]
configuration: "./configs/tcl.configuration.json"
snippets: "./snippets/tcl/tcl.json"
aliases: ["TCL", "tcl"]

- id: "ucf"
extensions: [".ucf"]
configuration: "./configs/ucfconstraints.configuration.json"
aliases: ["vivado ucf", "ucf constraints"]

- id: "xdc"
extensions: [".xdc", ".sdc"]
configuration: "./configs/xdcconstraints.configuration.json"
snippets: "./snippets/xdc/xdc.json"
aliases: ["vivado xdc", "xdc constraints"]

- id: "ldc"
extensions: [".ldc", ".pdc"]
configuration: "./configs/xdcconstraints.configuration.json"
snippets: "./snippets/xdc/xdc.json"
aliases: ["lattice constraints"]
Loading

0 comments on commit ca9bb1e

Please # to comment.