Ejemplo n.º 1
0
        def __init__(self):
            configparser = ConfigParser()
            configparser['arch'] = {'num_pe': 4, 'num_fpga': 2}
            configparser['graph'] = {}
            configparser['app'] = {'algo': "bfs"}
            configparser['logging'] = {
                'log_file_name': "unittest_network",
                'disable_logfile': False
            }

            self.config = resolve_defaults(configparser,
                                           num_nodes=32,
                                           num_edges=32 * 4)
            self.graph = self.config.adj_dict

            self.submodules.dut = [
                MultiNetwork(self.config, fpga_id=i)
                for i in range(self.config.addresslayout.num_fpga)
            ]

            # inter-core communication
            for i in range(self.config.addresslayout.num_fpga):
                core_idx = 0
                for j in range(self.config.addresslayout.num_fpga - 1):
                    if i == j:
                        core_idx += 1
                    if j < i:
                        if_idx = i - 1
                    else:
                        if_idx = i
                    # print("Connecting core {} out {} to core {} in {}".format(i, j, core_idx, if_idx))
                    self.comb += self.dut[i].external_network_interface_out[
                        j].connect(self.dut[core_idx].
                                   external_network_interface_in[if_idx])
                    core_idx += 1
        def __init__(self):

            num_pe = 2

            config = configparser.ConfigParser()
            config['arch'] = { "num_pe": num_pe }
            config['graph'] = { "nodes": "15", "edges":"30" }
            config['app'] = { "algo": "pr" }
            config['logging'] = {}

            _, self.config = resolve_defaults(args=parse_cmd_args(['sim']), config=config, inverted=True)

            self.submodules.dut = [Neighbors(pe_id=i, config=self.config) for i in range(num_pe)]
        def __init__(self):

            config = configparser.ConfigParser()
            config['arch'] = { "num_pe": "1", "memtype": "HMCO"}
            config['graph'] = { "nodes": "15", "edges":"30" }
            config['app'] = { "algo": "sssp" }
            config['logging'] = {"disable_logfile" : True }

            self.config = resolve_defaults(config=config, inverted=False)

            self.adj_idx = self.config.adj_idx[0]



            self.config.platform = PicoPlatform(1, bus_width=32, stream_width=128, init=self.config.adj_val, init_elem_size_bytes=self.config.addresslayout.adj_val_entry_size_in_bytes)
            self.submodules.dut = Neighbors(pe_id=0, config=self.config)
Ejemplo n.º 4
0
        def __init__(self):
            configparser = ConfigParser()
            configparser['arch'] = {'num_pe': 8}
            configparser['graph'] = {}
            configparser['app'] = {'algo': "bfs"}
            configparser['logging'] = {
                'log_file_name': "unittest_network",
                'disable_logfile': False
            }

            self.config = resolve_defaults(configparser,
                                           num_nodes=32,
                                           num_edges=32 * 4)
            self.graph = self.config.adj_dict

            self.submodules.dut = [Network(self.config)]
        def __init__(self):

            num_pe = 2

            config = configparser.ConfigParser()
            config['arch'] = {"num_pe": num_pe}
            config['graph'] = {"nodes": "15", "edges": "30"}
            config['app'] = {"algo": "pr"}
            config['logging'] = {}

            _, self.config = resolve_defaults(args=parse_cmd_args(['sim']),
                                              config=config,
                                              inverted=True)

            self.submodules.dut = [
                Neighbors(pe_id=i, config=self.config) for i in range(num_pe)
            ]
        def __init__(self):

            config = configparser.ConfigParser()
            config['arch'] = { "num_pe": "1" }
            config['graph'] = { "nodes": "15", "edges":"30" }
            config['app'] = { "algo": "pr" }
            config['logging'] = {}

            _, self.config = resolve_defaults(args=parse_cmd_args(['sim']), config=config, inverted=False)

            # self.graph, ids = generate_graph(num_nodes=15, num_edges=30)
            # print(self.graph)

            # self.config = Config(self.graph, nodeidsize=32, edgeidsize=32, peidsize=2, num_pe=2, num_nodes_per_pe=16, max_edges_per_pe=64, num_channels=4, channel_bits=2)

            self.adj_idx = self.config.adj_idx[0]
            self.submodules.dut = Neighbors(pe_id=0, config=self.config)
Ejemplo n.º 7
0
        def __init__(self):

            config = configparser.ConfigParser()
            config['arch'] = {"num_pe": "1"}
            config['graph'] = {"nodes": "15", "edges": "30"}
            config['app'] = {"algo": "pr"}
            config['logging'] = {}

            _, self.config = resolve_defaults(args=parse_cmd_args(['sim']),
                                              config=config,
                                              inverted=False)

            # self.graph, ids = generate_graph(num_nodes=15, num_edges=30)
            # print(self.graph)

            # self.config = Config(self.graph, nodeidsize=32, edgeidsize=32, peidsize=2, num_pe=2, num_nodes_per_pe=16, max_edges_per_pe=64, num_channels=4, channel_bits=2)

            self.adj_idx = self.config.adj_idx[0]
            self.submodules.dut = Neighbors(pe_id=0, config=self.config)
        def __init__(self):

            config = configparser.ConfigParser()
            config['arch'] = {"num_pe": "1", "memtype": "HMCO"}
            config['graph'] = {"nodes": "15", "edges": "30"}
            config['app'] = {"algo": "sssp"}
            config['logging'] = {"disable_logfile": True}

            self.config = resolve_defaults(config=config, inverted=False)

            self.adj_idx = self.config.adj_idx[0]

            self.config.platform = PicoPlatform(
                1,
                bus_width=32,
                stream_width=128,
                init=self.config.adj_val,
                init_elem_size_bytes=self.config.addresslayout.
                adj_val_entry_size_in_bytes)
            self.submodules.dut = Neighbors(pe_id=0, config=self.config)