Skip to content

HLSAutoDSL Frontend #72

@stefanpie

Description

@stefanpie

We want to create a frontend to support the HLS_AUTO pragma parameterization syntax / DSL @ChengyueWang is using. I am informally calling this the "HLS Auto" DSL.

This syntax looks like this:

#pragma HLS_AUTO <directive> <token>*

token ::= fixed_token
        | [prefix]auto{option (, option)*}

option ::= identifier | "NULL"
prefix ::= "" | identifier "="     // e.g. "unit=", "target_ti="

Here are some examples:

Template Concrete outputs (order preserved)
inline auto{NULL, off} "" (remove)
#pragma HLS inline
#pragma HLS inline off
performance target_ti=auto{1,2} unit=auto{NULL,cycle} ""
#pragma HLS performance target_ti=1
#pragma HLS performance target_ti=1 unit=cycle
#pragma HLS performance target_ti=2
`#pragma HLS performance target_ti=2 unit=cycle

The goal of this feature is to write a frontend that can auto find these HLS_AUTO pragma in the source code of a design and randomly sample pragma settings to generate a new randomly sampled design. This works like the OptDSL frontends.

This should be almost trivial, assuming a pragma is always on its own line with no comments, or It's never inside a comment. Even so, it seems like regex is the easiest and most valid solution to use for now.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions