Wasington University
CSE 566
Reconfigurable System On Chip Design
John W. Lockwood
Fall 2004

Homework Assignment 2

Due: Friday, October 8, 2004: 5pm

40 Points

Your Name: ____________________________________________

Instructions

Reading

Homework Questions

  1. What percentage of traffic on the Internet uses the TCP/IP protocol?
    (1 pt)

    _____ %

  2. On an OC-768 link running at 40 Gigabits/second, how many packets per second need to be processed if the size of each packet is 500 bytes? (2 pts)

    _________ packets/second.

  3. Using data for the packet shown in the waveform from the TCP/IP processor, identify the values of the following fields:

    Hints:

    • IP Version = _____ [decimal]

    • TTL = _____ [decimal]

    • Destination address = ______ . ______ . ______ . ______ [dotted.decimal]

    • Destination port = ______ [decimal]

    • Source address = ______ . ______ . ______ . ______ [dotted.decimal]

    • Source port = ______ [decimal]

    • TCP/IP Sequence number = _______ [hex]

    • TCP/IP message = __________________________________ [ASCII]



  4. A circuit is needed to interfaces to the TCP/IP wrappers and drive a signal high for the duration of packet whenever it finds that the packet's
    • Source address = 128.252.60.2
    • Destination address = 192.168.50.2, and
    • Destination port = 80 [decimal]
    • Protocol=TCP
    The output of the circuit should be a signal called HEADER_MATCH.
    • The HEADER_MATCH output should be set high ('1') from the time that the match is found in the header of the packet to the end of the packet.
    • At the end of the frame, HEADER_MATCH should be reset to have a low value ('0').

    • Write a paragraph that descibes your approach to design this circuit using plain text.
      • Discuss how a Moore state machine can be to match the conditions over multiple clock cycles
      (4 pts)

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

    • Draw a Moore state machine that implements the state machine described above. Indicate the name of each state and the value of HEADER_MATCH in each state. Draw the state transitions using arrows with labels that identify the condition for the transition. (5 pts)
      • Hint: Both ModelSim and Xilinx include tools for drawing and implementing state machines. Alternatively, use a program like Visio or PowerPoint to generate the graphic, then paste the image into your solutions.
      (4 pts)

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

    • Write the VHDL code for the circuit that generates the header_match signal.
      (You will need more space than the area provided below) (8 pts)

      entity Check_Header is
        port (
          DATA_IN       : in  std_logic_vector (31 downto 0);  -- data
          DATAEN_IN     : in  std_logic;         -- data enable
          SOF_IN        : in  std_logic;         -- start of frame
          SOIP_IN       : in  std_logic;         -- start of ip header
          EOF_IN        : in  std_logic;         -- end of frame
          SOP_IN        : in  std_logic;         -- start of ip payload
          ISTCP_IN      : in  std_logic;         -- is tcp packet
          TDE_IN        : in  std_logic;         -- tcp data enable
          BYTES_IN      : in  std_logic_vector (3 downto 0);  -- valid bytes
          FLOWSTATE_IN  : in  std_logic_vector (31 downto 0); -- flow id
          FLOWSTATE_EN_IN:in  std_logic;
          NEWFLOW_IN    : in  std_logic;         -- new flow
          ENDFLOW_IN    : in  std_logic;         -- end of flow
          TCA_IN        : out std_logic;         -- xmit cell avail
      
          HEADER_MATCH  : out std_logic;         -- Signal to be generated
      end Check_Header;
      
      architecture behavior of Check_Header is
        
        -- internal signals
      
      
       
            ... 
      
      
      begin -- behavior
      
        match_flop: process (CLK)
        begin
          if (CLK = '1' and CLK'event) then
            if (reset_l = '0') then
              HEADER_MATCH <= '0';
            else
      
      
              ...
      
      
            end if;
          end if;
        end process match_flop;
      
      
            ...
      
      
      end behavior;
          

    • Explain the purpose of the BYTES field, as it is used for the TCP/IP processor (2 pts)

      ____________________________________________________________

      ____________________________________________________________

    • Explain how you could use the HEADER_MATCH signal,
      in conjunction with the BYTES field, to determine how many bytes of data
      pass through the system that matched a given header rule. (4 pts)

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

      ____________________________________________________________

    • In which Endian format does the TCP/IP wrapper present data? (1 pt)

      ____________________

    • Describe the purpose of the State Store, as it is used for the TCP/IP wrappers(2 pts)

      ____________________________________________________________

      ____________________________________________________________

    • Explain why the ScanApp module requires the use of the a State Store. (2 pts)

      ____________________________________________________________

      ____________________________________________________________

  5. Using your eGroupWare account, determine what important event (besides class)
    occurs on December 7, 2004. (1 pts)

      ____________________________________________________________