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

Subversion Repositories t6507lp

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

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 212 creep
                var last_X : byte;
27
                var last_Y : byte;
28 206 creep
                gen data;
29
 
30
                --print mem[i];
31
                --keep data.data_in == mem[i].as_a(byte);
32
                while (reset_needed) {
33
                        gen data;
34
 
35
                        if (data.reset_n == 0) {
36
                                reset_needed = FALSE;
37
                        };
38
                };
39
 
40
        --      if (data.test_kind == REGULAR) {
41
        --              emit data.T1_cover_event;
42
        --              alu_opcode$ = data.alu_opcode.as_a(byte);
43
        --      }
44
        --      else {
45
        --              emit data.T2_cover_event;
46
        --              alu_opcode$ = data.rand_op;
47
        --      };
48
 
49
                reset_n$    = data.reset_n;
50
                alu_result$ = data.alu_result;
51
                alu_status$ = data.alu_status;
52
                --data_in$    = data.data_in;
53
                data_in$    = mem[i].as_a(byte);
54
                data.data_in = mem[i].as_a(byte);
55
                --data_in$    = 8'hF8;
56 212 creep
                --print me.agent.chk.old_state;
57
                --if (me.agent.chk.old_state == CYCLE_1) {
58
                --      last_X = data.alu_x;
59
                --      last_Y = data.alu_y;
60
                --};
61
                --alu_x$      = last_X;
62
                --alu_y$      = last_Y;
63
                alu_x$ = data.alu_x;
64
                alu_y$ = data.alu_y;
65 206 creep
 
66
                if (data.reset_n == 1) {
67
                        i = i + 1;
68
                }
69
                else {
70
                        i = 0;
71
                };
72
 
73
                agent.chk.store(data);
74
                emit done;
75
        };
76
};
77
'>

powered by: WebSVN 2.1.0

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