Guest User

Untitled

a guest
Feb 23rd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. module testbench;
  2. logic signed [7:0] x = 8'b11100000;
  3. logic signed [7:0] y = 8'b00010100;
  4. logic [15:0] z;
  5. initial begin
  6. z = x*y;
  7. $display("%b %b", z[14:7]) // :)
  8. //$display("%b", (15'(x*y))[14:7]); // :(
  9. //$display("%b", 15'(x*y)[14:7]); // :(
  10. //$display("%b", {15'(x*y)}[14:7]); // :(
  11. //none of the above 3 works
  12. end
  13. endmodule
  14.  
  15. result <= 15'(a*b)[14:7];
Add Comment
Please, Sign In to add comment