pulp-platform / FlooNoC

A Fast, Low-Overhead On-chip Network
Apache License 2.0
115 stars 17 forks source link

Generating 2x2 mesh without array as endpoint #55

Open mubashir913 opened 1 month ago

mubashir913 commented 1 month ago

I am trying to generate 2x2 mesh without using array as endpoint because the address range is different and subordinate ports are also different. Following is the yml file:

name: 2x2
description: "2x2 Interconnect"

routing:
  route_algo: "XY"
  use_id_table: true

protocols:
  - name: "narrow"
    type: "AXI4"
    direction: "manager"
    data_width: 64
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "narrow"
    type: "AXI4"
    direction: "subordinate"
    data_width: 64
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "wide"
    type: "AXI4"
    direction: "manager"
    data_width: 1024
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "wide"
    type: "AXI4"
    direction: "subordinate"
    data_width: 1024
    addr_width: 64
    id_width: 4
    user_width: 1

endpoints:
  - name: "c_0"
    addr_range:
      start: 0x0000_0000
      end: 0x0001_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
      - "narrow"
  - name: "c_1"
    addr_range:
      start: 0x00001_0000
      end: 0x0005_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
  - name: "c_2"
    addr_range:
      start: 0x0005_0000
      end: 0x0006_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
      - "narrow"
  - name: "c_3"
    addr_range:
      start: 0x0006_0000
      end: 0x0009_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"

routers:
  - name: "router"
    array: [2, 2]

connections:
  - src: "c_0"
    dst: "router"
    dst_idx: [0, 0]
    bidirectional: true
  - src: "c_1"
    dst: "router"
    dst_idx: [0, 1]
    bidirectional: true
  - src: "c_2"
    dst: "router"
    dst_idx: [1, 0]
    bidirectional: true
  - src: "c_3"
    dst: "router"
    dst_idx: [1, 1]
    bidirectional: true

I am getting this error:

err

mubashir913 commented 1 month ago

I changed the yml file to make separate routers. Now the files are being generated without any errors but all the routers and chimneys have id (0, 0) and the routers and not connected to each other. How to solve this?

Following is the yml file:

name: 2x2
description: "2x2 Interconnect"

routing:
  route_algo: "XY"
  use_id_table: true

protocols:
  - name: "narrow"
    type: "AXI4"
    direction: "manager"
    data_width: 64
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "narrow"
    type: "AXI4"
    direction: "subordinate"
    data_width: 64
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "wide"
    type: "AXI4"
    direction: "manager"
    data_width: 1024
    addr_width: 64
    id_width: 4
    user_width: 1
  - name: "wide"
    type: "AXI4"
    direction: "subordinate"
    data_width: 1024
    addr_width: 64
    id_width: 4
    user_width: 1

endpoints:
  - name: "c_0"
    addr_range:
      start: 0x0000_0000
      end: 0x0001_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
      - "narrow"
  - name: "c_1"
    addr_range:
      start: 0x00001_0000
      end: 0x0005_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
  - name: "c_2"
    addr_range:
      start: 0x0005_0000
      end: 0x0006_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"
      - "narrow"
  - name: "c_3"
    addr_range:
      start: 0x0006_0000
      end: 0x0009_0000
    mgr_port_protocol:
      - "narrow"
      - "wide"
    sbr_port_protocol:
      - "wide"

routers:
  - name: "router_0_0"
  - name: "router_0_1"
  - name: "router_1_0"
  - name: "router_1_1"

connections:
  - src: "c_0"
    dst: "router_0_0"
    bidirectional: true
  - src: "c_1"
    dst: "router_0_1"
    bidirectional: true
  - src: "c_2"
    dst: "router_1_0"
    bidirectional: true
  - src: "c_3"
    dst: "router_1_1"
    bidirectional: true