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

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [uvm/] [tools/] [easier_uvm_gen/] [examples/] [multi_if/] [include/] [serial_do_mon.sv] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 vladimirar
task serial_monitor::do_mon;
2
  fork
3
    forever @(posedge vif.clk)
4
    begin
5
      serial_tx tx;
6
      tx = serial_tx::type_id::create("tx");
7
      while (vif.data_in == 0)
8
        @(posedge vif.clk);
9
      tx.dir = serial_tx::IN;
10
      for (int i = 7; i >= 0 ; i--)
11
      begin
12
        tx.data[i] = vif.data_in;
13
        @(posedge vif.clk);
14
      end
15
      analysis_port.write(tx);
16
    end
17
 
18
    forever @(posedge vif.clk)
19
    begin
20
      serial_tx tx;
21
      tx = serial_tx::type_id::create("tx");
22
      while (vif.data_out == 0)
23
        @(posedge vif.clk);
24
      tx.dir = serial_tx::OUT;
25
      for (int i = 7; i >= 0 ; i--)
26
      begin
27
        tx.data[i] = vif.data_out;
28
        @(posedge vif.clk);
29
      end
30
      analysis_port.write(tx);
31
    end
32
  join
33
endtask

powered by: WebSVN 2.1.0

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