Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crave::inside doesn't work with systemc datatypes, Syntax should support initializer lists #25

Open
voertler opened this issue Nov 29, 2023 · 0 comments

Comments

@voertler
Copy link
Contributor

SystemC datatypes in inside are not supported. This leads to a compile error

    crave::crv_variable<sc_dt::sc_uint<8>> byte;
    crave::crv_constraint a_constraint {
        "a_constraint",
        crave::inside(
            byte(),
            std::set<sc_dt::sc_uint<8>> {0, 64, 128, 192})};

However this works:

    crave::crv_variable<uint8_t> byte;
    crave::crv_constraint a_constraint {
        "a_constraint",
        crave::inside(byte(), std::set<uint8_t> {0, 64, 128, 192})};

Why is there a std::set type required at all. An initializer list should be enough:
crave::inside(byte(),{0, 64, 128, 192})}
Thanks to @hvdschoot for finding this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant