ISP/FPGA.nix

51 lines
872 B
Nix

{ config, pkgs, ... }: {
# Add packages to the dev environment
packages = with pkgs; [
# FPGA
verilator
systemc
verilog
verible
svls
zlib
# C/C++
xmake
gnumake
cmake
ninja
gcc
neocmakelsp
clang-tools
# Libraries
spdlog
];
# Enable languages support
# languages.cplusplus.enable = true;
languages.python = {
enable = true;
version = "3.11.8";
venv.enable = true;
venv.requirements = ''
teroshdl
cocotb
'';
};
# When enter shell, exec ...
enterShell = ''
export SYSTEMC_INCLUDE="${pkgs.systemc}/include"
export SYSTEMC_LIBDIR="${pkgs.systemc}/lib"
export VERILATOR_INCLUDE="${pkgs.verilator}/share/verilator/include"
alias gtkwave="GDK_BACKEND=x11 gtkwave"
echo
verilator --version
echo
gcc --version
'';
}