Design Con 2015
Breaking News
Comments
Newest First | Oldest First | Threaded View
Page 1 / 2   >   >>
KarlS
User Rank
Rookie
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
Blogger
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
Rookie
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
Rookie
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
Blogger
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
Blogger
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
Blogger
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
Blogger
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
Rookie
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
Rookie
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   >   >>


Top Comments of the Week
Flash Poll
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
<b><a href=Betajet">

The Circle – The Future's Imperfect in the Present Tense
Betajet
5 comments
The Circle, a satirical, dystopian novel published in 2013 by San Francisco-based writer Dave Eggers, is about a large, very powerful technology company that combines aspects of Google, ...

Max Maxfield

Recommended Reads From the Engineer's Bookshelf
Max Maxfield
34 comments
I'm not sure if I read more than most folks or not, but I do I know that I spend quite a lot of time reading. I hate to be idle, so I always have a book or two somewhere about my person -- ...

Martin Rowe

Make This Engineering Museum a Reality
Martin Rowe
Post a comment
Vincent Valentine is a man on a mission. He wants to make the first house to ever have a telephone into a telephone museum. Without help, it may not happen.

Rich Quinnell

Making the Grade in Industrial Design
Rich Quinnell
16 comments
As every developer knows, there are the paper specifications for a product design, and then there are the real requirements. The paper specs are dry, bland, and rigidly numeric, making ...

Special Video Section
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 ...
General-purpose DACs have applications in instrumentation, ...
Linear Technology demonstrates its latest measurement ...
10:29
Demos from Maxim Integrated at Electronica 2014 show ...
Bosch CEO Stefan Finkbeiner shows off latest combo and ...
STMicroelectronics demoed this simple gesture control ...
Keysight shows you what signals lurk in real-time at 510MHz ...
TE Connectivity's clear-plastic, full-size model car shows ...
Why culture makes Linear Tech a winner.
Recently formed Architects of Modern Power consortium ...
Specially modified Corvette C7 Stingray responds to ex Indy ...
Avago’s ACPL-K30T is the first solid-state driver qualified ...
NXP launches its line of multi-gate, multifunction, ...
Doug Bailey, VP of marketing at Power Integrations, gives a ...
See how to ease software bring-up with DesignWare IP ...
DesignWare IP Prototyping Kits enable fast software ...
This video explores the LT3086, a new member of our LDO+ ...
In today’s modern electronic systems, the need for power ...