About This Project
This project consists of the design of a computer for statistical analyses based on a Store/Load type architecture. The system is able to insert, delete and sort data (real numbers), and is also able to find some statistical information for the data, including maximum, minimum, mean, mode, median, and standard deviation.
The data for statistical analysis are assumed to be stored sequentially in memory in an array of floating-point numbers. The computer we design is capable of carrying out the high level commands for statistical analysis:
The project has two stages. The first stage consists of the design a set of instructions based on the design of memory addressing mode, data types, instruction, data and register size, register set, instruction format, address modes, and assembly programs for each high level program. The second stage, as described here, is to specify the state diagram for the control unit of our machine, to calculate the CPI for our computer and to implement a piece of software for the state diagram of the computer.
User Interface
Current Command
Current Instruction
Current State Description
Data Memory
Registers
State Diagram
UI control
Current Command
That shows current command. There are nine sorts of commands: Insert data item, Delete data item, Sort data , Find maximum, Find minimum, Find mean of all the data items, Find median of all the data items, Find mode of the data items, and Find standard deviation of the data items. For more detail information of the function, please refer to the About This Project. The format of current command will be as following:
Insert Data Item
INS <number>
Delete Data Item
DEL <position #>
Sort Data
SORT
Find Maximum
FMAX
Find Minimum
FMIN
Find Mean of all the Data Items
FMEAN
Find Median of all the Data Items
FMEDIAN
Find Mode of the Data Items
FMODE
Find standard Deviation of the Data Items
FSD
All command will be displayed in text type.
While the command is coming up in the text box of current command, the page also shows the corresponding operation , such as current instruction , current state description, the contents of data memory and registers , and the activated cycles in state diagram simultaneously step by step controlled by user. </A>
Current Instruction
Showing the assembly code in "just right now step" on operating the data. For example: If the current instruction is the first step on assembly code of insertion data, it will be displayed as " INS: storef $fio, $ds " in the text box right below "Current Instruction".
For more detail information of the instruction format and option description please refer the user menu.
Current State Description
Showing the corresponding information for the currently activated cycles in state diagram. For example : Assuming now is cycle S4 activated in state diagram, and the description of its function and action destination will show up in the text box right below "Current State Description" as : Execution of div, Consisting of Several States .
Data Memory
"Data Memory" is a table which contains a list of value to indicate what insides the memory so far during the program execution.
Registers
"Registers" is a table which contains a list of value. Each value indicate what insides the register so far during the program execution. The left-hand-side of table showing all registers :$ds, $i0, $i1, $i2, $f0, $f1, $f2, $iv, $fv, $iio, $fio, $ir. $pc, $ra, $sp, and $1 that we are using in our machine design. For more detail information of the registers, such as their role and function , please refer to user menu.
State Diagram
It is a multiple cycles linked to each other marked by S1, S2,…Sn. which is displayed on run time. Each cycle is represented one state in state diagram. While the cycles are not the current states, they are the same color with background . While the cycles are the current states, they will be colored as red.
UI control
All bottoms that shown on web page need mouse support, they are not support key board input. You just need single click on the bottom you desired.
Executing Program
Step 1
Step 2
Step 3
Step 1® Press button [Sample 1] or Press button [Sample 2]
You can load the sample file for starting
During the operation of one of sample file , the other button is disabled to indicate which program you are
exactly running now.
The sample file contains information as following :
A. Sample 1
<Sample commands #1>
INS 10.2
INS 12.5
INS 17.0
INS 8.90002
INS 170.89
INS 22.55
MAX
MIN
DEL 1
MIN
FMEAN
FMEDIAN
FSD
SORT
B. Sample 2
<Sample commands #2>
INS 20
INS 20
INS 30.9
INS 12.05
INS 17.5
INS 32
INS 90
INS 90
INS 90
INS 223
INS 45
INS 34.5
FMODE
DEL 7
FMODE
MIN
MAX
FMEAN
FMEDIAN
FSD
SORT
Step 2
® Press Button [Step]After loading sample, you can click on the "Step" button, the program will advance by one clock cycle. You have to keep on clicking until the program ends.
Then it will restart to the beginning before the sample file loading. , If you’d like to see this program again or choose to run the other program, you need to reload the sample file as pressing the button [Sample1] or [Sample2 ] again.
Step 3
® Button [ Reset ]If you click [reset], it means you will end the current program and back to the beginning that before you load any sample file. It will clean up all operation in every text box and table.