My new and most thought out IS. - Printable Version +- Forums - Open Redstone Engineers (https://forum.openredstone.org) +-- Forum: ORE General (https://forum.openredstone.org/forum-39.html) +--- Forum: Projects & Inventions (https://forum.openredstone.org/forum-19.html) +---- Forum: Completed Projects (https://forum.openredstone.org/forum-21.html) +---- Thread: My new and most thought out IS. (/thread-5218.html) |
My new and most thought out IS. - Chibill - 12-12-2014 Hello everyone. Today I am giving you a sneak peak at my IS. https://docs.google.com/file/d/0B8hDI6MCMcjnWTVyY0E5RzlqYXc/edit?usp=docslist_api The one thing is that this supports a stack and a machine without a stack. It also have a Instruction to say that there last instruction is repeated many times. RE: My new and most thought out IS. - LordDecapo - 12-12-2014 I do like the repeat inst. Is there a way to tell it to repeat like several instructions in a row over and over? Like "repeat inst 1,2,, and 3, 10times"? Also first and within 5 min of posting RE: My new and most thought out IS. - Chibill - 12-12-2014 I might set that up it would be interesting to make work. RE: My new and most thought out IS. - LordDecapo - 12-12-2014 That it would, I have tossed around doing that a bunch, if u have conditional branching and a way to incriment a register by 1, u can simulate that kinda inst in software. K and question time.. what bit size is the IS? 16bit? what's the intended data width? 8bit? also, how many registers u gonna have? RE: My new and most thought out IS. - Chibill - 12-12-2014 What do you mean by IS bit size? Its ment for an 8 bit CPU but it can handle up to 32 bit numbers using the Register bit mode selection instruct and also the one for the stack. 16 registers which when in 32 bit mode goes down to 4. I will also have a stack 32 deep. RE: My new and most thought out IS. - LordDecapo - 12-12-2014 Like how many bits wide is ur IS..? ??? Is that stack hardware or or in RAM, cause that's A HUGE stack for MC CPUs, and u have a mode for registers? If u have AddC or SubB (or SubC, depending on what ur reading, they r the same) then u don't need the register mode cause you will have the ability to just do a calculation then extend it with the Add/Sub © and it will simulate larger bit values with out having the weird register mode.. Cause reading them (registers) like that hardware based could slow ur clock down by a factor of 4 or more.. unless ur heavily pipelining, and that would still have to stall for a while to catch up with the random bit sizes RE: My new and most thought out IS. - Chibill - 12-13-2014 Not sure still need to get the Imediates wrote out and the structure. Hardware stack using minecarts! The modes are so you can have a huge 32 bit number saved then say change to 8 bit mode and take each chunk of it. And the stack and Regards change mode seapreatly. RE: My new and most thought out IS. - GISED_Link - 12-13-2014 Aaaarg ! 00000 for NOP seems to be a bad idea. I really recommand to put the NOP instruction somewhere else and show an alert when the opcode (binary code of the instruction) is 00000. And yes I think that addc and subc are very important. RE: My new and most thought out IS. - Chibill - 12-13-2014 I don't have addc or subc what do they do? RE: My new and most thought out IS. - Chibill - 12-13-2014 Noop shoud always be 00000 because then if a line is blank its noop. RE: My new and most thought out IS. - GISED_Link - 12-13-2014 I think that if you have no opcode (00000) in the Instruction bus, that say that you have a huge error on the bus (it miss a redstone repeater, wires are too long, etc...). So I recommand to unuse the 00000 instruction (or use it to stop the computer and show a "stop" message). And Addc and Subc is a good way to use the carry flag. By example : I will add 2 numbers (unsigned) of 16 bits, with a 8 bit ALU. How can I proceed ? Code: Example :
RE: My new and most thought out IS. - Chibill - 12-13-2014 I have registers resevered for the carry already I just have to make that sheet neat. RE: My new and most thought out IS. - LordDecapo - 12-15-2014 (12-13-2014, 07:01 AM)GISED_Link Wrote: Aaaarg ! 00000 for NOP seems to be a bad idea. I really recommand to put the NOP instruction somewhere else and show an alert when the opcode (binary code of the instruction) is 00000. No just no.. that means when ur not running anything at all, u will get an error. A noop should ALWAYS ALWAYS ALWAYS be 00000. So if u do something like pipeline and u have to stall, it simply just closes a read lock and nothing else can come though. Leaving the busses idling at 00000 during the stall, Hensel Noop. RE: My new and most thought out IS. - GISED_Link - 12-15-2014 (12-15-2014, 05:10 PM)LordDecapo Wrote: A nop should ALWAYS ALWAYS ALWAYS be 00000. So if u do something like pipeline and u have to stall, it simply just closes a read lock and nothing else can come though. Leaving the busses idling at 00000 during the stall, Hensel Noop. I've joined the HCS12 instruction set (not only the picture), made by Freescale. See by yourself, NOP isn't at 0x00. Here, 0x00 is used to put the CPU in background mode. ![]() You can set NOP at 0x00, but I suggest to put something else (that shows something special for the user). With that, when a problem happens with the instruction bus, you will immediately know where the error is and you will earn a lot of time. Or use NOP and turn on a Redstone lamp... But you are lucky, with Minecraft you can do whatever you want. ![]() Here, "000000" is a load instruction (see in the manual). I've join a Instruction Set from a CPU coded in VHDL from Xilinx. And you can see that it doesn't have the NOP instruction. So ... We are fighting for something that doesn't matter at all XD. I hope that those examples will help you (chibill). By the way : - I think that 3 kind of jump is not enough - You can devide, but how can you store the remainder ? - Same instruction? Why ? But why not... It's funny XD - addc and subc... if you have the place to use those instructions, use them. - INC, Increment a register RE: My new and most thought out IS. - LordDecapo - 12-15-2014 dude,, a background mode is literally a noop with just a monitors for an interrupt or a system that only does low priority backround ops... and those IS's are the rarity,,, 90% of the ones i look at have noop as 0000, as its 50x easier to set that way by default RE: My new and most thought out IS. - GISED_Link - 12-16-2014 (12-15-2014, 11:54 PM)LordDecapo Wrote: and those IS's are the rarity,,, 90% of the ones i look at have noop as 0000, as its 50x easier to set that way by default 1. We must stop to discuss about the NOP.. . 6 posts about an instruction that do nothing is really enough 2. Please post here a IS where NOP is set at 0x00. I'm sure that will be intersting to see one of them in my life... 3. X86 Opcode : NOP is at 0x90, 4. European logic != American logic ![]() Anyway. I don't recommand to use the 0x00 bytecode if you have enough free bytecode in your IS RE: My new and most thought out IS. - Chibill - 12-16-2014 Still using 00000 as noop as it is how I learned from a book on making your own computer that was printed in 1980. RE: My new and most thought out IS. - LordDecapo - 12-17-2014 ^ and all tutorial and learning CPUs I have read about, both euro and Us.. also here: Nop Wiki note that MIPS, Intel 8051, ARM A32, Z80, and the PIC microcontroller all use 0 as Nop. RE: My new and most thought out IS. - Chibill - 12-18-2014 I am thinking about deleting this topic and reposting it after I finish the memory map. RE: My new and most thought out IS. - TSO - 12-23-2014 I should like to state (after my long hiatus) that I agree with GISED_Link to some extent. You should try to avoid mapping a real opcode to 0x00 if you have the room in your IS to do so. Then, you can map a memory read error or a STOP to the opcode of 0x00. If you have microcoding, then not having a 0x00 opcode becomes more important because much of the math that most microcoding performs can have issues working around zero for either pointers or opcodes. In programming, a common practice is to set something to zero (like a pointer), perform an allocation, and then see if it isn't zero, meaning that it worked, or is zero, meaning that it failed and it's time to perform the exception routine and commit software suicide. In microcoding, a similar thing happens, you allocate 0 to the micro-operation being considered, allocate a temporary space for it on the table (at zero, oddly enough), then run the opcode through the tabling program, and it gives it a nonzero micro-operation in return at a nonzero table address for your instruction pointer to work with. If zero remains in either location, you know you have a problem, but if zero actually is something that can be returned as a valid and useful output, then it's your best guess as to whether or not your allocation worked or failed. Therefore zero is a common sign of an error in allocations and basically all other programs, to the point that x86 has a FLAG that is set if the output is zero simply because a zero output is bad juju. So, from a programming standpoint, I would say to avoid zero for consistency, if nothing else. Now, for your computer, a really nice thing about mapping STOP to 0x00 is that an opcode execution could be wired as the bitwise OR down the entire opcode AND'ed with the clock all added to the instruction pointer with ADDC being invoked by a starting signal (basically: if there is an opcode at line x or a start signal at any point, push 1 to the carry in of the instruction pointer accumulator). This is a convenient way to make the STOP opcode 0x00 without adding any loss to overall throughput and adding one phase to the instruction pointer's pipeline. It is therefore unrelated to the execution pipeline and gives you an opcode usually reserved for a microcoded environment. LordDecapo Wrote:I do like the repeat inst. Is there a way to tell it to repeat like several instructions in a row over and over? Like "repeat inst 1,2,, and 3, 10times"? I can tell you how to do it in general pretty easily, it will take me a bit of thinking to put it in terms of this specific instruction set. I have to be somewhere right now, but tell me what you want to know and I'll explain it (this one is fairly simple in it's general form on a stack machine.) RE: My new and most thought out IS. - Chibill - 12-23-2014 I have no addc. I am going to be deleteing this thread after new years and reposting because of this 'war' on NOOP on 0000 RE: My new and most thought out IS. - TSO - 12-24-2014 My full reply and suggestions for alteration of your IS. This isn't all that edited, and considering how much time I spent formatting it, I'm sure you can see why I don't want to deal with this post anymore. I will also add that there is no reason to delete the thread simply because we disagree on the presence of an opcode at 0x00. This would be addressed at some point, and you were lucky enough to get stuck with it. RE: My new and most thought out IS. - Chibill - 12-24-2014 SBM and RBM are nothing like move.. They change how big of numbers they hold in bit size and actuall should be combined into Set Bit Mode to set you bit mod. Also I still don't understand what ADDC is used for because if that instrucrion exists the uses could break the whole Multi-bit system. RE: My new and most thought out IS. - TSO - 12-24-2014 (12-24-2014, 07:03 PM)Chibill Wrote: SBM and RBM are nothing like move.. They change how big of numbers they hold in bit size and actuall should be combined into Set Bit Mode to set you bit mod. Also I still don't understand what ADDC is used for because if that instrucrion exists the uses could break the whole Multi-bit system. That is because you don't understand how I was able to integrate your bit modes into MOV. I made it so that your FLAGS control the bit mode, and then you move the value you want your bit mode to be into the FLAGS. What you would have found is that this is pretty much how SBM and RBM would have worked anyway, except you would have just put each of them into their own arbitrary two bit control registers. ADD EAX, EBX = A + B --> A ADC EAX, EBX = A + B + 1 --> A, where 1 is the carry in. You're going to need this operation if you want your multi bit stuff to work. RE: My new and most thought out IS. - Chibill - 12-24-2014 Multi- Bit stuff is all hardware based. And also every Register in the whole CPU (Prog counter,etc...) is addressable. RE: My new and most thought out IS. - TSO - 12-24-2014 *head desk* all right, lets try this again. No matter how you intend to do this, the SBM and RBM must store the value you set them to somewhere in the god damn computer. If you store these values somewhere in the computer, then you can perform a MOV to alter the location they were stored to because every register is addressable in the computer. To save registers, you then throw them all into your FLAGS register and you're done. It's still redundant to MOV. |