
Above is a diagram that represents a 4-bit multiplier, which takes in two 4-bit integers and outputs a single 8-bit integer.
This was created using a manual structural design. We utilized a 1-bit full adder module in our implementation.
m with each bit of input q.p which is an 8-bit integer.Creating your own test cases:
test folder and locate test.py.test.py and add your own custom test cases.# Example
# TEST CASE #0 -> 0 * 1
dut.ui_in.value = 0b00000001
await ClockCycles(dut.clk, 1)
assert dut.uo_out.value = 0b00000000
make and check the tests passed.N/A
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | m[0] | p[0] | |
| 1 | m[1] | p[1] | |
| 2 | m[2] | p[2] | |
| 3 | m[3] | p[3] | |
| 4 | q[0] | p[4] | |
| 5 | q[1] | p[5] | |
| 6 | q[2] | p[6] | |
| 7 | q[3] | p[7] |