
This block is a variable-precision unsigned multiplier. It operates in three precision modes determined by external control pins:
mode = 00): Direct load -> 4-bit productmode = 01): Direct load -> 8-bit productmode = 10): Two-cycle sequential load -> 16-bit product (two-cycle sequential load)All 8 bidirectional pins are set as inputs (uio_oe = 8'b0000_0000x)
| Signal Name | Pin Assignment | Direction | Description |
|---|---|---|---|
data_in[7:0] |
ui_in[7:0] |
Input | Main 8-bit operand data input |
mode[1:0] |
uio_in[1:0] |
Input | Mode selection between 2-bit, 4-bit, and 8-bit |
load_en |
uio_in[2] |
Input | Cycle control for 8-bit mode |
reserved |
uio_in[7:3] |
Input | Unused inputs |
product_out[7:0] |
uo_out[7:0] |
Output | Product data output |
4'b0000)load_en = 0)
load_en = 1)
load_en = 0)
product[7:0])load_en = 1)
product[15:8])Run the automated Cocotb testbench using make:
cd test
make
## External hardware
N/A
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | data_in[0] | product_out[0] | mode[0] |
| 1 | data_in[1] | product_out[1] | mode[1] |
| 2 | data_in[2] | product_out[2] | load_en |
| 3 | data_in[3] | product_out[3] | |
| 4 | data_in[4] | product_out[4] | |
| 5 | data_in[5] | product_out[5] | |
| 6 | data_in[6] | product_out[6] | |
| 7 | data_in[7] | product_out[7] |