blob: 954253a1abe095fbc9462d2fd0e721b99aadb91d [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
// Abstract primitives wrapper.
//
// This file is a stop-gap until the DV file list is generated by FuseSoC.
// Its contents are taken from the file which would be generated by FuseSoC.
// https://github.com/lowRISC/ibex/issues/893
package lowrisc_prim_pkg;
// Implementation target specialization
typedef enum integer {
ImplGeneric,
ImplXilinx
} impl_e;
endpackage : lowrisc_prim_pkg
`ifndef LOWRISC_PRIM_DEFAULT_IMPL
`define LOWRISC_PRIM_DEFAULT_IMPL lowrisc_prim_pkg::ImplGeneric
`endif
module lowrisc_prim_clock_gating (
input clk_i,
input en_i,
input test_en_i,
output logic clk_o
);
parameter lowrisc_prim_pkg::impl_e Impl = `LOWRISC_PRIM_DEFAULT_IMPL;
if (Impl == lowrisc_prim_pkg::ImplGeneric) begin : gen_generic
lowrisc_prim_generic_clock_gating u_impl_generic (
.*
);
end else if (Impl == lowrisc_prim_pkg::ImplXilinx) begin : gen_xilinx
lowrisc_prim_xilinx_clock_gating u_impl_xilinx (
.*
);
end else begin : gen_failure
// TODO: Find code that works across tools and causes a compile failure
end
endmodule