Breaking News
Comments
Newest First | Oldest First | Threaded View
Page 1 / 2   >   >>
KarlS
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
KarlS   4/20/2011 1:15:18 PM
NO RATINGS
You are right ... rotate then mask off bits for left shift, etc.

Max The Magnificent
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
Max The Magnificent   4/19/2011 4:52:12 PM
NO RATINGS
Ah, but is it better to do left / right sifts or left / right rotates :-) we've been noodling furiously on this -- I will reveal all in my "How To" article tomorrow -- Max

KarlS
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
KarlS   4/19/2011 3:48:25 PM
NO RATINGS
To really get down to basics: And Or Left shift by 1 Right Shift by 1 Invert/Complement Load Store Jump on true/false Call Return Then you can add the hard way And Or And (Or with ~And) for Xor Left Shift the And Repeat the above to propagate the Carries for a Ripple Carry Adder Then when you get tired of hand coding the Least Instruction Set Computer (LISC) you will appreciate Subroutines and figure a way to Call the Add subroutine with parameters. The Jump needs some work, but it would use flags like the old mainframes. Do a compare to get Gtr and Less. Conditional Jump on False that tests Gtr and Less for false would jump on Equal and Jump on True would jump if not equal. Any logic function can be done with enough And, Or and Inverts .. why you can even build a computer.

clematis
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
clematis   4/17/2011 2:15:45 AM
NO RATINGS
When your 4-bit processor is all done and debugged, why don't you send it over to Ken Chapman at Xilinx? He has already created a VHDL design of an 8-bit processor called the "Picoblaze". If you haven't seen/used the Picoblaze you should check it out - it's very cool. Perhaps your 4-bit design could become an even simpler "Femtoblaze".

Max The Magnificent
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
Max The Magnificent   4/16/2011 8:44:20 PM
NO RATINGS
This is another thing Joe and I are bouncing around. On the one hand we could make the CPU very minimalist and then use more instructions ... but this might not be so much fun (and not so intuitive) for beginners. Or we can have a more sophisticated CPU that supports more interesting instructions. Watch this space...

Max The Magnificent
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
Max The Magnificent   4/16/2011 8:42:22 PM
NO RATINGS
I started on the basis of just having an accumulator -- also not having an interrupt structure or a stack -- but Joe says that if this is supposed to be educational then we should have a primitive interrupt structure and a stack. I think you'll be surprised with what we've come up with ... more soon -- Max

Max The Magnificent
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
Max The Magnificent   4/16/2011 8:40:25 PM
NO RATINGS
I agree -- XOR is just too useful. One criteria for me is how many times you use an instruction -- I use XOR a lot. Joe says we don't need a CMP (compare) instruction, but I'm fighting for that one also :-)

Max The Magnificent
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
Max The Magnificent   4/16/2011 8:38:35 PM
NO RATINGS
The fun thing is to set limitations and then work around them -- if we had 8-bit opcodes we might just as well make an 8-bit machine...

pmartel
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
pmartel   4/16/2011 6:24:10 PM
NO RATINGS
You can replace AND, OR and NOT with NAND (AND followed by NOT)or NOR (OR followed by NOT). For instance, M0 AND M1 is LOAD A, M0 NAND A, M1 LOAD M2, A NAND A, M2 ; A has M0 AND M1 M0 XOR M1 is LOAD A, M0 NAND A, M0 LOAD M2, A LOAD A, M1 NAND A, M1 NAND A, M2 ;A now has M0 OR M1 LOAD M2, A LOAD A, M0 NAND A, M1 NAND A, M2 LOAD M2, A NAND A, M2 ; A has M0 XOR M1 Basically you can reduce the number of opcodes needed if you are willing to perform more operations. If you want to really have a minimal set of arithmetic/logic operations, you can build ADD up out of XOR (and AND) and so do all the arithmetic and logic ops with just NAND.

DPWARDEN
User Rank
Author
re: Instruction set for a 4-bit HRRG Steampunk Computer
DPWARDEN   4/16/2011 1:29:46 AM
NO RATINGS
Good mental exercise. I've never thought about 16 instructions--I would assume only 1 register (the accumulator) and two flags, carry and zero. For load/store, I think you would need: LOAD A,(addr) (load from memory) LOAD (addr),A and (store to memory) LOAD A, immediate. (load constant) For math, I would suppose: CC (clear carry), ADDC A,(addr), (add w/carry) SUBC (addr), (subtract w/borrow) COM A (1's complement), OR A, (addr), AND A, (addr) Shifts/rotates could be done with ROTL A and ROTR A; (CC could make these shifts.) Jumps need JUMP NC, (addr) and JUMP NZ, (addr); ...unconditional jumps can be handled by CC inst. I would also lobby for: CALL (addr) and RET. That's 15 instructions. INC and DEC can be handled by storing 1 in memory and performing ADDC or SUBC.

Page 1 / 2   >   >>


Radio
LATEST ARCHIVED BROADCAST

What are the engineering and design challenges in creating successful IoT devices? These devices are usually small, resource-constrained electronics designed to sense, collect, send, and/or interpret data. Some of the devices need to be smart enough to act upon data in real time, 24/7. Specifically the guests will discuss sensors, security, and lessons from IoT deployments.

Brought to you by:

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Like Us on Facebook
Special Video Section
With design sizes expected to increase by 5X through 2020, ...
01:48
Linear Technology’s LT8330 and LT8331, two Low Quiescent ...
The quality and reliability of Mill-Max's two-piece ...
LED lighting is an important feature in today’s and future ...
05:27
The LT8602 has two high voltage buck regulators with an ...
05:18
Silego Technology’s highly versatile Mixed-signal GreenPAK ...
The quality and reliability of Mill-Max's two-piece ...
01:34
Why the multicopter? It has every thing in it. 58 of ...
Security is important in all parts of the IoT chain, ...
Infineon explains their philosophy and why the multicopter ...
The LTC4282 Hot SwapTM controller allows a board to be ...
This video highlights the Zynq® UltraScale+™ MPSoC, and sho...
Homeowners may soon be able to store the energy generated ...
The LTC®6363 is a low power, low noise, fully differential ...
See the Virtex® UltraScale+™ FPGA with 32.75G backplane ...
Vincent Ching, applications engineer at Avago Technologies, ...
The LT®6375 is a unity-gain difference amplifier which ...
The LTC®4015 is a complete synchronous buck controller/ ...
10:35
The LTC®2983 measures a wide variety of temperature sensors ...
The LTC®3886 is a dual PolyPhase DC/DC synchronous ...