Skip to content

Commit 6bec330

Browse files
committed
Propagate AddrWidth parameter from top-level.
1 parent 8182a85 commit 6bec330

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/apb_uart_wrap.sv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// A UART with APB struct ports.
1111
module apb_uart_wrap #(
12+
parameter int unsigned AddrWidth = 32,
1213
parameter type apb_req_t = logic,
1314
parameter type apb_rsp_t = logic
1415
) (
@@ -34,7 +35,7 @@ module apb_uart_wrap #(
3435
);
3536

3637
localparam obi_pkg::obi_cfg_t ObiCfg = obi_pkg::obi_default_cfg(
37-
$bits(apb_req_i.paddr),
38+
AddrWidth,
3839
32,
3940
1,
4041
obi_pkg::ObiMinimalOptionalConfig

src/reg_uart_wrap.sv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module reg_uart_wrap #(
5454
);
5555

5656
apb_uart_wrap #(
57+
.AddrWidth ( AddrWidth ),
5758
.apb_req_t ( apb_req_t ),
5859
.apb_rsp_t ( apb_resp_t )
5960
) i_apb_uart_wrap (

0 commit comments

Comments
 (0)