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

Subversion Repositories t6507lp

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

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
                while (reset_needed) {
31
                        gen data;
32
 
33
                        if (data.reset_n == 0) {
34
                                reset_needed = FALSE;
35
                        };
36
                };
37
 
38
                reset_n$    = data.reset_n;
39
                alu_result$ = data.alu_result;
40
                alu_status$ = data.alu_status;
41
                data_in$    = mem[i].as_a(byte);
42
                data.data_in = mem[i].as_a(byte);
43 212 creep
                alu_x$ = data.alu_x;
44
                alu_y$ = data.alu_y;
45 206 creep
 
46
                if (data.reset_n == 1) {
47
                        i = i + 1;
48
                }
49
                else {
50
                        i = 0;
51
                };
52
 
53
                agent.chk.store(data);
54
                emit done;
55
        };
56
};
57
'>

powered by: WebSVN 2.1.0

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