Skip to content

Commit

Permalink
synth: Refactore nw_chimney wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Sep 26, 2023
1 parent ca6645d commit f1c556e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
2 changes: 2 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ sources:
- target: any(synthesis,spyglass)
files:
# Level 0
- test/floo_test_pkg.sv
# Level 1
- src/synth/floo_synth_axi_chimney.sv
- src/synth/floo_synth_narrow_wide_chimney.sv
- src/synth/floo_synth_router.sv
Expand Down
61 changes: 31 additions & 30 deletions src/synth/floo_synth_narrow_wide_chimney.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

module floo_synth_narrow_wide_chimney
import floo_pkg::*;
import floo_narrow_wide_flit_pkg::*;
import floo_param_pkg::*;
import floo_narrow_wide_pkg::*;
import floo_test_pkg::*;
(
input logic clk_i,
input logic rst_ni,
input narrow_in_req_t narrow_in_req_i,
output narrow_in_resp_t narrow_in_rsp_o,
output narrow_out_req_t narrow_out_req_o,
input narrow_out_resp_t narrow_out_rsp_i,
input wide_in_req_t wide_in_req_i,
output wide_in_resp_t wide_in_rsp_o,
output wide_out_req_t wide_out_req_o,
input wide_out_resp_t wide_out_rsp_i,
input axi_narrow_in_req_t axi_narrow_in_req_i,
output axi_narrow_in_rsp_t axi_narrow_in_rsp_o,
output axi_narrow_out_req_t axi_narrow_out_req_o,
input axi_narrow_out_rsp_t axi_narrow_out_rsp_i,
input axi_wide_in_req_t axi_wide_in_req_i,
output axi_wide_in_rsp_t axi_wide_in_rsp_o,
output axi_wide_out_req_t axi_wide_out_req_o,
input axi_wide_out_rsp_t axi_wide_out_rsp_i,
input xy_id_t xy_id_i,
output narrow_req_flit_t narrow_req_o,
output narrow_rsp_flit_t narrow_rsp_o,
input narrow_req_flit_t narrow_req_i,
input narrow_rsp_flit_t narrow_rsp_i,
output wide_flit_t wide_o,
input wide_flit_t wide_i
output floo_req_t floo_req_o,
output floo_rsp_t floo_rsp_o,
input floo_req_t floo_req_i,
input floo_rsp_t floo_rsp_i,
output floo_wide_t floo_wide_o,
input floo_wide_t floo_wide_i
);


Expand All @@ -50,21 +50,22 @@ floo_narrow_wide_chimney #(
.test_enable_i(1'b0),
.sram_cfg_i('0),
.id_i('0),
.id_map_i ('0),
.xy_id_i,
.narrow_in_req_i,
.narrow_in_rsp_o,
.narrow_out_req_o,
.narrow_out_rsp_i,
.wide_in_req_i,
.wide_in_rsp_o,
.wide_out_req_o,
.wide_out_rsp_i,
.narrow_req_i,
.narrow_rsp_o,
.narrow_req_o,
.narrow_rsp_i,
.wide_o,
.wide_i
.axi_narrow_in_req_i,
.axi_narrow_in_rsp_o,
.axi_narrow_out_req_o,
.axi_narrow_out_rsp_i,
.axi_wide_in_req_i,
.axi_wide_in_rsp_o,
.axi_wide_out_req_o,
.axi_wide_out_rsp_i,
.floo_req_i,
.floo_rsp_o,
.floo_req_o,
.floo_rsp_i,
.floo_wide_o,
.floo_wide_i
);

endmodule
21 changes: 21 additions & 0 deletions test/floo_test_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// Tim Fischer <[email protected]>

`include "floo_noc/typedef.svh"

package floo_test_pkg;

typedef enum {
Expand All @@ -12,4 +14,23 @@ package floo_test_pkg;
MixedSlave
} slave_type_e;

localparam int unsigned NumX = 4;
localparam int unsigned NumY = 4;

// Chimney parameters
localparam bit CutAx = 1'b1;
localparam bit CutRsp = 1'b0;
localparam int unsigned MaxTxnsPerId = 16;
localparam bit RoBSimple = 1'b0;
localparam int unsigned ReorderBufferSize = 32'd64;
// Narrow Wide Chimney parameters
localparam bit NarrowRoBSimple = 1'b1;
localparam int unsigned NarrowMaxTxnsPerId = 4;
localparam int unsigned NarrowReorderBufferSize = 32'd256;
localparam bit WideRoBSimple = 1'b0;
localparam int unsigned WideMaxTxnsPerId = 32;
localparam int unsigned WideReorderBufferSize = 32'd128;

`FLOO_NOC_TYPEDEF_XY_ID_T(xy_id_t, NumX, NumY)

endpackage

0 comments on commit f1c556e

Please sign in to comment.