Embedded Systems Conference
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
As data rates begin to move beyond 25 Gbps channels, new problems arise. Getting to 50 Gbps channels might not be possible with the traditional NRZ (2-level) signaling. PAM4 lets data rates double with only a small increase in channel bandwidth by sending two bits per symbol. But, it brings new measurement and analysis problems. Signal integrity sage Ransom Stephens will explain how PAM4 differs from NRZ and what to expect in design, measurement, and signal analysis.

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
The LTC®6363 is a low power, low noise, fully differential ...
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 ...
The LTC®2348-18 is an 18-bit, low noise 8-channel ...
The LT®3042 is a high performance low dropout linear ...
Chwan-Jye Foo (C.J Foo), product marketing manager for ...
The LT®3752/LT3752-1 are current mode PWM controllers ...
LED lighting is an important feature in today’s and future ...
Active balancing of series connected battery stacks exists ...
After a four-year absence, Infineon returns to Mobile World ...
A laptop’s 65-watt adapter can be made 6 times smaller and ...
An industry network should have device and data security at ...
The LTC2975 is a four-channel PMBus Power System Manager ...
In this video, a new high speed CMOS output comparator ...
The LT8640 is a 42V, 5A synchronous step-down regulator ...
The LTC2000 high-speed DAC has low noise and excellent ...
How do you protect the load and ensure output continues to ...