STRING CPU 1000A
2 Stars     55 Views    

Author: SJP4

Project access type: Public

Description:

I have made a new version of string series CPU. This new version has a minor change. When you toggle on EN, all registers and the PC will be reset. Please read before programming this CPU. 

/0. NOP- no instruction at this address

/1. wait for input - stops PC until an input (other than zero) value is detected through DI 

/2. output ANS - output ALU ANS 

/3. output loaded - output loaded data from RAM

/4. output input - output value in DI register

/5. jump if input= - skip to different part of program if a certain value is detected in DI (address can be selected by setting the value in the "addresses" stepper)

/6. jump if ANS= - same as 5 but for ANS

/7. jump if loaded= - also same as 5 but for loaded

/8. jump - like 5, but the skipping is unconditional 

/9. output PRGM - output the value from the 'Values" section in the program EEPROM (make sure you have the program value at the same time as the instruction)

/10. load - load a value from RAM (make sure you have your address from the "addresses" section at the same time as the instruction)

/11. save ANS - save ALU ANS to RAM (make sure you have your address from the "addresses" section at the same time as the instruction)

/12. save input - save value in DI to RAM (make sure you have your address from the "addresses" section at the same time as the instruction)

/13. reset PC - resets the PC

/14. Set ALU operation - sets ALU CTR (set ALU CTR by using "values" section at the same time as instruction Value= OPCODE value)

/15. Jump if input> - jumps if input is > than program value (make sure you have the instruction, address, and value at the same time.)

/16. Jump if input< - same as 15, but <

/17. Jump if ANS> - same as 15, but for ALU ANS

/18. Jump if ANS< - same as 16, but for ALU ANS

/19. Jump if loaded> - same as 15, but for loaded

/20. Jump if loaded< - same as 16, but for loaded

/21. wait for input= - waits for a certain DI value (DI register doesn't save)

/22. Set PRGM to A - sets program value to ALU input A (have your value from "Values" section as same time as instruction)

/23. Set PRGM to B - same as 22, but for ALU input B

/24. save PRGM - saves program value to RAM (make sure you have the instruction, address, and value at the same time.)

/25. Reset A - resets ALU input A

/26. Reset B - resets ALU input B

/27. Reset operation - resets ALU CTR

/28. Reset loaded - clears loaded data in loaded register

/29. Reset input - clears value in DI register

/30. Reset output - clears value in output register

/31. Reset ANS - clears data in ALU ANS register

/32. Reset All REG - clears data in all registers in CPU

/33. reset RAM - clears all data in RAM

/34. Reset system - clears all data off RAM and registers

/35. set input to A - sets value in DI register to ALU input A

/36. set input to B - same as 35, but for ALU input B

/37. set loaded to A - sets loaded value to ALU input A

/38. set loaded to B - same as 37, but for ALU input B

/39. set ANS to A - sets ALU ANS to ALU input A

/40. set ANS to B - same as 39, but for ALU input B

/41. submit ANS - submits ANS to ANS register (make sure you use this instruction before clearing ALU inputs otherwise the ANS will be lost)

/42. jump if carry - same as 5, but if ALU COUT = 1

There is a programming machine that you can connect an empty EEPROM (make sure bit width is 32 and address width is 10 and don't ever use ram for programming!!!). make sure that your program is starting at EEPROM address 2 and increase the EEPROM address by one every instruction you write to EEPROM otherwise you are essentially constantly overriding instructions!

Created: Jun 06, 2023

Updated: Jul 21, 2023


Comments

You must login before you can post a comment.

I think you should add a tutorial on how to use the programmer for new people trying to use this project as well as a blank eeprom.
Posted on Jun 06 2023 at 07:58PM UTC.
+0
Tutorial is now added to description.
Posted on Jun 08 2023 at 12:39AM UTC. Last modified by SJP4 on Jun 15 2023 at 01:13AM UTC.
+0