Jump to content
    

Verilog: как комбинаторикой узнать номер бита, установленного в 1?

мне как то надо было проверить массив переменной длинны с шинами фиксированной размерности на наличие хотя бы одной 1. на вхдл-е я это так сделал.

А на верилоге можно написать что-то типа

assign bu_data[i] = |bu_data_v[i];

(пиарю красоту верилога (с))

Share this post


Link to post
Share on other sites

А на верилоге можно написать что-то типа

assign bu_data[i] = |bu_data_v[i];

(пиарю красоту верилога (с))

 

ну дык может и на VHDL-е что то подобное имеется, только я об этом не знаю :). я то не гуру, я только учусь :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...