Because of specs given to us, when our processer does a shift left and shift right it can only shift by one. So on our hardware doing the add instruction or doing a shift left to impliment the multiplication is actually the exact same speed.
To respond to why it took 9000 lines of VHDL code. One of our key design goals was to have this run on hardware. VHDL is a very complicated language that is very powerful, and then comes the part of VHDL that is an IEEE standard for going to hardware. That part of VHDL is only the simple features and so that was our reason for only using the very simple features of VHDL. We wanted to know for sure that the design would be able to drop down onto an FPGA. We didn't want a processor that would only work in simulation or would only compile down with one tool.
This wasn't a project to show off that we know how to program VHDL in a fancy way. Rather it was to show that we can quickly design a computer. This was the first time that we had used VHDL and when we started the project we did not have the FPGA's to test our design on. So we decided that we would only use the simplest subset of VHDL. Our goal was to go from nothing to a finished project in two months. We viewed using complex VHDL features that might not compile to hardware.
We succeded in getting the project done in two months as a part-time school project. Including hardware design. A complete test framework, two games, and a final report. I think when you say "The entire project was just poorly thought though" you are not judging the project according to our design goals.
>How exactly does CASM differ from C? I don't see any ASM type code in there, it just looks like C. I realize that it isn't quite C, but hmmm... I'm interested in more details about the compiler/processor
The question should actually be how does CASM differ from C++. The way it works is you write a CASM program and you compile the program using a C++ compiler and you include the CASM library files. And then when you execute the compiled program it emmits ASCII 1's and 0's that is then passed through another tool that traslates it into a format that the XESS loading program wants.
So CASM the programming language is a series of C++ functions and classes. The functions maintain state, like the cr16_while(expression expr) function. so when they are called they can emit the correct machine code. And we overload the operators so things like "a+b" will then in turn call the function add which will in turn emit machine code to do the add.
We do actually have ASM functions for adding and moving and the rest of our instruction set. Except I don't use those functions much in tetris. There is a couple of times that I do call the lshi function for left shift.
Does that help explain CASM better? If not then let me know.
The processor is a custom design with seperate memory busses for data memory and program memory to give us better speed, and allow our 5-stage pipeline to run at full speed. We also developed a significant amount of software to go along with the system. We made our CASM cross-compiler and we also had a fully automatted test framework so you could type "make test" and the CASM system would automatically compile down all of the CASM test programs and run them in a simulated version of the processor and then CASM supported an "expected result" directive. So after the test ran it would check the actual result with the expected result.
We did the project from start to finish in two months, finishing a month before the end of the semester.
True we didn't do anything that will revolutionize the industry or anything. But 40 years ago I don't think this project could have been done as a part time school project in two months time.
> Looks more like Galaga to me. If you're going to use trademarked titles, why not use the right ones?
We just thought of the game as being a Space Invaders type game. And we didn't remember Galaga.
> Impressive! But just how is it different from an off-the-shelf chip soldered onto an off-the-shelf board with some extra coding on your part?
We do run on an off-the-shelf FPGA, which is a grid of and gates, or gates, and not gates.
The key thing is that we designed and wrote the processor, the toolchain, and the games ourselves. And we went from start to finish on the project in two months.
The course website will be available until summer 2003.
Because of specs given to us, when our processer does a shift left and shift right it can only shift by one. So on our hardware doing the add instruction or doing a shift left to impliment the multiplication is actually the exact same speed.
This wasn't a project to show off that we know how to program VHDL in a fancy way. Rather it was to show that we can quickly design a computer. This was the first time that we had used VHDL and when we started the project we did not have the FPGA's to test our design on. So we decided that we would only use the simplest subset of VHDL. Our goal was to go from nothing to a finished project in two months. We viewed using complex VHDL features that might not compile to hardware.
We succeded in getting the project done in two months as a part-time school project. Including hardware design. A complete test framework, two games, and a final report. I think when you say "The entire project was just poorly thought though" you are not judging the project according to our design goals.
The question should actually be how does CASM differ from C++. The way it works is you write a CASM program and you compile the program using a C++ compiler and you include the CASM library files. And then when you execute the compiled program it emmits ASCII 1's and 0's that is then passed through another tool that traslates it into a format that the XESS loading program wants.
So CASM the programming language is a series of C++ functions and classes. The functions maintain state, like the cr16_while(expression expr) function. so when they are called they can emit the correct machine code. And we overload the operators so things like "a+b" will then in turn call the function add which will in turn emit machine code to do the add.
We do actually have ASM functions for adding and moving and the rest of our instruction set. Except I don't use those functions much in tetris. There is a couple of times that I do call the lshi function for left shift.
Does that help explain CASM better? If not then let me know.
The processor is a custom design with seperate memory busses for data memory and program memory to give us better speed, and allow our 5-stage pipeline to run at full speed. We also developed a significant amount of software to go along with the system. We made our CASM cross-compiler and we also had a fully automatted test framework so you could type "make test" and the CASM system would automatically compile down all of the CASM test programs and run them in a simulated version of the processor and then CASM supported an "expected result" directive. So after the test ran it would check the actual result with the expected result. We did the project from start to finish in two months, finishing a month before the end of the semester. True we didn't do anything that will revolutionize the industry or anything. But 40 years ago I don't think this project could have been done as a part time school project in two months time.
> Looks more like Galaga to me. If you're going to use trademarked titles, why not use the right ones? We just thought of the game as being a Space Invaders type game. And we didn't remember Galaga.
> Impressive! But just how is it different from an off-the-shelf chip soldered onto an off-the-shelf board with some extra coding on your part? We do run on an off-the-shelf FPGA, which is a grid of and gates, or gates, and not gates. The key thing is that we designed and wrote the processor, the toolchain, and the games ourselves. And we went from start to finish on the project in two months.