This is a array multiplier to multiply two 4-bit binaries. It uses full adders to process bitwise multiplications, the circuit diagram is as shown below:
a testbench called test.py is given. where tests can be given to the project, to create a new test, change the value for dut.ui_in.value to 0x(any two integers), the product of the two integers will be calculated in the multiplier, and for assert dut.uo_out.value, change it to the expected output of the two integers you just inserted, if the program runs properly, no error should occur.
N/A
# | Input | Output | Bidirectional |
---|---|---|---|
0 | ui_in[0] | uo_out[0] | 1b'0 |
1 | ui_in[1] | uo_out[1] | 1b'0 |
2 | ui_in[2] | uo_out[2] | 1b'0 |
3 | ui_in[3] | uo_out[3] | 1b'0 |
4 | ui_in[4] | uo_out[4] | 1b'0 |
5 | ui_in[5] | uo_out[5] | 1b'0 |
6 | ui_in[6] | uo_out[6] | 1b'0 |
7 | ui_in[7] | uo_out[7] | 1b'0 |