Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 11

Author Topic: Dwarven Computer  (Read 136739 times)

Earth Striker Lurin

  • Bay Watcher
  • Let's Go to Work...
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #15 on: February 17, 2010, 07:19:54 pm »

This is the greatest thing ever.


period.
Logged
"So I looked to the left of me, looked to the right of me, raised the giant's severed arm above my head and said 'Let's go to work...'"   -- Lurin Diamondfist relating the time he had to mine without a pick axe.

Innominate

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #16 on: February 17, 2010, 08:02:04 pm »

Well, this is truly awesome. Especially the memory stuff. Shit, if you can have proper memory addressing and stuff then you'll be able to construct proper programs. Do it for the awesome good sir!
Logged

Jong

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #17 on: February 18, 2010, 02:59:14 am »

About the memory cells, I don't see why you need a separate cell for reading and writing.

You should only need one cell to hold the water representing the bit with a pressure plate for reading. Then you can have that pressure plate toggle a gear assembly linked to the memory output.

So for a single bit where the pressure plate in each of four memory cells is connected to gears i o p q with corresponding read lines (from decoder) connected to gears r s t u, the combiner at the end is:
Code: [Select]
*=*=*=*=Power
i o p q
r s t u
*=*=*=*=Output

If you need the output to be triggered by a pressure plate, you could even share a single "output buffer" among all of the memory cells. This buffer would basically be another memory cell, only it would used the output from the combiner as its input. This should save a significant amount of space and power.

An excellent optimization. I must have missed it because I was designing everything modularly. I was thinking that it was a bit wasteful for each register to have its own output buffer. You forgot the Read-out signal though. Thats an additional gear.

