- Joined
- Sep 17, 2001
- Location
- Orange County
We finished the data subsystem of the cpu, so I just thought I'd share the top level schematic for the data subsystem. The blocks represent multiplexors, register files, ALUs, lists of static constants (8 bit numbers), and a couple bits and pieces to simulate the program counter and memory since that hasn't been done yet.
click me
The massive bundle of lines going from one box to the other is 8 individual 8 bit busses so that all 8 of our registers can be read simultaneously. By doing this, we dramatically decreased the number of cpu cycles required to perform certain operations. For example, one of the things in the programs we must run is to read an array of 63 bytes of memory, each containing a number 0-5, then sort them and output the median number into memory. Instead of doing tons of loops for sorting and such, there were 6 registers used to accumulate the values. Every time a 0 was found, r0 would increment. Every time a 5 is found, r5 is incremented. Once we got all these values into the registers, we would read all 6 registers at once, then run it through some logic to output the number that is the median number. It really is perdy darn cool.
By doing stuff like this, we managed to minimize the dynamic instruction count of the programs meant to be executed. (each operation, btw, can only write to 1 register or 1 memory location at a time --part of the specs). We spoke with one guy in the class, and he said the dynamic instruction count of all of his programs combined was something like 1500 instructions. Ours was about 350.
click me
The massive bundle of lines going from one box to the other is 8 individual 8 bit busses so that all 8 of our registers can be read simultaneously. By doing this, we dramatically decreased the number of cpu cycles required to perform certain operations. For example, one of the things in the programs we must run is to read an array of 63 bytes of memory, each containing a number 0-5, then sort them and output the median number into memory. Instead of doing tons of loops for sorting and such, there were 6 registers used to accumulate the values. Every time a 0 was found, r0 would increment. Every time a 5 is found, r5 is incremented. Once we got all these values into the registers, we would read all 6 registers at once, then run it through some logic to output the number that is the median number. It really is perdy darn cool.
By doing stuff like this, we managed to minimize the dynamic instruction count of the programs meant to be executed. (each operation, btw, can only write to 1 register or 1 memory location at a time --part of the specs). We spoke with one guy in the class, and he said the dynamic instruction count of all of his programs combined was something like 1500 instructions. Ours was about 350.
Last edited: