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

Subversion Repositories srdydrdy_lib

[/] [srdydrdy_lib/] [trunk/] [examples/] [bridge/] [rtl/] [fib_lookup.v] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 ghutchis
// Inputs are PPI (port parser input)
2
// Outputs are FLO (FIB lookup out)
3
 
4
module fib_lookup
5
  (/*AUTOARG*/
6
  // Outputs
7 31 ghutchis
  refup_srdy, refup_page, refup_count, ppi_drdy, flo_data, flo_srdy,
8 4 ghutchis
  // Inputs
9 31 ghutchis
  refup_drdy, ppi_srdy, clk, reset, ppi_data, flo_drdy
10 4 ghutchis
  );
11
 
12
  input     clk;
13
  input     reset;
14
 
15 31 ghutchis
  input [`PM2F_SZ-1:0] ppi_data;
16
  output [`LL_PG_ASZ-1:0]  flo_data;
17 4 ghutchis
  output [`NUM_PORTS-1:0]  flo_srdy;
18
  input [`NUM_PORTS-1:0]   flo_drdy;
19
  /*AUTOINPUT*/
20
  // Beginning of automatic inputs (from unused autoinst inputs)
21
  input                 ppi_srdy;               // To port_parse_in of sd_input.v
22 31 ghutchis
  input                 refup_drdy;             // To fsm0 of fib_lookup_fsm.v
23 4 ghutchis
  // End of automatics
24
  /*AUTOOUTPUT*/
25
  // Beginning of automatic outputs (from unused autoinst outputs)
26
  output                ppi_drdy;               // From port_parse_in of sd_input.v
27 31 ghutchis
  output [`LL_REFSZ-1:0] refup_count;           // From fsm0 of fib_lookup_fsm.v
28
  output [`LL_PG_ASZ-1:0] refup_page;           // From fsm0 of fib_lookup_fsm.v
29
  output                refup_srdy;             // From fsm0 of fib_lookup_fsm.v
30 4 ghutchis
  // End of automatics
31
 
32
  wire [`FIB_ENTRY_SZ-1:0] ft_rdata;
33 31 ghutchis
  wire [`PM2F_SZ-1:0] lpp_data;
34 4 ghutchis
  /*AUTOWIRE*/
35
  // Beginning of automatic wires (for undeclared instantiated-module outputs)
36
  wire [`FIB_ASZ-1:0]   ft_addr;                // From fsm0 of fib_lookup_fsm.v
37 5 ghutchis
  wire                  ft_rd_en;               // From fsm0 of fib_lookup_fsm.v
38 4 ghutchis
  wire [`FIB_ENTRY_SZ-1:0] ft_wdata;            // From fsm0 of fib_lookup_fsm.v
39 5 ghutchis
  wire                  ft_wr_en;               // From fsm0 of fib_lookup_fsm.v
40 4 ghutchis
  wire                  lout_drdy;              // From fib_res_out of sd_mirror.v
41 5 ghutchis
  wire [`NUM_PORTS-1:0] lout_dst_vld;           // From fsm0 of fib_lookup_fsm.v
42 4 ghutchis
  wire                  lout_srdy;              // From fsm0 of fib_lookup_fsm.v
43 31 ghutchis
  wire [`LL_PG_ASZ-1:0] lout_start;             // From fsm0 of fib_lookup_fsm.v
44 4 ghutchis
  wire                  lpp_drdy;               // From fsm0 of fib_lookup_fsm.v
45
  wire                  lpp_srdy;               // From port_parse_in of sd_input.v
46
  // End of automatics
47
 
48
/* sd_input AUTO_TEMPLATE
49
 (
50
 .c_\(.*\)      (ppi_\1),
51
 .ip_\(.*\)     (lpp_\1),
52
 );
53
 */
54 31 ghutchis
  sd_input #(`PM2F_SZ) port_parse_in
55 4 ghutchis
    (/*AUTOINST*/
56
     // Outputs
57
     .c_drdy                            (ppi_drdy),              // Templated
58
     .ip_srdy                           (lpp_srdy),              // Templated
59
     .ip_data                           (lpp_data),              // Templated
60
     // Inputs
61
     .clk                               (clk),
62
     .reset                             (reset),
63
     .c_srdy                            (ppi_srdy),              // Templated
64
     .c_data                            (ppi_data),              // Templated
65
     .ip_drdy                           (lpp_drdy));              // Templated
