Line 1... |
Line 1... |
alu_input.e
|
alu_input.e
|
<'
|
<'
|
import alu_components.e;
|
import alu_components.e;
|
type alu_input_t: [ENABLED_VALID, DISABLED_VALID, RESET];
|
type alu_input_t: [ENABLED_VALID, DISABLED_VALID, RESET, ENABLED_RAND, DISABLED_RAND];
|
|
type alu_test_type: [REGULAR, RAND];
|
|
|
struct alu_input_s {
|
struct alu_input_s {
|
input_kind : alu_input_t;
|
input_kind : alu_input_t;
|
|
test_kind : alu_test_type;
|
reset_n: bool;
|
reset_n: bool;
|
alu_enable: bool;
|
alu_enable: bool;
|
alu_opcode: valid_opcodes;
|
alu_opcode: valid_opcodes;
|
alu_a: byte;
|
alu_a: byte;
|
|
|
keep soft input_kind == select {
|
keep test_kind == RAND;
|
45: ENABLED_VALID;
|
|
45: DISABLED_VALID;
|
|
10: RESET;
|
|
};
|
|
|
|
when ENABLED_VALID'input_kind alu_input_s {
|
when REGULAR'test_kind alu_input_s {
|
keep reset_n == TRUE; // remember this is active low
|
keep soft input_kind == select {
|
keep alu_enable == TRUE;
|
45: ENABLED_VALID;
|
keep alu_a in [0..255];
|
45: DISABLED_VALID;
|
|
10: RESET;
|
|
};
|
};
|
};
|
|
|
when DISABLED_VALID'input_kind alu_input_s {
|
when ENABLED_VALID'input_kind alu_input_s {
|
keep reset_n == TRUE; // remember this is active low
|
keep reset_n == TRUE; // remember this is active low
|
keep alu_enable == FALSE;
|
keep alu_enable == TRUE;
|
keep alu_a in [0..255];
|
keep alu_a in [0..255];
|
};
|
};
|
|
|
when RESET'input_kind alu_input_s {
|
when DISABLED_VALID'input_kind alu_input_s {
|
keep reset_n == FALSE; // remember this is active low
|
keep reset_n == TRUE; // remember this is active low
|
//keep alu_enable in [FALSE, TRUE];
|
keep alu_enable == FALSE;
|
keep alu_a in [0..255];
|
keep alu_a in [0..255];
|
//keep alu_opcode in [0..255];
|
|
};
|
};
|
|
|
|
when RESET'input_kind alu_input_s {
|
|
keep reset_n == FALSE; // remember this is active low
|
|
keep soft alu_enable == select {
|
|
50: FALSE;
|
|
50: TRUE;
|
|
};
|
|
keep alu_a in [0..255];
|
|
//keep alu_opcode in [0..255];
|
|
};
|
|
|
event T1_cover_event;
|
event T1_cover_event;
|
cover T1_cover_event is {
|
cover T1_cover_event is {
|
item input_kind using no_collect=TRUE;
|
item input_kind using no_collect=TRUE;
|
item alu_opcode using num_of_buckets=256, radix=HEX, no_collect=TRUE;
|
item alu_opcode using num_of_buckets=256, radix=HEX, no_collect=TRUE;
|
cross input_kind, alu_opcode;
|
cross input_kind, alu_opcode;
|
//item alu_a;
|
//item alu_a;
|
|
};
|
|
};
|
|
|
|
|
|
extend alu_input_s {
|
|
rand_op : byte;
|
|
|
|
when RAND'test_kind alu_input_s {
|
|
keep soft input_kind == select {
|
|
45: ENABLED_RAND;
|
|
45: DISABLED_RAND;
|
|
10: RESET;
|
};
|
};
|
|
};
|
|
|
|
when ENABLED_RAND'input_kind alu_input_s {
|
|
keep reset_n == TRUE; // remember this is active low
|
|
keep alu_enable == TRUE;
|
|
keep alu_a in [0..255];
|
|
keep rand_op in [0..255];
|
|
};
|
|
|
|
when DISABLED_RAND'input_kind alu_input_s {
|
|
keep reset_n == TRUE; // remember this is active low
|
|
keep alu_enable == TRUE;
|
|
keep alu_a in [0..255];
|
|
keep rand_op in [0..255];
|
|
};
|
|
|
|
event T2_cover_event;
|
|
cover T2_cover_event is {
|
|
item alu_enable using no_collect=TRUE;
|
|
item rand_op using num_of_buckets=256, radix=HEX, no_collect=TRUE;
|
|
cross alu_enable, rand_op;
|
|
};
|
};
|
};
|
'>
|
'>
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|