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

Question about assertion in stream_xbar.sv #97

Open
dawidzim opened this issue Sep 3, 2020 · 0 comments
Open

Question about assertion in stream_xbar.sv #97

dawidzim opened this issue Sep 3, 2020 · 0 comments

Comments

@dawidzim
Copy link

dawidzim commented Sep 3, 2020

Hey!
I have question about assertion in src/stream_xbar.sv:

  for (genvar i = 0; unsigned'(i) < NumInp; i++) begin : gen_sel_assertions
    assert property (@(posedge clk_i) (valid_i[i] |-> sel_i[i] < sel_oup_t'(NumOut))) else
        $fatal(1, "Non-existing output is selected!");
  end

Why do you use : sel_oup_t'(NumOut) if for example NumOut = 4 so sel_oup_t is logic[1:0] so result from this cast will be always 0. So (valid_i[i] |-> sel_i[i] < 0)

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