66
 
67
/* behave1p_mem AUTO_TEMPLATE
68
 (
69
   .d_out                             (ft_rdata),
70
   .d_in                              (ft_wdata),
71
   .clk                               (clk),
72
   .\(.*\)     (ft_\1),
73
 );
74
 */
75
  behave1p_mem #(`FIB_ENTRIES, `FIB_ENTRY_SZ) fib_mem
76
    (/*AUTOINST*/
77
     // Outputs
78
     .d_out                             (ft_rdata),              // Templated
79
     // Inputs
80 5 ghutchis
     .wr_en                             (ft_wr_en),              // Templated
81
     .rd_en                             (ft_rd_en),              // Templated
82 4 ghutchis
     .clk                               (clk),                   // Templated
83
     .d_in                              (ft_wdata),              // Templated
84
     .addr                              (ft_addr));               // Templated
85
 
86
  fib_lookup_fsm fsm0
87
    (/*AUTOINST*/
88
     // Outputs
89
     .lpp_drdy                          (lpp_drdy),
90
     .ft_wdata                          (ft_wdata[`FIB_ENTRY_SZ-1:0]),
91 5 ghutchis
     .ft_rd_en                          (ft_rd_en),
92
     .ft_wr_en                          (ft_wr_en),
93 4 ghutchis
     .ft_addr                           (ft_addr[`FIB_ASZ-1:0]),
94 31 ghutchis
     .lout_start                        (lout_start[`LL_PG_ASZ-1:0]),
95 4 ghutchis
     .lout_srdy                         (lout_srdy),
96 5 ghutchis
     .lout_dst_vld                      (lout_dst_vld[`NUM_PORTS-1:0]),
97 31 ghutchis
     .refup_srdy                        (refup_srdy),
98
     .refup_page                        (refup_page[`LL_PG_ASZ-1:0]),
99
     .refup_count                       (refup_count[`LL_REFSZ-1:0]),
100 4 ghutchis
     // Inputs
101
     .clk                               (clk),
102
     .reset                             (reset),
103 31 ghutchis
     .lpp_data                          (lpp_data[`PM2F_SZ-1:0]),
104 4 ghutchis
     .lpp_srdy                          (lpp_srdy),
105
     .ft_rdata                          (ft_rdata[`FIB_ENTRY_SZ-1:0]),
106 31 ghutchis
     .lout_drdy                         (lout_drdy),
107
     .refup_drdy                        (refup_drdy));
108 4 ghutchis
 
109
/* sd_mirror AUTO_TEMPLATE
110
 (
111 31 ghutchis
 .c_data       (lout_start[`LL_PG_ASZ-1:0]),
112 4 ghutchis
 .c_\(.*\)     (lout_\1),
113
 .p_\(.*\)     (flo_\1),
114
 )
115
 */
116 31 ghutchis
  sd_mirror #(// Parameters
117
              .mirror                   (`NUM_PORTS),
118
              .width                    (`LL_PG_ASZ)) fib_res_out
119 4 ghutchis
    (/*AUTOINST*/
120
     // Outputs
121
     .c_drdy                            (lout_drdy),             // Templated
122
     .p_srdy                            (flo_srdy),              // Templated
123
     .p_data                            (flo_data),              // Templated
124
     // Inputs
125
     .clk                               (clk),
126
     .reset                             (reset),
127
     .c_srdy                            (lout_srdy),             // Templated
128 31 ghutchis
     .c_data                            (lout_start[`LL_PG_ASZ-1:0]), // Templated
129 5 ghutchis
     .c_dst_vld                         (lout_dst_vld),          // Templated
130 4 ghutchis
     .p_drdy                            (flo_drdy));              // Templated
131
 
132
endmodule // fib_lookup
133 5 ghutchis
// Local Variables:
134
// verilog-library-directories:("." "../../../rtl/verilog/closure" "../../../rtl/verilog/memory" "../../../rtl/verilog/forks")
135
// End:  

powered by: WebSVN 2.1.0

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