Esempio n. 1
0
        public void PrepareForConfigGeneration()
        {
            if (Topology == TopologiesTypes.Mesh)
            {
                Mesh NewMesh = new Mesh(Int32.Parse(TopologyArguments[0]), Int32.Parse(TopologyArguments[1]));
                NewMesh.CreateNetlist();
                NewMesh.CreateRouting(Algorithm);

                TopologyNetlist     = Common.MatrixToString(NewMesh.GetNetlist());
                TopologyRouting     = Common.MatrixToString(NewMesh.GetRouting());
                TopologyDescription = Topology + "-(" + TopologyArguments[0] + ", " + TopologyArguments[1] + ")";
            }
            else if (Topology == TopologiesTypes.Torus)
            {
                Torus NewTorus = new Torus(Int32.Parse(TopologyArguments[0]), Int32.Parse(TopologyArguments[1]));
                NewTorus.CreateNetlist();
                NewTorus.CreateRouting();

                TopologyNetlist     = Common.MatrixToString(NewTorus.GetNetlist());
                TopologyRouting     = Common.MatrixToString(NewTorus.GetRouting());
                TopologyDescription = Topology + "-(" + TopologyArguments[0] + ", " + TopologyArguments[1] + ")";
            }
            else if (Topology == TopologiesTypes.Circulant)
            {
                Circulant NewCirculant = new Circulant(Int32.Parse(TopologyArguments[0]), Int32.Parse(TopologyArguments[1]), Int32.Parse(TopologyArguments[2]));
                NewCirculant.CreateNetlist();
                NewCirculant.CreateRouting(NewCirculant.AdjacencyMatrix(NewCirculant.GetNetlist(), Int32.Parse(TopologyArguments[0])), NewCirculant.GetNetlist(), Algorithm, AlgorithmArguments);

                TopologyNetlist     = Common.MatrixToString(NewCirculant.GetNetlist());
                TopologyRouting     = Common.MatrixToString(NewCirculant.GetRouting());
                TopologyDescription = Topology + "-(" + TopologyArguments[0] + ", " + TopologyArguments[1] + ", " + TopologyArguments[2] + ")";
            }
            else if (Topology == TopologiesTypes.OptimalCirculant)
            {
                Circulant NewCirculant = new Circulant(Int32.Parse(TopologyArguments[0]));
                NewCirculant.CreateNetlist();
                NewCirculant.CreateRouting(NewCirculant.AdjacencyMatrix(NewCirculant.GetNetlist(), Int32.Parse(TopologyArguments[0])), NewCirculant.GetNetlist(), Algorithm, AlgorithmArguments);

                TopologyNetlist     = Common.MatrixToString(NewCirculant.GetNetlist());
                TopologyRouting     = Common.MatrixToString(NewCirculant.GetRouting());
                TopologyDescription = Topology + "-(" + TopologyArguments[0] + ", " + NewCirculant.S1.ToString() + ", " + NewCirculant.S2.ToString() + ")";
            }
        }