OpenCores
URL https://opencores.org/ocsvn/srdydrdy_lib/srdydrdy_lib/trunk

Subversion Repositories srdydrdy_lib

[/] [srdydrdy_lib/] [trunk/] [examples/] [bridge/] [rtl/] [port_ring_tap_fsm.v] - Diff between revs 12 and 13

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 13
Line 37... Line 37...
 
 
  localparam s_idle = 0,
  localparam s_idle = 0,
             s_rfwd = 1,
             s_rfwd = 1,
             s_rcopy = 2,
             s_rcopy = 2,
             s_rsink = 3,
             s_rsink = 3,
             s_tdata = 4;
             s_tdata = 4,
 
              s_tdrop = 5;
  localparam ns_idle = 1,
  localparam ns_idle = 1,
             ns_rfwd = 2,
             ns_rfwd = 2,
             ns_rcopy = 4,
             ns_rcopy = 4,
             ns_rsink = 8,
             ns_rsink = 8,
             ns_tdata = 16;
             ns_tdata = 16,
 
    ns_tdrop = 32;
 
 
  assign rarb_req = lfli_srdy & lprx_srdy | state[s_tdata];
  assign rarb_req = lfli_srdy & lprx_srdy | state[s_tdata];
 
 
  always @*
  always @*
    begin
    begin
Line 75... Line 77...
                        lro_srdy = 1;
                        lro_srdy = 1;
                        nxt_state = ns_tdata;
                        nxt_state = ns_tdata;
                      end
                      end
                  end
                  end
                else
                else
 
                  begin
                  lfli_drdy = 1;
                  lfli_drdy = 1;
 
                    nxt_state = ns_tdrop;
 
                  end
              end
              end
            else if (lri_srdy)
            else if (lri_srdy)
              begin
              begin
                if (lri_data[`PRW_DATA] & port_mask)
                if (lri_data[`PRW_DATA] & port_mask)
                  begin
                  begin
Line 129... Line 134...
                    (lprx_data[`PRW_PCC] == `PCC_BADEOP))
                    (lprx_data[`PRW_PCC] == `PCC_BADEOP))
                  nxt_state = ns_idle;
                  nxt_state = ns_idle;
              end
              end
          end // case: state[s_tdata]
          end // case: state[s_tdata]
 
 
 
        // received lookup from FIB with zero port index; drop
 
        // the packet by reading out
 
        state[s_tdrop] :
 
          begin
 
            lprx_drdy = 1;
 
            if (lprx_srdy)
 
              begin
 
                if ((lprx_data[`PRW_PCC] == `PCC_EOP) |
 
                    (lprx_data[`PRW_PCC] == `PCC_BADEOP))
 
                  nxt_state = ns_idle;
 
              end
 
          end
 
 
        // data on ring is for our port as well as further ports
        // data on ring is for our port as well as further ports
        // copy ring data to our TX buffer as well as on the ring
        // copy ring data to our TX buffer as well as on the ring
        state[s_rcopy] :
        state[s_rcopy] :
          begin
          begin
            lro_data = lri_data;
            lro_data = lri_data;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.