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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [fv/] [alu_bfm.e] - Blame information for rev 241

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

Line No. Rev Author Line
1 123 creep
<'
2 124 creep
import alu_components.e;
3
 
4 123 creep
unit alu_bfm_u {
5 129 creep
        reset_n: out simple_port of bool;
6 124 creep
        alu_enable: out simple_port of bool;
7
        alu_opcode: out simple_port of byte;
8 129 creep
        alu_a: out simple_port of byte;
9 143 creep
 
10
        reset_needed : bool;
11
        keep reset_needed == TRUE;
12 182 creep
 
13 134 creep
        event done;
14 129 creep
        event main_clk;
15
 
16
        on main_clk {
17
                //Send in packet using the DUT protocol
18
                var data : alu_input_s;
19
                gen data;
20
 
21 143 creep
                while (reset_needed) {
22
                        gen data;
23
 
24
                        if (data.input_kind == RESET) {
25
                                reset_needed = FALSE;
26
                        };
27
                };
28 129 creep
 
29 182 creep
                if (data.test_kind == REGULAR) {
30
                        emit data.T1_cover_event;
31 185 creep
                        alu_opcode$ = data.alu_opcode.as_a(byte);
32 182 creep
                }
33
                else {
34
                        emit data.T2_cover_event;
35 185 creep
                        alu_opcode$ = data.rand_op;
36
                };
37 182 creep
 
38 185 creep
 
39
 
40 129 creep
                reset_n$ = data.reset_n;
41
                alu_enable$ = data.alu_enable;
42 131 creep
                alu_a$ = data.alu_a;
43 129 creep
 
44 131 creep
                agent.chk.store(data);
45 134 creep
                emit done;
46 129 creep
        };
47
 
48 123 creep
};
49
'>

powered by: WebSVN 2.1.0

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