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
- start by downloading mux.h and sc_main.cpp and study them carefully!
- 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.
- add your signals to your trace file in sc_main.cpp.
- your waveform should look like this:
- 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.
- change the mux in order to get 4 bit inputs and generate 4 bit output. Use vectors!
- Awesome! your are done!
Questions!
Related Readings