Guest User

Untitled

a guest
Aug 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. reg [3:0] ssl_cnt;  // clock divider counter
  2.  
  3. always @ (posedge sck)
  4.   begin
  5.     if (count==4'b1110)  // divide by 14
  6.        count <= 4'b0000;  // reset to 0
  7.     else count <= count+1;  // increment counter
  8.     ssl  <=  (count == 4'b0000);  // counter decoded, single cycle pulse is generated
  9.   end
Add Comment
Please, Sign In to add comment