// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
    name: "lowrisc_ip",
    target_dir: "lowrisc_ip",

    upstream: {
        url: "https://github.com/lowRISC/opentitan"
        rev: "master"
    }

    mapping: [
        {from: "hw/dv/sv/common_ifs",    to: "dv/sv/common_ifs"},
        {from: "hw/dv/sv/csr_utils",     to: "dv/sv/csr_utils"},
        {from: "hw/dv/sv/dv_base_reg",   to: "dv/sv/dv_base_reg"},
        {from: "hw/dv/sv/mem_model",     to: "dv/sv/mem_model"},
        {from: "hw/dv/sv/mem_bkdr_util", to: "dv/sv/mem_bkdr_util"},
        {from: "hw/dv/sv/str_utils",     to: "dv/sv/str_utils"},

        // We apply a patch to fix the bus_params_pkg core file name when
        // vendoring in dv_lib and dv_utils. This allows us to have an
        // Ibex-specific core file for these defines.
        {
            from:      "hw/dv/sv/dv_lib",
            to:        "dv/sv/dv_lib",
            patch_dir: "dv_lib",
        },
        {
            from:      "hw/dv/sv/dv_utils",
            to:        "dv/sv/dv_utils",
            patch_dir: "dv_utils",
        },
        {
            from:      "hw/dv/sv/push_pull_agent",
            to:        "dv/sv/push_pull_agent",
            patch_dir: "push_pull_agent",
        },
        // We have to apply a patch to the vendored files from hw/dv/tools
        // because they contain OpenTitan specific paths.
        {
            from:      "hw/dv/tools",
            to:        "dv/tools",
            patch_dir: "dv_tools"
        },

        {from: "hw/dv/verilator",    to: "dv/verilator"},

        {from: "hw/ip/prim",         to: "ip/prim"},
        {from: "hw/ip/prim_generic", to: "ip/prim_generic"},
        {from: "hw/ip/prim_xilinx",  to: "ip/prim_xilinx"},

        {from: "hw/lint",            to: "lint"},

        {from: "util/dvsim",         to: "util/dvsim"},
        {from: "util/uvmdvgen",      to: "util/uvmdvgen"},
    ]

    patch_dir: "patches/lowrisc_ip"
}
