Skip to content

Commit

Permalink
configs: changed CHI --noc-config format
Browse files Browse the repository at this point in the history
Changed format from yaml to plain python. The new py configuration
file, when provided, must specialize the CHI node types defined in
configs/ruby/CHI_config.py (moved from configs/ruby/CHI.py). This
is required in order to setup the node->router bindings when the
CustomMesh topology is used.

See configs/example/noc_config/2x4.py (replaces
configs/example/noc_config/2x4.yaml) for an example.

--noc-config was also renamed to --chi-config, since the CHI node types
can be fully specialized in the configuration file.

Change-Id: Ic0c5407dba3d2483d5c30634c115b5410a5228fd
Signed-off-by: Tiago Mück <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43123
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
  • Loading branch information
tiagormk committed Mar 18, 2021
1 parent 377a966 commit 21dfaa4
Show file tree
Hide file tree
Showing 4 changed files with 760 additions and 694 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,38 +33,45 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# 2x4 mesh definition
from ruby import CHI_config

# CustomMesh parameters for a 2x4 mesh. Routers will have the following layout:
#
# 0 --- 1 --- 2 --- 3
# | | | |
# 4 --- 5 --- 6 --- 7
#
mesh:
num_rows : 2
num_cols : 4
router_latency : 1
link_latency : 1
# Default parameter are configs/ruby/CHI_config.py
#
class NoC_Params(CHI_config.NoC_Params):
num_rows = 2
num_cols = 4

# Specialization of nodes to define bindings for each CHI node type
# needed by CustomMesh.
# The default types are defined in CHI_Node and their derivatives in
# configs/ruby/CHI_config.py

# Bindings for each CHI node type.
class CHI_RNF(CHI_config.CHI_RNF):
class NoC_Params(CHI_config.CHI_RNF.NoC_Params):
router_list = [1, 2, 5, 6]

CHI_RNF:
# Uncomment to map num_nodes_per_router RNFs in each provided router,
# assuming num. created CHI_RNFs == len(router_list)*num_nodes_per_router
# num_nodes_per_router: 1
router_list: [1, 2, 5, 6]
class CHI_HNF(CHI_config.CHI_HNF):
class NoC_Params(CHI_config.CHI_HNF.NoC_Params):
router_list = [1, 2, 5, 6]

CHI_HNF:
# num_nodes_per_router: 1
router_list: [1, 2, 5, 6]
class CHI_SNF_MainMem(CHI_config.CHI_SNF_MainMem):
class NoC_Params(CHI_config.CHI_SNF_MainMem.NoC_Params):
router_list = [0, 4]

CHI_SNF_MainMem:
# num_nodes_per_router: 1
router_list: [0, 4]
class CHI_SNF_BootMem(CHI_config.CHI_SNF_BootMem):
class NoC_Params(CHI_config.CHI_SNF_BootMem.NoC_Params):
router_list = [3]

# Applies to CHI_SNF_BootMem and possibly other non-main memories
CHI_SNF_IO:
router_list: [3]
class CHI_RNI_DMA(CHI_config.CHI_RNI_DMA):
class NoC_Params(CHI_config.CHI_RNI_DMA.NoC_Params):
router_list = [7]

# Applies to CHI_RNI_DMA and CHI_RNI_IO
CHI_RNI_IO:
router_list: [7]
class CHI_RNI_IO(CHI_config.CHI_RNI_IO):
class NoC_Params(CHI_config.CHI_RNI_IO.NoC_Params):
router_list = [7]
Loading

0 comments on commit 21dfaa4

Please sign in to comment.