diff --git a/srdl2sv/components/widgets/srdl2sv_amba3ahblite.sv b/srdl2sv/components/widgets/srdl2sv_amba3ahblite.sv index e937e27..47bff9f 100644 --- a/srdl2sv/components/widgets/srdl2sv_amba3ahblite.sv +++ b/srdl2sv/components/widgets/srdl2sv_amba3ahblite.sv @@ -100,7 +100,7 @@ module srdl2sv_amba3ahblite logic [31:0] addr_q; OP_t operation_q; - wire addr_err = (HADDR % HSIZE) != 0; + wire addr_err = (HADDR[2:0] % HSIZE) != 3'b0; always_ff @ (posedge HCLK) begin diff --git a/srdl2sv/components/widgets/srdl2sv_if_pkg.sv b/srdl2sv/components/widgets/srdl2sv_if_pkg.sv index afa1bf7..0b80d0a 100644 --- a/srdl2sv/components/widgets/srdl2sv_if_pkg.sv +++ b/srdl2sv/components/widgets/srdl2sv_if_pkg.sv @@ -1,6 +1,6 @@ package srdl2sv_if_pkg; -typedef struct { +typedef struct packed { // .Verilator does not support unpacked structs in packages logic [31:0] addr; logic [31:0] data; logic w_vld; @@ -8,7 +8,7 @@ typedef struct { logic [ 3:0] byte_en; } b2r_t; -typedef struct { +typedef struct packed { // .Verilator does not support unpacked structs in packages logic [31:0] data; logic rdy; logic err;