Powder toy processor

  • devast8a
    27th Jul 2010 Former Staff 4 Permalink
    Finally completed my powder toy processor.

    LoadSaveBlock(4260);

    Commands are input on the "Input" section. The first input (Marked with the arrow) is the highest significant bit of the command. (Ie. the one in the below number)
    1000

    Commands with no arguments.
    Code - What it does
    0000 - No Operation
    0010 - Send stop command
    1101 - Adds register A & B together and puts the result in C
    1110 - Subtracts A and B (A-B) and stores the result in C

    Commands that which require an argument take two clock cycles to gather/process the info.
    For example if I want to load ram slot 2 into register A. I would first use.
    1001 - Load ram into register A
    Then once the clock cycle has completed. I would then use.
    0010 - Binary for 2
    Another clock cycle should pass and the information from ram slot 2 will be in register A.

    The following commands have one argument, this is the constant to load into the register.
    Code - What it does
    0001 - Load constant into register A
    0011 - Load constant into register B

    The following commands have one argument, this is the position of ram in which to load/store data.
    Code - What it does
    10XX - Load data from ram slot into register XX
    01XX - Store register XX into ram slot
    XX01 - Register A
    XX10 - Register B
    XX11 - Register C

    Following codes do not work & will probably cause issues.
    1000
    0100
    1100
    1111 (A 2 bit decoder here would give an extra 2 commands)

    Edit reason: Revised ram section.
    Edit reason: Added subtraction (triclops200)

    Issues/Notes
    Ideally you would want some kind of stack to be automatically placing commands onto the processor each clock cycle.
    I also believe there is an issue when loading data from ram into register C (It sometimes causes ram slot 0 to take incorrect data)
  • triclops200
    27th Jul 2010 Former Staff 0 Permalink
    wow... good job!, how do i insert ram commands?
  • Simon
    27th Jul 2010 Administrator 1 Permalink
    Wow.
  • devast8a
    27th Jul 2010 Former Staff 0 Permalink
    Triclops what do you mean?
  • triclops200
    27th Jul 2010 Former Staff 0 Permalink
    i don't understand where to input commands and how to access ram
  • devast8a
    27th Jul 2010 Former Staff 0 Permalink
    Just a sec I'll mark some things and upload it.
  • devast8a
    27th Jul 2010 Former Staff 0 Permalink
    Ok. The inputs have been marked. The one with the arrow is the highest significant bit. I'm going to edit the first post.
  • triclops200
    27th Jul 2010 Former Staff 0 Permalink
    thank you
  • erwins_cat
    27th Jul 2010 Member 0 Permalink
    you made me cry after i compared my 5bit calculator with your processor.
    this pushes the "weird-things-you-can-do-with-powder-toy-level" one step ahead by using a real processor to simulate a artificial processor ... what a waste of energy
  • floridarolf
    27th Jul 2010 Member 0 Permalink
    wow you just took the cake.... magnificent.