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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [fv/] [fsm_bfm.e] - Blame information for rev 206

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 206 creep
<'
2
import fsm_components.e;
3
 
4
unit fsm_bfm_u {
5
        reset_n    : out simple_port of bit;
6
        alu_result : out simple_port of byte;
7
        alu_status : out simple_port of byte;
8
        data_in    : out simple_port of byte;
9
        alu_x      : out simple_port of byte;
10
        alu_y      : out simple_port of byte;
11
 
12
        reset_needed : bool;
13
        keep reset_needed == TRUE;
14
 
15
        event done;
16
        event main_clk;
17
 
18
        mem : list of valid_opcodes;
19
        keep mem.size() == 8192;
20
 
21
        !i : uint(bits:13);
22
        keep i == 0;
23
 
24
        on main_clk {
25
                var data : fsm_input_s;
26
                gen data;
27
 
28
                --print mem[i];
29
                --keep data.data_in == mem[i].as_a(byte);
30
                while (reset_needed) {
31
                        gen data;
32
 
33
                        if (data.reset_n == 0) {
34
                                reset_needed = FALSE;
35
                        };
36
                };
37
 
38
        --      if (data.test_kind == REGULAR) {
39
        --              emit data.T1_cover_event;
40
        --              alu_opcode$ = data.alu_opcode.as_a(byte);
41
        --      }
42
        --      else {
43
        --              emit data.T2_cover_event;
44
        --              alu_opcode$ = data.rand_op;
45
        --      };
46
 
47
                reset_n$    = data.reset_n;
48
                alu_result$ = data.alu_result;
49
                alu_status$ = data.alu_status;
50
                --data_in$    = data.data_in;
51
                data_in$    = mem[i].as_a(byte);
52
                data.data_in = mem[i].as_a(byte);
53
                --data_in$    = 8'hF8;
54
                alu_x$      = data.alu_x;
55
                alu_y$      = data.alu_y;
56
 
57
                if (data.reset_n == 1) {
58
                        i = i + 1;
59
                }
60
                else {
61
                        i = 0;
62
                };
63
 
64
                agent.chk.store(data);
65
                emit done;
66
        };
67
};
68
'>

powered by: WebSVN 2.1.0

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