Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module test(
- input wire [31:0] a,
- input wire [1:0] b,
- output wire [7:0] x
- );
- // assign x = a[(8*b)+:8];
- assign x = a[(b<<3)+:8];
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement