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

Subversion Repositories srdydrdy_lib

[/] [srdydrdy_lib/] [trunk/] [examples/] [bridge/] [rtl/] [concentrator.v] - Diff between revs 9 and 11

Show entire file | Details | Blame | View Log

Rev 9 Rev 11
Line 11... Line 11...
   output reg            p_commit,
   output reg            p_commit,
   output reg            p_abort
   output reg            p_abort
   // End of automatics
   // End of automatics
   );
   );
 
 
  wire [`PFW_SZ-1:0]     ic_data;                // From body of template_body_1i1o.v
 
  wire                  ic_drdy;                // From sdout of sd_output.v
 
  wire                  ic_srdy;                // From body of template_body_1i1o.v
 
  wire [7:0]     ip_data;                // From sdin of sd_input.v
  wire [7:0]     ip_data;                // From sdin of sd_input.v
  wire [1:0]     ip_code;
  wire [1:0]     ip_code;
  reg                   ip_drdy;
  reg                   ip_drdy;
  wire                  ip_srdy;                // From sdin of sd_input.v
  wire                  ip_srdy;                // From sdin of sd_input.v
 
 
  reg [`PFW_SZ-1:0]      nxt_p_data;
  reg [`PFW_SZ-1:0]      nxt_p_data;
  reg [1:0]              nxt_pkt_code, pkt_code;
 
  reg                   nxt_p_srdy;
  reg                   nxt_p_srdy;
  reg [2:0]              count, nxt_count;
  reg [2:0]              count, nxt_count;
  reg                   nxt_p_abort, nxt_p_commit;
  reg                   nxt_p_abort, nxt_p_commit;
 
  wire [1:0]            pkt_code = p_data[`PRW_PCC];
 
 
  sd_input #(8+2) sdin
  sd_input #(8+2) sdin
    (
    (
     // Outputs
     // Outputs
     .c_drdy                            (c_drdy),
     .c_drdy                            (c_drdy),
Line 42... Line 39...
 
 
  always @*
  always @*
    begin
    begin
      nxt_p_data = p_data;
      nxt_p_data = p_data;
      nxt_p_srdy = p_srdy;
      nxt_p_srdy = p_srdy;
      nxt_pkt_code = pkt_code;
 
      nxt_p_data = p_data;
      nxt_p_data = p_data;
      nxt_count = count;
      nxt_count = count;
      nxt_p_commit = p_commit;
      nxt_p_commit = p_commit;
      nxt_p_abort  = 0;
      nxt_p_abort  = 0;
 
 
Line 55... Line 51...
          if (p_drdy)
          if (p_drdy)
            begin
            begin
              nxt_p_srdy = 0;
              nxt_p_srdy = 0;
              nxt_p_commit = 0;
              nxt_p_commit = 0;
              ip_drdy = 1;
              ip_drdy = 1;
              nxt_pkt_code = `PCC_DATA;
              nxt_p_data[`PRW_PCC] = `PCC_DATA;
              nxt_count = 0;
              nxt_count = 0;
 
 
              if (ip_srdy)
              if (ip_srdy)
                begin
                begin
                  nxt_count = 1;
                  nxt_count = 1;
                  if (ip_code != `PCC_DATA)
                  if (ip_code != `PCC_DATA)
                    nxt_pkt_code = ip_code;
                    nxt_p_data[`PRW_PCC] = ip_code;
                  nxt_p_data[63:56] = ip_data;
                  nxt_p_data[63:56] = ip_data;
                end
                end
            end
            end
        end
        end
      else if (ip_srdy)
      else if (ip_srdy)
        begin
        begin
          ip_drdy = 1;
          ip_drdy = 1;
          if (ip_code != `PCC_DATA)
          if (ip_code != `PCC_DATA)
            nxt_pkt_code = ip_code;
            nxt_p_data[`PRW_PCC] = ip_code;
 
 
          nxt_count = count + 1;
          nxt_count = count + 1;
          case (count)
          case (count)
            0 : nxt_p_data[63:56] = ip_data;
            0 : nxt_p_data[63:56] = ip_data;
            1 : nxt_p_data[55:48] = ip_data;
            1 : nxt_p_data[55:48] = ip_data;
Line 90... Line 86...
            begin
            begin
              if (ip_code == `PCC_EOP)
              if (ip_code == `PCC_EOP)
                begin
                begin
                  nxt_p_commit = 1;
                  nxt_p_commit = 1;
                  nxt_p_srdy   = 1;
                  nxt_p_srdy   = 1;
 
                  nxt_p_data[`PRW_VALID] = count + 1;
                end
                end
              else if ((ip_code == `PCC_BADEOP) || (pkt_code == `PCC_BADEOP))
              else if ((ip_code == `PCC_BADEOP) || (pkt_code == `PCC_BADEOP))
                begin
                begin
                  nxt_p_abort = 1;
                  nxt_p_abort = 1;
                end
                end
              else
              else
 
                begin
                nxt_p_srdy = 1;
                nxt_p_srdy = 1;
 
                  nxt_p_data[`PRW_VALID] = 0;
 
                end
            end
            end
        end
        end
    end // always @ *
    end // always @ *
 
 
  always @(posedge clk)
  always @(posedge clk)

powered by: WebSVN 2.1.0

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