Return to Video

Refactoring the router environment part I cs348 unit7

  • 0:01 - 0:05
    In the exercises of this lesson, we will refactor the code of the router
  • 0:05 - 0:10
    environment to align it with the reuse methodologies. First, let's have a look
  • 0:10 - 0:14
    at the components we currently have. In the router environment, we have an
  • 0:14 - 0:19
    input_driver and a list of output_receivers, as well as the signal_map. We also
  • 0:19 - 0:23
    have an input_monitor and a list of output_monitors which are connected to the
  • 0:23 - 0:28
    data_checker. We will reorganize our codes to focus on agents around
  • 0:28 - 0:34
    interfaces. We've already started working on the pkt_agent by splitting the
  • 0:34 - 0:39
    input_driver into a pkt_sequencer and the pkt_driver. All we now need to do is
  • 0:39 - 0:43
    add a monitor and then our agent is complete. We will modify the input monitor
  • 0:43 - 0:48
    slightly and make it a packet monitor and then we're done. We've got an agent,
  • 0:48 - 0:54
    where we can control a packet interface. We will also add a field to enable us
  • 0:54 - 0:59
    to control whether the agent is active or passive. Another thing we need to
  • 0:59 - 1:03
    consider is that the components on the input side do slightly different work to
  • 1:03 - 1:08
    the components on the output side. So, if we're thinking about a packet
  • 1:08 - 1:12
    interface, we basically have an INGRESS packet interface which enables us to
  • 1:12 - 1:18
    drive packets into the router. And we also have an EGRESS kind of interface
  • 1:18 - 1:23
    which works on the output of the router. Both of those are very similar, so we
  • 1:23 - 1:27
    can basically use one agent, but we need to tell it whether it's an agent on
  • 1:27 - 1:32
    the input side or on the output side. So, our pkt_agent will also have a
  • 1:32 - 1:38
    direction field to notify whether it's an INGRESS or an EGRESS agent. For the
  • 1:38 - 1:43
    INGRESS, we use it as shown here, on the EGRESS side, the pkt_agent is slightly
  • 1:43 - 1:48
    different. Here, we don't need a sequencer because we only have the random
  • 1:48 - 1:53
    delay, which we can control with a simple constraint. So, we will use the
  • 1:53 - 1:58
    pkt_receiver as the driver and the pkt_monitor. And that is all the components
  • 1:58 - 2:00
    we need for the EGRESS agent.
Title:
Refactoring the router environment part I cs348 unit7
Video Language:
English
Team:
Udacity
Project:
CS348 - Functional Hardware Verification
Duration:
02:01
Cogi-Admin added a translation

English subtitles

Revisions