Welcome, Guest. Please login or register.

Author Topic: Finally, a flash game for hardware engineers  (Read 3418 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Finally, a flash game for hardware engineers
« on: July 31, 2009, 08:32:38 PM »
http://www.zachtronicsindustries.com/kohctpyktop/kohctpyktop.htm

This is great fun. Unfortunately for me, I'm stuck on the dual set-reset latch. I can't get the verification past 95%, so it fails. I'm using a dual NOR based design for each latch to minimise the number of gates (as gate delay is a factor), but my design still sucks as Q0 and Q1 basically oscillate until the system is initialised with an input. After that, the system works but there is up to a 2 gate delay in responding to the set or reset.
« Last Edit: July 31, 2009, 08:35:44 PM by Karlos »
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Finally, a flash game for hardware engineers
« Reply #1 on: August 01, 2009, 10:41:49 PM »
Try watching the tutorial in the help section, it'll make things a lot clearer.

In your chip, you have one silicon layer and one metal layer. There are 2 types of silicon and either kind (red for N type, yellow for P type) can act as a conductor. You only get a gate where you put one type of silicon on top of another.

You can't put 2 metal traces over the same square, nor can you put two types of silicon through the same square except where making a gate.

The only way to get two independent conductors through a square is to make one out of silicon and the other out of metal. In order to connect metal to silicon, you have to put a via point (indicated by the small circle).

The game also simulates gate delay, which becomes essential later on when you have to create delay lines and oscillators. However, if any of your designs has too much gate delay where it isn't wanted, it will fail the verification stage. meaning it is back to the drawing board.


Anyway I solved this last one I was stuck on by throwing away the idea of creating a dual NOR (which has several gates per NOR unit) based latch when I realised I could get away with just 2 gates with one feedback arranged like so:

Code: [Select]

 VCC  +--------+
  |   |        |
  +--NPN--PNP--+
      |    |   |
      S    R   Q


So simple, yet it gives the required behaviour with not more than one gate delay when setting or resetting.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Finally, a flash game for hardware engineers
« Reply #2 on: August 01, 2009, 10:42:51 PM »
I dare say the FPGA wizards here will breeze through this game :)
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Finally, a flash game for hardware engineers
« Reply #3 on: August 02, 2009, 11:18:30 PM »
Quote from: bloodline;517728
I say, use a microcontroler to sample the inputs and then generate the correct outputs... What!? I'm a software guy... ;) :D


LOL. Oh well, anyway I got past that one. Now it's the bloody toggle latch that I'm finding a problem. Especially since the timing is tighter on this one.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Finally, a flash game for hardware engineers
« Reply #4 on: August 05, 2009, 09:41:03 AM »
Hi Oliver,

I've actually advanced past the latches, and got the set/reset latch down to a minimal number of junctions. The toggle latch was trickier as I based it on the same design, but to "debounce" it, it required a rising edge detection, but that's actually doable with a PNP junction that connects it's own output to it's base, giving a 1 gate delay duration high output whenever the input is high.

You get to build an 8-bit SRAM later, complete with a 3-bit address bus and read/write selector. I'm not quite up to that yet.
int p; // A
 

Offline KarlosTopic starter

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Finally, a flash game for hardware engineers
« Reply #5 on: August 06, 2009, 02:28:50 PM »
Quote from: Oliver;518104
Damn it, you're going to get me hooked on a game again. Hasn't happened for years.


Yeah, I have wasted a few lunch breaks on it so far :D
int p; // A