
























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























































wire [31:0] myInt; wire [63:0] myLong; assign myLong [31:0] = myInt; assign myLong [63:32] = ‘0; wire [31:0] value; wire fifthBit; // 0-based (this is the sixth bit 1-based) assign fifthBit = value[5]; wire [31:0] instruction; wire [5:0] opcode; assign opcode = instruction[31:26];
module mux (data0_i, data1_i, select_i, data_o); input data0_i, data1_i, select_i; output data_o; assign data_o = (select_i & data1_i) | (!select_i & data0_i); endmodule
module mux (data0_i, data1_i, select_i, data_o); input data0_i, data1_i, select_i; output data_o; assign data_o = select_i? data1_i : data0_i; endmodule