Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- always @(*)
- begin : convert
- index = 0;
- for (oh_index = 0; oh_index < NUM_SIGNALS; oh_index++)
- begin
- if (one_hot[oh_index])
- begin
- if (DIRECTION == "LSB0")
- index = index | oh_index[INDEX_WIDTH - 1:0]; // Use 'or' to avoid synthesizing priority encoder
- else
- index = index | ~oh_index[INDEX_WIDTH - 1:0];
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement