Skip to content

Commit

Permalink
misc: cleanup vscode files
Browse files Browse the repository at this point in the history
  • Loading branch information
NikLeberg committed Jan 1, 2024
1 parent 80faa2d commit 07820d5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 55 deletions.
8 changes: 5 additions & 3 deletions .devcontainer/.env
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ export -f questa_bash
# Quartus tool(s), analysis & synthesis of HDL for Intel FPGAs.
# Note: Uses bash hook "not_found" to check for quartus* commands and executes
# these inside the container.
# Note: The '--volume=/dev:/dev' and '--privileged' are to have access to
# USB/JTAG devices and allow to program FPGAs.
function command_not_found_handle () {
if [[ $1 =~ ^quartus.*$ ]]; then
quartus_args="--hostname quartus --entrypoint $1 $(get_common_args)"
quartus_args="--hostname quartus --volume=/dev:/dev --privileged --entrypoint $1 $(get_common_args)"
shift
docker run $quartus_args ghcr.io/nikleberg/quartus $*
return
Expand All @@ -61,12 +63,12 @@ function command_not_found_handle () {
}
export -f command_not_found_handle
function quartus_make () {
quartus_args="--hostname quartus --entrypoint make $(get_common_args)"
quartus_args="--hostname quartus --volume=/dev:/dev --privileged --entrypoint make $(get_common_args)"
docker run $quartus_args ghcr.io/nikleberg/quartus $*
}
export -f quartus_make
function quartus_bash () {
quartus_args="--hostname quartus --entrypoint bash $(get_common_args)"
quartus_args="--hostname quartus --volume=/dev:/dev --privileged --entrypoint bash $(get_common_args)"
docker run $quartus_args ghcr.io/nikleberg/quartus $*
}
export -f quartus_bash
Expand Down
6 changes: 0 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
"runArgs": [
// set a human friendly machine name for the container
"--hostname=${localWorkspaceFolderBasename}",
// forward the WSLg display
"--env=DISPLAY=:0",
"--volume=/tmp/.X11-unix/:/tmp/.X11-unix/",
// get access to USB/JTAG devices (requires priviledged for hot-plug)
"--volume=/dev:/dev",
"--privileged",
// forward docker socket to allow Docker-outside-of-Docker (DooD)
"--volume=/var/run/docker.sock:/var/run/docker.sock",
// Install a script with aliases for DooD based tools / commands.
Expand Down
59 changes: 13 additions & 46 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,84 +93,58 @@
],
"options": {
"env": {
"BASH_ENV": "${workspaceFolder}/.devcontainer/.env"
"BASH_ENV": "${workspaceFolder}/.devcontainer/.env",
"SIM_TOOL": "oss"
},
"cwd": "${workspaceFolder}/build"
},
"tasks": [
{
"label": "sim-compile",
"command": "vsim -c -do ../scripts/sim_compile.tcl",
"options": {
"cwd": "${workspaceFolder}/sim"
},
"command": "make $SIM_TOOL",
"dependsOn": [
"sw-install-sim"
]
},
{
"label": "sim-test",
"command": "vsim -c -do ../scripts/sim_test.tcl",
"options": {
"cwd": "${workspaceFolder}/sim"
},
"command": "make $SIM_TOOL test",
"dependsOn": [
"sim-compile"
"sw-install-sim"
]
},
{
"label": "sim-open",
// Gui Mode (no -c flag)
"command": "vsim -debugdb -voptargs=+acc=rn+*. -do ../scripts/sim_open.tcl ${fileBasenameNoExtension}",
"options": {
"cwd": "${workspaceFolder}/sim"
},
"dependsOn": "sim-compile"
},
{
"label": "quartus-project",
"command": "quartus_sh -t ../scripts/quartus_project.tcl",
"options": {
"cwd": "${workspaceFolder}/quartus"
}
"command": "make $SIM_TOOL work.${fileBasenameNoExtension} sim",
},
{
"label": "quartus-compile",
"command": "quartus_sh -t ../scripts/quartus_compile.tcl",
"options": {
"cwd": "${workspaceFolder}/quartus"
},
"command": "make quartus synth",
"dependsOn": [
"quartus-project",
"sw-install"
]
},
{
"label": "quartus-open",
"command": "quartus_sh -t ../scripts/quartus_open.tcl",
"options": {
"cwd": "${workspaceFolder}/quartus"
},
"dependsOn": [
"quartus-project"
]
"command": "make quartus open",
},
{
"label": "quartus-program",
"command": "quartus_pgm -c USB-Blaster --mode jtag --operation='p;top.sof'",
"options": {
"cwd": "${workspaceFolder}/quartus/output_files"
"cwd": "${workspaceFolder}/build/output_files"
}
},
{
"label": "quartus-flash",
"command": "quartus_cpf -c ../../scripts/quartus_flash.cof; quartus_pgm ../../scripts/quartus_flash.cdf",
"command": "quartus_cpf -c ../../scripts/quartus/quartus_flash.cof; quartus_pgm ../../scripts/quartus/quartus_flash.cdf",
"options": {
"cwd": "${workspaceFolder}/quartus/output_files",
"cwd": "${workspaceFolder}/build/output_files",
}
},
{
"label": "clean",
"command": "rm -rf quartus/* sim/* && touch quartus/.gitkeep && touch sim/.gitkeep",
"command": "make clean",
"presentation": {
"reveal": "silent"
},
Expand Down Expand Up @@ -219,13 +193,6 @@
"cwd": "${workspaceFolder}/sw"
}
},
{
"label": "sw-env",
"command": "bash -l",
"options": {
"cwd": "${workspaceFolder}/sw"
}
},
{
"label": "submodule update",
"command": "git submodule update --remote",
Expand Down

0 comments on commit 07820d5

Please sign in to comment.