English subtitles

← Test Phases cs348 unit3new

Get Embed Code
1 Language

Showing Revision 1 created 04/14/2013 by Cogi-Admin.

  1. In the previous section, we talked about the synchronization between the
  2. Testbench and the simulator. Now, within the Testbench, we have many objects
  3. which also need to be synchronized amongst each other and also to the
  4. simulation flow. The solution to this is called the Test Phase Mechanism. This
  5. is an overall schedule, which calls predefined empty methods in all
  6. user-defined objects. Let's have a look at the different phases. Before we
  7. start simulation, we have some Setup phase. here, you can configure your
  8. Testbench and make sure everything is setup correctly. Then, we have the
  9. Pre-run Generation phase. Every object instantiated insist or further down the
  10. hierarchy, will be allocated and the contents will be randomized in this phase.
  11. All the user-defined objects have empty methods called pre_generate and
  12. post_generated, which will be called. We could use, for example, post_generate
  13. to calculate the parity and use that instead of using a constraint, and calling
  14. a method in generation. After this phase, we have the Connect phase, during
  15. which the components of the Testbench are bound to specific components in the
  16. hardware model. We will talk in more detail about this phase when we talk about
  17. units and ports. Now, we come to the start of the simulation and we enter the
  18. Run phase. When this phase starts, a Run method is called in all the objects in
  19. your Testbench. We have used this in some examples before, to start activity in
  20. a Testbench. So here, you can start all your threads and all your codes and you
  21. know that the simulation has started. At the end of simulation, we have the
  22. extract and the check phase. And again, we have some pre-defined methods here
  23. called check and finalize, which you can use to make sure that your Testbench
  24. has finished correctly.