Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module test (
  2.     input wire [15:0] pattern//,
  3.     //output reg [2:0] match
  4. );
  5.  
  6.     always @ (*) begin
  7.         casez (pattern)
  8.             16'h000? :  $display("Matched on 000? for %h", pattern);
  9.             16'h00?? :  $display("Matched on 00?? for %h", pattern);
  10.             16'h0??? :  $display("Matched on 0??? for %h", pattern);
  11.             16'h???? :  $display("Matched on ???? for %h", pattern);
  12.             default :   $display("Did not match patterns");
  13.         endcase
  14.     end
  15.  
  16.    
  17.  
  18. endmodule : test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement