Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a new opcode to generate a random number inside the processor ALU. This r

ID: 3581119 • Letter: C

Question

Create a new opcode to generate a random number inside the processor ALU. This requires: 1) to select an unused ALU opcode; 2) to implement a random number generator in VHDL using linear feedback shift registers; 3) to modify the processor ALU to add this new functionality; 4) to write a test the program. Report here the modifications and were made to the processor (provide VHDL code and explanations), specifically the implementation of the random number generator and the modifications to the processor ALU (and other modifications if required). Report the test program: provide the assembler code and the encoded instructions. Indicate the first 5 random numbers that you obtain.

Explanation / Answer

RANDGEN: ; generate a rand no using the system time RANDSTART: MOV AH, 00h ; interrupts to get system time INT 1AH ; CX:DX now hold number of clock ticks since midnight mov ax, dx xor dx, dx mov cx, 10 div cx ; here dx contains the remainder of the division - from 0 to 9 add dl, '0' ; to ascii from '0' to '9' mov ah, 2h ; call interrupt to display a value in DL int 21h RET

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote