In this project you will design a four-bit general purpose microprocessor. Since it's a small processor, you don't need

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In this project you will design a four-bit general purpose microprocessor. Since it's a small processor, you don't need

Post by answerhappygod »

In This Project You Will Design A Four Bit General Purpose Microprocessor Since It S A Small Processor You Don T Need 1
In This Project You Will Design A Four Bit General Purpose Microprocessor Since It S A Small Processor You Don T Need 1 (108.47 KiB) Viewed 28 times
In this project you will design a four-bit general purpose microprocessor. Since it's a small processor, you don't need to use the pointers like stack pointer, global pointer, etc. The operation of a general purpose microprocessor involves three steps: • In step one the control unit fetches an instruction from memory. The memory location to be fetched is determined by the content of the program counter (PC) register. The instruction fetched from memory is copied into the instruction register (IR). The PC is then incremented by 1. In step two, the instruction that is in the IR is decoded. The control unit checks the encoding of the instruction to determine what instruction it is. The control unit perfoms the third state by simply asserting the appropriate control signals for controlling the datapath to execute the given instruction. • Instructions for the program are usually stored in external memory. To keep the design simple, instead of having externel memory, we will include the memory as part of the datapath. Figure 1 shows the overview of the corresponding microprocessor. Input CONTROL UNIT DATAPATH 1 PC fetch MEMORY N decode ALU II I II execute instruction Output Figure 1 The first three most significant bits of IR (7-bit) are corresponding to the operation code (opcode). The instructions that your microprocessor needs to execute and the corresponding encodings are defined in Table 1. OPCODE Operation IR 000 aaaa 000 Load data (aaaa) to Accumulator (A) Add INPUT and Accumulator (A) www Subtract INPUT from Accumulator (A) 001 xxxx 001 010 xxxx 010 011 xxxx 011 100 xxxx 100 Increment Accumulator (A) 101 xxxx 101 110 xxxx 110 Decrement Accumulator (A) INPUT AND Accumulator (A) INPUT OR Accumulator (A) INPUT 111 xxxx 111 XOR Accumulator (A) execute instruction | 1 000 Control Circuit: FSM s_load s.add s_sub s_inc Arithmetic Logic Unit (ALU): Selection Input 0 Operation A+B 0 0 0 0 1 A-B 0 1 C 0 A-1 0 1 1 A+1 1 0 0 A and B 1 0 A or B not A | 1 C 0 1 1 1 A xor B Write the VHDL code fo the given ciruit. Write the VHDL test bench. Force the inputs of IR (which are otherwise fetched from the program memory) so as to mimic the normal operation and test all the stages of operation. s start s_fetch s_deco IR IN | 1 +1 000 s_dec 5 and s_or 5.Xor
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply