Advertisement
Guest User

Untitled

a guest
Jul 26th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     task uputc;
  2.         input [7:0] data;
  3.         begin
  4.             tx_data <= data;
  5.             while (fifo_full)
  6.                 @ (posedge sys_clock);
  7.             fifo_wr <= 1;
  8.             @ (posedge sys_clock);
  9.             fifo_wr <= 0;
  10.             @ (posedge sys_clock);
  11.         end
  12.     endtask : uputc
  13.  
  14.     task ugetc;
  15.         @ (posedge sys_clock);
  16.         while (fifo_empty)
  17.             @ (posedge sys_clock);
  18.         fifo_rd <= 1;
  19.         @ (posedge sys_clock);
  20.         fifo_rd <= 0;
  21.         @ (posedge sys_clock);
  22.     endtask : ugetc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement