English subtitles

← Temporal syntax cs348 unit5new

Get Embed Code
1 Language

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

  1. Before we start this next exercise, let's review some temporal constructs. Some
  2. we've already used and some are new, but we will need them in the next
  3. exercise. The first one is cycle. cycle, we have used in TCMs. Cycle refers to
  4. the sampling event. So, any TCM has a default sampling event and this is what
  5. cycle refers to. For example, wait cycle waits whatever sampling event you've
  6. specified. The square brackets with the number times TE. TE stands for temporal
  7. expression, is the repeat operator. So, you basically repeat this temporal
  8. expression number of times, for this to succeed. For example, if you write wait
  9. five times cycle, then this wait will succeed after we've, we've waited for
  10. five sampling event cycles. Then we have rise, fall, and change at an
  11. expression sampled at an event. We've used the fall to create our clock event.
  12. So we had the simulator callback @sim as our sampling event, and we basically
  13. say if the clock port has a falling edge, we want the clock event to be
  14. emitted. A similar construct exists for rising edge. So rise, and also for any
  15. change. So, rise or fall. The last one here we have, is the true operator.
  16. Here, you can pass in a Boolean expression, and you can evaluate this whole
  17. thing at an event. For example, in an earlier unit, we talked about some valid
  18. event when the valid signal is one at the clock. So, this is how this is coded
  19. up, we use the clock as the default sampling event. Here, we have our
  20. conditions. So, we want to see that the valid port signal is 1. And if this the
  21. case, then this event is submitted.