| As the core component of embedded systems, embedded microprocessor is very important. Stackprocessor is specially designed for embedded control. The operations of stack processor all depend onstacks, not general-purpose registers. Compared to traditional RISC and CISC processors, the stackprocessor has the following three advantages:(1) avoiding context switching overhead; it’s becauseprocessor’s operations do not depend on general-purpose registers;(2) simple addressing mode; it’sbecause almost all instructions have zero-operand;(3) being more suitable for executing heavilyrecursive or nested programs; it’s because the subroutine calls and returns are performed by ahardware supported stack. Presently, threre are a few studies on the stack processor in China.Therefore, it’s very important to study and design a high-performance stack processor.This thesis focuses on stack processor on two aspects: design and application. On the aspect ofdesign, a16-bit single-cycle stack processor based on FPGA has been designed. The processor hastwo stacks: a data stack for evaluating mathematical expression and a return stack for callingsubroutine, and has the advantages of compactness, low complexity, high performance and small codesize. To improve the performance of the single-cycle stack processor, pipeline technique is introduced,and a three-stage pipelined stack processor is designed. The hazards caused by the pipeline are alsodiscussed and resolved. On the aspect of application, SOPCs are constructed with the single-cyclestack processor and the pipeline stack processor as the cores respectively. The SOPCs have thecomponents of bus controller, interrupt controller, and the other peripherals. The architecture of theSOPCs is introduced, and the functions of the peripherals are also described. The stack processors cancontrol the interrupt controller and all of the peripherals by memory-access instructions.The designs in this thesis are all described by Verilog HDL on the RTL level, simulated byModelSim, and synthesized by Synplify. The simulation and synthesis results show that the stackprocessors and the SOPCs functions correctly. And it comes out that the single-cycle stack processorand the pipeline stack processor are able to run up to146.7MHz and257.1MHz respectively onXC5VLX110T. The results are better than similar designs by others, so the performance issatisfactory. |