コード例 #1
0
        public VisFileContainer(string filename)
        {
            _filepath = filename;
            VisFileReader vfreader = new VisFileReader(_filepath);

            systemParameters = vfreader.ReadSystemData();
            if (systemParameters == null)
            {
                throw new NullReferenceException("Error reading vis file");
            }

            deviceParameters = vfreader.ReadDeviceData(null);
            if (deviceParameters == null)
            {
                throw new NullReferenceException("Error reading vis file");
            }

            _valueTable  = new Dictionary <string, List <decimal> >();
            plotTable    = new Dictionary <string, List <MyLinePlot> >();
            barPlotTable = new Dictionary <string, List <BarPlot> >();

            vfreader.ReadEpochData(_valueTable);
            vfreader.ReadHistogramData(_valueTable);
            this.MakeGraphsFromValueTable();
        }
コード例 #2
0
        public VisFileContainer(string filename)
        {
            _filepath = filename;
            VisFileReader vfreader = new VisFileReader(_filepath);

            systemParameters = vfreader.ReadSystemData();
            if(systemParameters==null)
            {
                throw new NullReferenceException("Error reading vis file");
            }

            deviceParameters = vfreader.ReadDeviceData(null);
            if(deviceParameters==null)
            {
                throw new NullReferenceException("Error reading vis file");
            }

            _valueTable = new Dictionary<string, List<decimal>>();
            plotTable = new Dictionary<string, List<MyLinePlot>>();
            barPlotTable = new Dictionary<string, List<BarPlot>>();

            vfreader.ReadEpochData(_valueTable);
            vfreader.ReadHistogramData(_valueTable);
            this.MakeGraphsFromValueTable();
        }
コード例 #3
0
        private void DeviceComboBox_IndexChanged(object sender, EventArgs e)
        {
            selectedDeviceName = deviceComboBox.SelectedText;
            VisFileReader vfr = new VisFileReader(DRAMSimPath + "/ini/" + selectedDeviceName);

            deviceParameters = vfr.ReadDeviceData(DRAMSimPath + "/ini/" + selectedDeviceName);
            if (deviceParameters == null)
            {
                Console.WriteLine("wtf");
            }

            devicePropertyGrid.SelectedObject = null;
            devicePropertyGrid.SelectedObject = deviceParameters;

            ((SystemParameters)(systemPropertyGrid.SelectedObject)).TOTAL_STORAGE = (long)(systemParameters.JEDEC_DATA_BUS_BITS / deviceParameters.DEVICE_WIDTH) * systemParameters.NUM_RANKS *
                                                                                    ((long)deviceParameters.NUM_ROWS * deviceParameters.NUM_COLS * deviceParameters.DEVICE_WIDTH * deviceParameters.NUM_BANKS) / 8;
            systemPropertyGrid.Refresh();
        }
コード例 #4
0
ファイル: Visualizer.cs プロジェクト: zhuzongwei/DRAMVis
        private void DeviceComboBox_IndexChanged(object sender, EventArgs e)
        {
            selectedDeviceName = deviceComboBox.SelectedText;
            VisFileReader vfr = new VisFileReader(DRAMSimPath + "/ini/" + selectedDeviceName);
            deviceParameters = vfr.ReadDeviceData(DRAMSimPath + "/ini/" + selectedDeviceName);
            if (deviceParameters == null)
            {
                Console.WriteLine("wtf");
            }

            devicePropertyGrid.SelectedObject = null;
            devicePropertyGrid.SelectedObject = deviceParameters;

            ((SystemParameters)(systemPropertyGrid.SelectedObject)).TOTAL_STORAGE = (long)(systemParameters.JEDEC_DATA_BUS_BITS / deviceParameters.DEVICE_WIDTH) * systemParameters.NUM_RANKS *
                ((long)deviceParameters.NUM_ROWS * deviceParameters.NUM_COLS * deviceParameters.DEVICE_WIDTH * deviceParameters.NUM_BANKS) / 8;
            systemPropertyGrid.Refresh();
        }