// This module generates M pairs of N-1 bits unsigned numbers A, B // and also serialises them starting from LSB bits between // activation of active-high reset signal module stimulus #(parameter N = 4, M = 10) (input clk, output reg reset, output reg sa, sb, output reg unsigned [N-1:0] A, B ); parameter D = 5; int unsigned i; reg unsigned [N-1:0] r1, r2; initial begin repeat(M) begin r1 = {$random} % N; r2 = {$random} % N; do_items(r1, r2); end end task do_items (input unsigned [N-1:0] v1, v2); begin A = 0; B = 0; reset = 0; do_reset(); A = v1; B = v2; for (i=0; i