Question: Given the following, input [7:0] A,[7:0] B, input [2:0] Opsel, output [7:0] F Write the verilog code that will perform the functions in the table

Given the following,

input [7:0] A,[7:0] B, input [2:0] Opsel, output [7:0] F

Given the following, input [7:0] A,[7:0] B, input [2:0] Opsel, output [7:0]

Write the verilog code that will perform the functions in the table corresponding to the opcode listed

Opcode Operation 000 F = b 001 F = a*b (bitwise xor) 010 F = a & b (bitwise and) 011 F = a b (bitwise or) 100 F = a + b (addition) 101 F = a - b (subtraction) 110 F[7] = 0, F[6:0] = b[7:1] (logical shift right) 111 F = a*b (multiplication) Opcode Operation 000 F = b 001 F = a*b (bitwise xor) 010 F = a & b (bitwise and) 011 F = a b (bitwise or) 100 F = a + b (addition) 101 F = a - b (subtraction) 110 F[7] = 0, F[6:0] = b[7:1] (logical shift right) 111 F = a*b (multiplication)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!