public override void setup()
        {
            // boilerplate
            nodes = new Node[Config.N];
            cache = new CmpCache();
            ParseFinish(Config.finish);
            workload = new Workload(Config.traceFilenames);
            mapping  = new NodeMapping_AllCPU_SharedCache();

            _nics = new List <BufRingMultiNetwork_NIC>();
            _iris = new List <BufRingMultiNetwork_IRI>();

            links    = new List <Link>();
            _routers = new BufRingMultiNetwork_Router[Config.N];

            //Console.WriteLine("setup: N = {0}", Config.N);

            // create routers and nodes
            for (int n = 0; n < Config.N; n++)
            {
                Coord c = new Coord(n);
                nodes[n]    = new Node(mapping, c);
                _routers[n] = new BufRingMultiNetwork_Router(c);
                _routers[n].setNode(nodes[n]);
                nodes[n].setRouter(_routers[n]);
            }

            // for each copy of the network...
            for (int copy = 0; copy < Config.bufrings_n; copy++)
            {
                BufRingMultiNetwork_Coord c = new BufRingMultiNetwork_Coord(0, 0);
                BufRingMultiNetwork_IRI   iri;
                int count;
                setup_ring(c, 0, out iri, out count);
            }
        }
        public override void setup()
        {
            // boilerplate
            nodes = new Node[Config.N];
            cache = new CmpCache();
            ParseFinish(Config.finish);
            workload = new Workload(Config.traceFilenames);
            mapping = new NodeMapping_AllCPU_SharedCache();

            _nics = new List<BufRingMultiNetwork_NIC>();
            _iris = new List<BufRingMultiNetwork_IRI>();

            links = new List<Link>();
            _routers = new BufRingMultiNetwork_Router[Config.N];

            //Console.WriteLine("setup: N = {0}", Config.N);

            // create routers and nodes
            for (int n = 0; n < Config.N; n++)
            {
                Coord c = new Coord(n);
                nodes[n] = new Node(mapping, c);
                _routers[n] = new BufRingMultiNetwork_Router(c);
                _routers[n].setNode(nodes[n]);
                nodes[n].setRouter(_routers[n]);
            }

            // for each copy of the network...
            for (int copy = 0; copy < Config.bufrings_n; copy++) {
                BufRingMultiNetwork_Coord c = new BufRingMultiNetwork_Coord(0, 0);
                BufRingMultiNetwork_IRI iri;
                int count;
                setup_ring(c, 0, out iri, out count);
            }

        }
 public void setRouter(BufRingMultiNetwork_Router router)
 {
     _router = router;
 }
 public void setRouter(BufRingMultiNetwork_Router router)
 {
     _router = router;
 }