Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Test generation using cross coverage coverpoints. #27

Open
pawks opened this issue Jan 19, 2022 · 0 comments
Open

Test generation using cross coverage coverpoints. #27

pawks opened this issue Jan 19, 2022 · 0 comments
Labels
enhancement New feature or request LFX Mentorship Spring-2022 Issues targeted to be completed as a part of LFX Mentorship Spring-2022

Comments

@pawks
Copy link
Collaborator

pawks commented Jan 19, 2022

Summary

Coverpoints spanning across multiple instructions help identify interesting instruction sequences which have architectural significance such as structural hazards and data hazards. CTG lacks the infrastructure necessary to generate such tests. This involves defining the relevant coverpoints using the custom format( cross_comb node defined here) for specifying such coverpoints and employing a constraint solver to produce tests with the relevant instruction sequences.

Changes required

  • Add support to test generator.
  • Add relevant assembly macros necessary to handle most common cases.

Basic example

WAW hazard between an add and a sub instructions which are 3 instructions apart. The instructions in-between are consuming i.e use the result of the add operation as one of the operands.

Coverpoint Definition

add_sub_cwaw:
  cross_comb:
    - "[add : ? : ? : ? : sub] :: [a=rd : ? : ? : ? : ?] :: [? : rs1==a or rs2==a : rs1==a or rs2==a : rs1==a or rs2==a : rd==a]"

Possible assembly sequence

li x3, 152;
li x4, 169;
add x3,x3,x4;
addi x5,x3,1;
mulh x6,x4,x3;
slli x4,x3,25;
sub x3,x5,x6;
@pawks pawks added enhancement New feature or request LFX Mentorship Spring-2022 Issues targeted to be completed as a part of LFX Mentorship Spring-2022 labels Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request LFX Mentorship Spring-2022 Issues targeted to be completed as a part of LFX Mentorship Spring-2022
Projects
None yet
Development

No branches or pull requests

1 participant