mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
starting on functional coverage for fence.i.
This commit is contained in:
parent
811e760d7e
commit
23e51e7277
25
testbench/coverage/test_fencei_coverage.svh
Normal file
25
testbench/coverage/test_fencei_coverage.svh
Normal file
@ -0,0 +1,25 @@
|
||||
typedef RISCV_instruction #(ILEN, XLEN, FLEN, VLEN, NHART, RETIRE) test_ins_rv64i_t;
|
||||
|
||||
covergroup test_fencei_cg with function sample(test_ins_rv64i_t ins);
|
||||
option.per_instance = 1;
|
||||
option.comment = "Fence.I";
|
||||
|
||||
cp_asm_count : coverpoint ins.ins_str == "fence.i" iff (ins.trap == 0 ) {
|
||||
option.comment = "Number of times instruction is executed";
|
||||
bins count[] = {1};
|
||||
}
|
||||
endgroup
|
||||
|
||||
function void test_fencei_sample(int hart, int issue);
|
||||
test_ins_rv64i_t ins;
|
||||
|
||||
case (traceDataQ[hart][issue][0].inst_name)
|
||||
"fenci" : begin
|
||||
ins = new(hart, issue, traceDataQ);
|
||||
test_fencei_cg.sample(ins);
|
||||
end
|
||||
endcase
|
||||
|
||||
endfunction
|
||||
|
||||
|
4
testbench/coverage/test_fencei_coverage_init.svh
Normal file
4
testbench/coverage/test_fencei_coverage_init.svh
Normal file
@ -0,0 +1,4 @@
|
||||
test_fencei_cg = new(); test_fencei_cg.set_inst_name("obj_fencei");
|
||||
|
||||
// test_fencei_cg = new();
|
||||
//test_fencei_cg.set_inst_name("obj_fencei");
|
Loading…
Reference in New Issue
Block a user