The link SystemC Adder is an SystemC example. It's trivial, but we don't know if this model is right. So, we need a testbench. Testbench should fill data and read result automatically. It would be better if testbench is able to compare result with correct answers.

Now, write a testbench in another SC_MODULE(testbench), bind signal port between testbech and adder. Testbench should fill following data and get correct result.

  1. a b result
  2. 4 5 9
  3. 5 -3 2
  4. 7 3 10
  5. -4 2 -2

The result sequence should be 9, 2, 10, -2. If not, correct the adder model. And testbench should automatically execute without any interactive input.

Due Day:Tuesday, 8/21

master07/master07/sc_1.txt · Last modified: 2010/05/22 09:20 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki