Multiplexer

in this lab we are moving further with learning SystemC! You will learn how to make a 1-bit multiplexer and how to extend it to multiple-bit.

tasks

  1. start by downloading mux.h and sc_main.cpp and study them carefully!
  2. fix "mux.h" in a way that it outputs din1 when sel is 1 and din2 when sel is 0. You should also make the Mux sensitive to all the input signals.
  3. add your signals to your trace file in sc_main.cpp.
  4. your waveform should look like this:
  5. can you change your sc_main in order to test your sensitivity correctly? at the moment you are only checking if select is working correctly! extend it to cover din1 and din2.
  6. change the mux in order to get 4 bit inputs and generate 4 bit output. Use vectors!
  7. Awesome! your are done!

Questions!