Skip to content

Commit

Permalink
multicast function
Browse files Browse the repository at this point in the history
  • Loading branch information
msc23h25 Mingrui Yuan (minyuan) committed Jul 15, 2024
1 parent 90bb965 commit ecc6d01
Show file tree
Hide file tree
Showing 10 changed files with 878 additions and 112 deletions.
202 changes: 172 additions & 30 deletions hw/floo_narrow_wide_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ package floo_narrow_wide_pkg;
localparam route_algo_e RouteAlgo = XYRouting;
localparam bit UseIdTable = 1'b1;
localparam int unsigned NumXBits = 2;
localparam int unsigned NumXEP = 4; //
localparam int unsigned NumYBits = 2;
localparam int unsigned XYAddrOffsetX = 16;
localparam int unsigned XYAddrOffsetY = 18;
localparam int unsigned NumYEP = 4; //
localparam int unsigned XYAddrOffsetX = 33;
localparam int unsigned XYAddrOffsetY = 35;
localparam int unsigned IdAddrOffset = 0;


Expand All @@ -117,12 +119,11 @@ package floo_narrow_wide_pkg;
typedef logic route_t;
typedef id_t dst_t;


/////////////////////
// Address Map //
/////////////////////

localparam int unsigned SamNumRules = 4;
localparam int unsigned SamNumRules = 16;

typedef struct packed {
id_t idx;
Expand Down Expand Up @@ -153,58 +154,199 @@ package floo_narrow_wide_pkg;
} hdr_t;

localparam sam_rule_t [SamNumRules-1:0] Sam = '{
'{
idx: '{x: 0, y: 0},
start_addr: 48'h000010000000,
end_addr: 48'h000020000000
}, // cluster_ni_0_0
'{
idx: '{x: 0, y: 1},
start_addr: 48'h000020000000,
end_addr: 48'h000030000000
}, // cluster_ni_0_1
'{
idx: '{x: 0, y: 2},
start_addr: 48'h000030000000,
end_addr: 48'h000040000000
}, // cluster_ni_0_2
'{
idx: '{x: 0, y: 3},
start_addr: 48'h000040000000,
end_addr: 48'h000050000000
}, // cluster_ni_0_3
'{
idx: '{x: 1, y: 0},
start_addr: 48'h000050000000,
end_addr: 48'h000060000000
}, // cluster_ni_1_0
'{
idx: '{x: 1, y: 1},
start_addr: 48'h000060000000,
end_addr: 48'h000070000000
}, // cluster_ni_1_1
'{
idx: '{x: 1, y: 2},
start_addr: 48'h0000_0000_0000,
end_addr: 48'h0000_0fff_ffff
}, // cluster1_ni
start_addr: 48'h000070000000,
end_addr: 48'h000080000000
}, // cluster_ni_1_2
'{
idx: '{x: 1, y: 3},
start_addr: 48'h000080000000,
end_addr: 48'h000090000000
}, // cluster_ni_1_3
'{
idx: '{x: 2, y: 0},
start_addr: 48'h000090000000,
end_addr: 48'h0000a0000000
}, // cluster_ni_2_0
'{
idx: '{x: 2, y: 1},
start_addr: 48'h0000_1000_0000,
end_addr: 48'h0000_1fff_ffff
}, // cluster2_ni
start_addr: 48'h0000a0000000,
end_addr: 48'h0000b0000000
}, // cluster_ni_2_1
'{
idx: '{x: 1, y: 0},
start_addr: 48'h0000_2000_0000,
end_addr: 48'h0000_2fff_ffff
}, // cluster3_ni
idx: '{x: 2, y: 2},
start_addr: 48'h0000b0000000,
end_addr: 48'h0000c0000000
}, // cluster_ni_2_2
'{
idx: '{x: 0, y: 1},
start_addr: 48'h0000_3000_0000,
end_addr: 48'h0000_3fff_ffff
} // cluster4_ni
idx: '{x: 2, y: 3},
start_addr: 48'h0000c0000000,
end_addr: 48'h0000d0000000
}, // cluster_ni_2_3
'{
idx: '{x: 3, y: 0},
start_addr: 48'h0000d0000000,
end_addr: 48'h0000e0000000
}, // cluster_ni_3_0
'{
idx: '{x: 3, y: 1},
start_addr: 48'h0000e0000000,
end_addr: 48'h0000f0000000
}, // cluster_ni_3_1
'{
idx: '{x: 3, y: 2},
start_addr: 48'h0000f0000000,
end_addr: 48'h000100000000
}, // cluster_ni_3_2
'{
idx: '{x: 3, y: 3},
start_addr: 48'h000100000000,
end_addr: 48'h000110000000
} // cluster_ni_3_3

};

