Skip to content

Add support for directives #63

@joaovam

Description

@joaovam

ChiBench only support modules, in the sense that every directive generated is erased from the final program. We should add the support for directive flags, for example:

  • ifdef
  • ifndef
  • endif

The simpler solution would be to generate two programs, let's call them A and B.

The final program generated would be:

//This define should be randomized, for some programs we should follow the if branch, for others the else branch
`define B1

`ifdef B1
A
`else
B
`endif

This solution would cover only straightforward define cases, in real programs these directives are used with much more granularity, for example, inside functions, modules between statements, and so on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions