chore: add timer if into a single file

This commit is contained in:
maksyuki committed 2025-10-10 15:05:13 +08:00
1 parent 73b7f30c92
commit a5f66a35ba
3 files changed
+20 -15

No files matched your search

+1 -6
View File
@@ -8,12 +8,7 @@
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. // MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details. // See the Mulan PSL v2 for more details.
`include "register.sv" `include "tmr_define.svh"
`include "clk_int_div.sv"
`include "cdc_sync.sv"
`include "counter.sv"
`include "edge_det.sv"
`include "tmr_define.sv"
module apb4_tmr ( module apb4_tmr (
apb4_if.slave apb4, apb4_if.slave apb4,
-9
View File
@@ -70,13 +70,4 @@
`define TMR_ETM_LOAD 3'b100 `define TMR_ETM_LOAD 3'b100
// verilog_format: on // verilog_format: on
interface tmr_if (
input logic exclk_i
);
logic capch_i;
logic irq_o;
modport dut(input exclk_i, input capch_i, output irq_o);
modport tb(input exclk_i, output capch_i, input irq_o);
endinterface
`endif `endif
+19
View File
@@ -0,0 +1,19 @@
// Copyright (c) 2023-2024 Miao Yuchi <miaoyuchi@ict.ac.cn>
// tmr is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
// See the Mulan PSL v2 for more details.
interface tmr_if (
input logic exclk_i
);
logic capch_i;
logic irq_o;
modport dut(input exclk_i, input capch_i, output irq_o);
modport tb(input exclk_i, output capch_i, input irq_o);
endinterface