Week 2 – Combinational Logic

Lecture

  • N-bit adder + testbench

  • Mux, ALU

  • Encoder

  • Decoder

  • Verilog functions

  • LUT

Assignment

  • Create a module to apply quantization and ReLU: y = relu(quant(x))

    • Quantization: q = clip(y / (2^f)), where f is a constant

    • ReLU: z = max(0, q)

  • For each combinational element in [mux, encoder, decoder, relu]

    • Consider inputs of 3 bits

    • Decompose into sum of products

    • Decompose into product of sums