Advertisement
AlexanderAntonov

Untitled

Oct 17th, 2022
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // fifo control logic
  2. // register for read and write pointers
  3. always @(posedge clk)
  4. if (reset)
  5.     begin
  6.     w_ptr_reg <= 0;
  7.     r_ptr_reg <= 0;
  8.     full_reg <= 1'b0;
  9.     empty_reg <= 1'b1;
  10.     end
  11. else
  12.     begin
  13.     w_ptr_reg <= w_ptr_next;
  14.     r_ptr_reg <= r_ptr_next;
  15.     full_reg <= full_next;
  16.     empty_reg <= empty_next;
  17.     end
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement