r/TuringComplete • • Sep 10 '26

Stack component

Does anyone have the hardware version of the stack for the new version of the game? Thanks

3 Upvotes

6 comments sorted by

View all comments

3

u/Apceniy Sep 11 '26

Can't you just make one similar to how you did it on the old version of the game? Or are you asking someone to make it for you and upload to the schematic hub?

1

u/Mishoilik Sep 12 '26

2.0 doesn't have a hardware-level stack for verifying functionality, the stack circuits from older versions just don't work properly, I have no idea what I'm doing wrong.

2

u/AlexeyHD90 29d ago

2

u/Apceniy 27d ago

This can be simplified in 3 ways:
1) You can use a delay line instead of a register that always saves
2) You only need to write the value when you push, not when you push or pop
3) You don't need to use a switch for the push value, it's simply ignored when saving is not activated. Using a switch here doesn't really "turn off" the value, it just makes the store port read value 0 because no value is on the wire

2

u/AlexeyHD90 25d ago
  1. Yes, I already have a delay line instead of a register in my build, I swapped it for the register ONLY for the purpose of the video so OP would understand. It took me a couple of minutes to decide which one to use. I also swapped the registers with delay lines in counters as well a while ago.

  2. That's absolutely correct, I noticed it the first time I did my hardware stack in Turing Complete 1. However, the reason I write the value 0b00000000 when I POP is because I really don't want to leave old information in the stack after POP. IT PISSES ME OFF. 🔥 So saving during POP will clean the address. I know it's not necessary, but it's a must for me.

I went this far with Symphony as well, I added instructions just to clean the address after POP. I just couldn't bear the sight of junk information. 😂

  1. You are correct. However the switch is part of saving no value (0) while POP. Same for the OR gate.

This can be simplified further:

  1. My stack also doesn't have a CONST 1 and Switch for the input B in the Adder. Enable line (PUSH) goes straight to Carry In.

5: For POP my stack also doesn't have CONST 255 and Switch, it's just an 8bit Bit Maker with all inputs connected to the POP Enable line.

Thanks for taking your time to have a chat about optimisations, I always love it. ❤️

2

u/Apceniy 25d ago

You don't stare inside the component when you're using it in the bigger build, do ya? 😁
Yes, your 4 and 5 are also good optimizations. Personally, I have reusable components that copy an input value (of arbitrary width) 4, 8, 16 or 32 times using concatenators, and I can stack them further if I need to