CAPI=2:
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: "pulp:riscv:debug_module"
description: "RISC-V Debug Module"

filesets:
  files_src:
    depend:
      - lowrisc:prim:fifo
      - lowrisc:prim:clock_inv
    files:
      - vendor/pulp_riscv_dbg/debug_rom/debug_rom.sv
      - vendor/pulp_riscv_dbg/debug_rom/debug_rom_one_scratch.sv
      - vendor/pulp_riscv_dbg/src/dm_pkg.sv
      - vendor/pulp_riscv_dbg/src/dm_sba.sv
      - vendor/pulp_riscv_dbg/src/dm_csrs.sv
      - vendor/pulp_riscv_dbg/src/dm_mem.sv
      - vendor/pulp_riscv_dbg/src/dmi_cdc.sv
      - vendor/pulp_riscv_dbg/src/dmi_jtag.sv
    file_type: systemVerilogSource

  files_vivado:
    files:
      - vendor/pulp_riscv_dbg/src/dmi_bscane_tap.sv
    file_type: systemVerilogSource

  files_verilator:
    depend:
      # common waivers
      - lowrisc:lint:common
    files:
      - vendor/pulp_riscv_dbg/src/dmi_jtag_tap.sv
    file_type: systemVerilogSource

targets:
  default:
    filesets:
      - files_src
      - tool_verilator ? (files_verilator)
      - tool_vivado ? (files_vivado)
