Skip to content

Instantly share code, notes, and snippets.

@rlingineni
Created September 28, 2017 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlingineni/065fba445de9d01693a0261ef9113159 to your computer and use it in GitHub Desktop.
Save rlingineni/065fba445de9d01693a0261ef9113159 to your computer and use it in GitHub Desktop.
module testMul3 ;
reg [7:0] in ;
reg error ;
wire out ;
Multiple_of_3 dut(in, out) ;
initial begin
in = 0 ; error = 0 ;
repeat(256) begin
#100
// $display("%d %b",in,out) ;
if(out != ((in %3) == 0)) begin
$display("ERROR %d -> %b",in,out) ;
error = 1 ;
end
in = in + 1 ;
end
if(error == 0) $display("PASS") ;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment