Turing Complete

Turing Complete

View Stats:
jcouch210 Jan 28, 2023 @ 8:59pm
Would like to read ram similarly to the program memory
I am making a multi threaded computer that uses instructions with dynamic length, and the only thing standing in my way is that ram isn't able to be read with the address system of program memory. My system involves 5 cpu custom components, one that reads directly from the program memory and sends program data to other cpus to be stored and read by them. However, the ram when set to 64 bit doesn't allow for use of the other 3 save and load pins, and when set to 256 bit, has the wrong address system for jumps to be converted. Dividing label addresses by 4 when sending won't work either, because the width of instructions is between 1 and 4, depending on the instruction. Is there any good way to do this?
< >
Showing 1-6 of 6 comments
SunCat Jan 29, 2023 @ 1:37am 
do you have to use ROMs? you could use multiple program components with different programs set in each component
if you *do* have to use a ROM, you could make a multi-tick system where first you read the correct instruction into registers (which can take 1-2 ticks if you are trying to emulate 4 byte program output with 64bit ROM output, or up to 4 ticks if you are outputting a single byte/word per tick), and only when that completes start executing that instruction
jcouch210 Jan 29, 2023 @ 8:02pm 
I have a system that works similarly to how in some languages where you would tell it to dynamically assign a list of instructions to a specific core, for example:
thd c0 (make a thread for core #0)
(program)
end
and it would copy the code into the ram of the core.
The center of my issue is that I need to read and write from a ram's memory from a program, and if I use a multi-tick system, then it would ruin the performance reasons for making a multi threaded system. I could technically solve this issue if I made all instructions 4 numbers long, and set the ram to 256-bit mode, however, this would turn the above code into:

thd c0 _ _
(program)
end _ _ _

and bring the count of numbers from 3 to 8, which is a significant gate cost. I will likely do this if it turns out to be the only way, but I would like to see if there is a better alternative.
jcouch210 Jan 29, 2023 @ 8:06pm 
It would be helpful if the ram let you read and write through the extra 3 input and output pins even if it is set to 64-bit mode, although it would need to be set as optional, otherwise saving to the ram would mess up the next 3 numbers if you weren't expecting it.
pleegwat Jan 30, 2023 @ 8:30am 
Couldn't you use a word-to-byte splitter to split 64 (or 32) bits into bytes?
jcouch210 Jan 30, 2023 @ 11:10am 
I'm using 64 bit instructions
jcouch210 Jan 30, 2023 @ 11:26am 
I found a way. I just needed to use another ram to store the actual indexes of the memory.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jan 28, 2023 @ 8:59pm
Posts: 6