Advertisement
natsfr

verilog example

Jan 23rd, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input wire signal;
  2.  
  3. reg [31:0]a = 0;
  4.  
  5. assign count = ^a;
  6.  
  7. always @(posedge clk)
  8. begin
  9.     a <= {a[30:0], signal};
  10. end
  11.  
  12. vs
  13.  
  14. always @(posedge clk)
  15. begin
  16.     a <= {a[30:0], signal};
  17.     count <= (^a[30:0])^signal;
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement