1//
2// Copyright (c) 2010-2024 Antmicro
3//
4// This file is licensed under the MIT License.
5// Full license text is available in 'licenses/MIT.txt'.
6//
7
8interface renode_apb3_if #(
9    int unsigned AddressWidth = 20,
10    int unsigned DataWidth = 32
11) (
12    input logic pclk
13);
14  typedef logic [AddressWidth-1:0] address_t;
15  typedef logic [DataWidth-1:0] data_t;
16
17  logic     presetn;
18  address_t paddr;
19  logic     pselx;
20  logic     penable;
21  logic     pwrite;
22  data_t    pwdata;
23  logic     pready;  // Optional for outputs, mandatory for inputs
24  data_t    prdata;
25  logic     pslverr;  // Optional for outputs, mandatory for inputs
26
27  initial begin
28    assert (DataWidth == 8 || DataWidth == 16 || DataWidth == 24 || DataWidth == 32)
29    else begin
30      $error("APB DataWidth shall be {8,16,24,32} bits");
31    end
32  end
33
34endinterface
35
36