// DESCRIPTION: Verilator: Casting queues and dynamic arrays // into queues as function arguments // // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2025 by Wilson Snyder. // SPDX-License-Identifier: CC0-1.0 `define stop $stop() `define checkh(gotv,expv) do if ((gotv) !== (expv)) begin \ $write("%%Error: %s:%0d: got=%0x exp=%0x (%s !== %s)\n", \ `__FILE__,`__LINE__, (gotv), (expv), `"gotv`", `"expv`"); \ `stop; end while(0); `define checks(gotv,expv) do if ((gotv) != (expv)) begin \ $write("%%Error: %s:%0d: got='%s' exp='%s'\n", \ `__FILE__,`__LINE__, (gotv), (expv)); `stop; end while(0); class check #(parameter WIDTH=8); static function automatic void check_array (int n, logic [WIDTH-1:0] array []); for (int r=0; r