Guest User

Untitled

a guest
Feb 15th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. //module: sat_counter_8bit
  2. //developed by: Raju Pusapati
  3.  
  4. module sat_counter_8bit(
  5. clk,
  6. count);
  7.  
  8. input clk;
  9. output wire [7:0] count;
  10.  
  11. reg [7:0] c = 8'b0;
  12. parameter sat = 8'b11111111;
  13.  
  14.  
  15. always @(posedge clk) begin
  16.  
  17. if (c != sat) begin
  18. c <= c+1'b1;
  19. end
  20.  
  21. end
  22.  
  23. assign count = c;
  24.  
  25. endmodule
Add Comment
Please, Sign In to add comment