// id_t [SamNumRules:0] id_lut = '{
// '{x: 0, y: 0}, // idle position
// '{x: 0, y: 1},
// '{x: 1, y: 0},
// '{x: 2, y: 1},

Check warning on line 244 in hw/floo_narrow_wide_pkg.sv

View workflow job for this annotation

GitHub Actions / verible-verilog-lint

[verible-verilog-lint] hw/floo_narrow_wide_pkg.sv#L244

Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]
Raw output
message:"Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]" location:{path:"./hw/floo_narrow_wide_pkg.sv" range:{start:{line:244 column:22}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"} suggestions:{range:{start:{line:244 column:22} end:{line:245}} text:"  //   '{x: 2, y: 1},\n"}
// '{x: 1, y: 2}
// };

localparam mask_rule_t [SamNumRules-1:0] SamMask = '{
'{
idx: 0,
coord: '{x: 1, y: 2},
addr: 48'h0000_0000_0000,
coord: '{x: 0, y: 0},
addr: 48'h0000_1000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster1_ni
}, // cluster0_ni_0_0
'{
idx: 1,
coord: '{x: 2, y: 1},
addr: 48'h0000_1000_0000,
coord: '{x: 0, y: 1},
addr: 48'h0000_2000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster2_ni
}, // cluster_ni_0_1
'{
idx: 2,
coord: '{x: 1, y: 0},
addr: 48'h0000_2000_0000,
coord: '{x: 0, y: 2},
addr: 48'h0000_3000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster3_ni
}, // cluster_ni_0_2
'{
idx: 3,
coord: '{x: 0, y: 1},
addr: 48'h0000_3000_0000,
coord: '{x: 0, y: 3},
addr: 48'h0000_4000_0000,
mask: 48'h0000_0fff_ffff
} // cluster4_ni
}, // cluster_ni_0_3
'{
idx: 4,
coord: '{x: 1, y: 0},
addr: 48'h0000_5000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_1_0
'{
idx: 5,
coord: '{x: 1, y: 1},
addr: 48'h0000_6000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_1_1
'{
idx: 6,
coord: '{x: 1, y: 2},
addr: 48'h0000_7000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_1_2
'{
idx: 7,
coord: '{x: 1, y: 3},
addr: 48'h0000_8000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_1_3
'{
idx: 8,
coord: '{x: 2, y: 0},
addr: 48'h0000_9000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_2_0
'{
idx: 9,
coord: '{x: 2, y: 1},
addr: 48'h0000_a000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_2_1
'{
idx: 10,
coord: '{x: 2, y: 2},
addr: 48'h0000_b000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_2_2
'{
idx: 11,
coord: '{x: 2, y: 3},
addr: 48'h0000_c000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_2_3
'{
idx: 12,
coord: '{x: 3, y: 0},
addr: 48'h0000_d000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_3_0
'{
idx: 13,
coord: '{x: 3, y: 1},
addr: 48'h0000_e000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_3_1
'{
idx: 14,
coord: '{x: 3, y: 2},
addr: 48'h0000_f000_0000,
mask: 48'h0000_0fff_ffff
}, // cluster_ni_3_2
'{
idx: 15,
coord: '{x: 3, y: 3},
addr: 48'h0001_0000_0000,
mask: 48'h0000_0fff_ffff
} // cluster_ni_3_3

};



////////////////////////
// Flits Typedefs //
////////////////////////
Expand Down
8 changes: 8 additions & 0 deletions hw/floo_narrow_wide_pkg.sv.bkp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ package floo_narrow_wide_pkg;

};

id_t [SamNumRules:0] id_lut = '{
'{x: 0, y: 0}, // idle position
'{x: 0, y: 1},
'{x: 1, y: 0},
'{x: 2, y: 1},
'{x: 1, y: 2}
};

localparam mask_rule_t [SamNumRules-1:0] SamMask = '{
'{
idx: 0,
Expand Down
Loading

0 comments on commit ecc6d01

Please sign in to comment.