OpenCores
URL https://opencores.org/ocsvn/socgen/socgen/trunk

Subversion Repositories socgen

[/] [socgen/] [trunk/] [common/] [opencores.org/] [Testbench/] [bfms/] [ps2_host/] [rtl/] [verilog/] [tasks] - Blame information for rev 134

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 134 jt_eaton
task automatic next;
2
  input [31:0] num;
3
  repeat (num)       @ (posedge clk);
4
endtask
5
 
6
 
7
task clear_rx_host;
8
 begin
9
 rx_clr               <= 1'b1;
10
 next(1);
11
 rx_clr               <= 1'b0;
12
 end
13
endtask
14
 
15
 
16
 
17
 
18
task send_byte;
19
  input [7:0] byte_out;
20
   begin
21
   $display("%t %m %2h",$realtime ,byte_out  );
22
   tx_data  <= byte_out;
23
   next(1);
24
   tx_write   <= 1'b1;
25
   next(1);
26
   tx_write   <= 1'b0;
27
   next(1);
28
   while(busy)   next(1);
29
   mask_tx_ack_err <= 1'b1;
30
   next(1);
31
   mask_tx_ack_err <= 1'b0;
32
   end
33
endtask // send_byte
34
 
35
 
36
 
37
 
38
 
39
task rcv_byte;
40
  input [7:0] byte_in;
41
   begin
42
   exp_rcv_byte  <= byte_in;
43
 
44
   while(!rx_read)  next(1);
45
   $display("%t           checking    %h",$realtime,byte_in);
46
   mask_rcv_byte <= 8'hff;
47
   next(1);
48
   mask_rcv_byte <= 8'h00;
49
end
50
endtask
51
 
52
 
53
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.