I was thinking of wiring the decoder directly into the memory banks to save an output step. If I applied this method, it could plausibly still be done but the complexity is daunting, as the each 32 outputs of the decoder need to split into 8 for each bit and routed to the appropriate output buffer bit. That's 256 power lines and they can't be crossed :( I would then still need to route the decoder signal to the memory cells. So its a trade off. 1. I can skip an output step, save 32 output buffers from the decoder but build 256 output buffers for the memory bank. 2. Keep the decoder output buffers but avoid build 256 others. 3. Go for mind numbing multi z-level power routing.

Well its a good point to keep in mind when doing optimization for the final blueprints.

My experience with logic has been that toggling a bunch of pumps mechanically is a huge hassle and not the way to do things.
I always build a huge elevated tank of water to feed all my logic systems, and control its flow with floodgates and 1x1 drawbridges. A single stack of pumps runs the whole thing.

Really? My impression of fluid logic was that it was slower and less reliable. The 100 step delay for bridges and floodgates is a real downer. Plus I didn't want to have to deal with sticky triggers. Perhaps I was mistaken? I haven't really considered it.

I was probably dazzled by the steampunkness of employing a huge number of gears to do calculations.

Shinziril

  • Bay Watcher
  • !!SCIENCE!!
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #18 on: February 18, 2010, 11:11:52 am »

The main advantages of fluid logic are: it doesn't require quite so many perfectly-linked gears (remember, each gear assembly that is OFF by default needs 2 gears, one for the assembly, one to toggle it once initially by connecting it to a lever, pulling the lever, and deconstructing the lever, leaving an extra gear in the assembly), and it doesn't require NEARLY so much power (as bridges/floodgates operate without any power at all).  The downside is building the large delivery-and-drain plumbing system.

It is a little slower due to toggling delays, but that may or may not be acceptable to avoid having to route power everywhere.  The "reliability" issue is solved using a high-pressure cistern to ensure fast water delivery (and diagonal drains to prevent pressurized outflow).  I think I'll work on some alternate fluid-logic designs and post them, but you can use whichever seems easier. 

You could even use some sort of hybrid-logic system - some logic operations are just easier in mechanical logic.
Logged
Quote from: lolghurt
Quote from: Urist McTaverish
why is Dwarven science always on fire?
Because normal science is boring

shadow_slicer

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #19 on: February 18, 2010, 03:06:19 pm »

I was thinking of wiring the decoder directly into the memory banks to save an output step. If I applied this method, it could plausibly still be done but the complexity is daunting, as the each 32 outputs of the decoder need to split into 8 for each bit and routed to the appropriate output buffer bit. That's 256 power lines and they can't be crossed :( I would then still need to route the decoder signal to the memory cells. So its a trade off. 1. I can skip an output step, save 32 output buffers from the decoder but build 256 output buffers for the memory bank. 2. Keep the decoder output buffers but avoid build 256 others. 3. Go for mind numbing multi z-level power routing.
That's probably true, but I don't think the multi-z-level routing would be that bad. If you use the output from the decoder directly, you don't really have to split the decoder signals for each bit. Instead you can have the output from the decoder be the power line for that row of memory (a row consisting of 8 bits). Then you can tap into that "power" line somewhere and extend it so it is about 5 z-levels high. Then link up the final output buffers (2 bits per level, one one each side of the "column"). Although you can't put the output buffers on top of each other or on the same level, you should have plenty of room to stagger them.

Spoiler: A simple example (click to show/hide)
Logged

Jetsquirrel

  • Bay Watcher
  • In the end, i will win.
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #20 on: February 18, 2010, 05:35:14 pm »

Dwarf: Super computer i got a question
Computer:*crackling noise* yes?
Dwarf:What is the answer to life?
Computer: Come back in 102 million years
*102 million years later*
Dwarf: Do you know the answer to life now?
Computer: The Answer to life is...
*dwarf gasping*
Computer: 42
Dwarf: FUUUUUUUUUUUUUUUUUUUUUUUU

zecro

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #21 on: February 18, 2010, 10:42:49 pm »

If dwarves build a computer, they wouldn't call errors bugs.

They would call them "gremlins."
Logged

Jong

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #22 on: February 18, 2010, 11:55:15 pm »

If dwarves build a computer, they wouldn't call errors bugs.

They would call them "gremlins."

Ahaha! I read about gremlins. Imagine the chaos they would cause as they ran through the computer, especially if I left the levers used to toggle the gears lying around after construction. Thank goodness I plan to build it using the current version. Future computer architects beware!  ;D

(they will literally be computer "architects")

Update: I've drafted a design for carry-look-ahead adders and it is vastly superior in all aspects to the ripple carry adder. Fluid logic users might want to take note.

EDIT:I also decided that I ought to hide my giant wall of text with spoiler tags. Perhaps I should have done that from the start.
« Last Edit: February 19, 2010, 03:50:05 am by Jong »
Logged

immibis

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #23 on: February 19, 2010, 01:36:23 am »

I had an idea for (relatively) small and probably power-efficient, but complicated and slow, memory here: http://dwarffortresswiki.net/User:Immibis/RAM
This design is bit-addressable so to get more than one bit per address you'd need to have multiple smaller (or not) ones and connect the address inputs. The control logic section on that page might be incorrect, and the design of the memory itself isn't tested yet, though.
Logged
If I wanted ramps I would've designated ramps, dammit!

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #24 on: February 19, 2010, 01:52:00 am »

They would call them "gremlins."
And de-buggers would be axe dwarves.
Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"

Jong

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #25 on: February 19, 2010, 04:52:09 am »

I had an idea for (relatively) small and probably power-efficient, but complicated and slow, memory here: http://df.magmawiki.com/index.php/User:Immibis/RAM/RAM
This design is bit-addressable so to get more than one bit per address you'd need to have multiple smaller (or not) ones and connect the address inputs. The control logic section on that page might be incorrect, and the design of the memory itself isn't tested yet, though.
Broken link (fixed)

Hmm.. While I am intrigued by the possibility of 1 tile bits, I see that your design requires reflooding to read and write from the memory.

My ideal computer should be able to complete the requested operation within 100 steps. The reason for this is that the computer is regulated by a clock, and the minimum cycle time of a automatic dwarven repeater is 100 steps.

Of course, I'm not so optimistic that the computer will be able to perform so quickly so this computer will be manually clocked. I know that the reset time for the pressure plates is 100 steps but I may be able to contrive a clock cycle where the output buffers have time to reset before being used again.

The current plan for the manual clock involves a single lever, so I can test various clock speeds. It is an 8 step clock cycle so even the ideal automatic dwarven computer would only be able to run one instruction every 800 steps.

According to the clock thread, a dwarven day is 1200 steps, so if a dwarven day is the same length as ours, that makes the clock speed of an ideal dwarven computer a zippy 1/7200 Hz.

BTW clock speed is determined by the frequency of the oscillator, not the frequency of execution.

Update: I've completed the draft of the ALU design. Next will be tricky bits like the timing and control circuits.

Safe-Keeper

  • Bay Watcher
  • "Situation normal; all ****ed up"
    • View Profile
    • FS Mod tester
Re: Design for a Dwarven Computer Prototype
« Reply #26 on: February 19, 2010, 04:54:36 am »

Quote
You should make it so, when a /b/tard tries to Divide by Zero, the computer floods the fort.  With magma.
You could make a DF GlaDOS!

"Good neeews..."
Logged
"Sieging humans brought some war polar bears, and one of them started a camp fire. Highly trained!" --Today One accidentally introduces the panserbjørn into Dwarf Fortress lore

Gazz

  • Bay Watcher
    • View Profile
Re: Design for a Dwarven Computer Prototype
« Reply #27 on: February 19, 2010, 03:40:26 pm »

Quote from: Jong
(they will literally be computer "architects")
I've heard the term Systems Architect before but I didn't quite make that connection...
Logged
totus vestri castrum es nostrum possessia

Jong

  • Bay Watcher
    • View Profile
Re: Dwarven Computer
« Reply #28 on: February 24, 2010, 01:49:40 am »

Going over the design again, I noticed that the design for the carry look ahead adder was faulty as I forgot to take into account backward power flow from subsequent units. Using an XOR system instead of an OR system should fix it.

I've completed the design of all the components of the computer. All that's left is to build and test it.

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
Re: Dwarven Computer
« Reply #29 on: February 24, 2010, 06:35:12 am »

Be sure to build it in a fancy box.
Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"
Pages: 1 [2] 3 4 ... 11