FlooNoC icon indicating copy to clipboard operation
FlooNoC copied to clipboard

Generating 2x2 mesh without array as endpoint

Open mubashir913 opened this issue 1 year ago • 2 comments

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 avatar Aug 06 '24 11:08 mubashir913

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

mubashir913 avatar Aug 06 '24 16:08 mubashir913

I fear this is currently not well supported. If you want to use XY routing, then you need to instantiate an array of routers and endpoints. Because FlooGen infers the coordinates based on the array indeces.

The other option would be to use a different routing algorithm, which does not use XY coordinates (SourceRouting or IdTable)

fischeti avatar Dec 02 '24 13:12 fischeti