Atanua - real-time logic simulator

Discussion in 'CAD' started by Sol_HSA, Jan 29, 2008.

  1. Sol_HSA

    Sol_HSA Guest

    As the final project in my school, I'm building a real-time logic
    simulator called Atanua. It's available from:

    http://iki.fi/sol/atanua.html

    Although it's a pure ideal-component logic simulator (not SPICE), it's
    rather functional. The workflow for trying out different
    configurations is pretty optimized, and the whole point is to be a
    rather 'lightweight' tool for learning logic components.

    I'm trying to do daily releases of it, building a part or two a day
    while working full time, but as of this writing the simulated parts
    include:

    Base parts list:

    * Logic '0' (ground) and '1' (vcc)
    * Logic AND, OR, NAND, NOR, XOR and NOT gates, in both US and
    Finnish symbols
    * SR-latch (NOR and NAND versions), Synchronized SR-latch, D-
    latch, T-latch, JK-latch
    * JK-flipflop, D-flipflop, T-flipflop, SR-flipflop
    * 2-bit MUX block, 3-bit DX-block
    * Synchronized clock generators (0.1Hz, 0.2Hz, 0.5Hz, 1Hz, 2Hz,
    5Hz, 10Hz, 20Hz, 50Hz, 100Hz, 200Hz, 500Hz)
    * Labels

    Chips list:

    * 7400 - Quad 2-input NAND Gate
    * 7402 - Quad 2-input NOR Gate
    * 7404 - Hex Inverter
    * 7408 - Quad 2-input AND Gate
    * 7410 - Triple 3-input NAND Gate
    * 7420 - Dual 4-input NAND Gate
    * 7432 - Quad 2-input OR Gate
    * 7447 - BCD to 7-segment Decoder/Driver
    * 7473 - 7473: Dual J-K Flip-Flop with Clear
    * 7474 - 7474: Dual D Positive Edge Triggered Flip-Flop with
    Preset and Clear
    * 7485 - 4-bit Magnitude Comparator
    * 7486 - Quad 2-input XOR Gate
    * 7490 - Decade Counter (separate Divide-by-2 and Divide-by-5
    sections)
    * 74138 - 3 to 8-line Decoder/Demultiplexer
    * 74139 - Dual 2 to 4-line Decoder/Demultiplexer
    * 74151 - 8-Line to 1-Line Data Selector/Multiplexer
    * 74195 - 4-bit Parallel-Access Shift Register
    * 74163 - Synchronous 4-bit Binary Counter with Synchronous Clear
    * 74164 - 8-bit Parallel-Out Serial Shift Register with
    Asynchronous Clear
    * 74283 - 4-bit Binary Full Adder
    * 74574 - Octal D-Type Edge-Triggered Flip-Flop with Three-State
    Outputs

    I/O parts list:

    * LEDs (red, green, blue, cyan, magenta, yellow, white)
    * 7-segment displays in same colors, normal and inverted
    * Keyboard keys (0,1,2...9, a,b,c...z)

    If you take it for a spin, please send me mail about your experiences!
    Many of the features I've implemented are result of user feedback.
     
    Sol_HSA, Jan 29, 2008
    #1
    1. Advertisements

  2. Sol_HSA

    John Larkin Guest

    On Mon, 28 Jan 2008 23:00:28 -0800 (PST), Sol_HSA
    <> wrote:

    >As the final project in my school, I'm building a real-time logic
    >simulator called Atanua. It's available from:
    >
    >http://iki.fi/sol/atanua.html
    >
    >Although it's a pure ideal-component logic simulator (not SPICE), it's
    >rather functional. The workflow for trying out different
    >configurations is pretty optimized, and the whole point is to be a
    >rather 'lightweight' tool for learning logic components.
    >
    >I'm trying to do daily releases of it, building a part or two a day
    >while working full time, but as of this writing the simulated parts
    >include:
    >
    >Base parts list:
    >
    > * Logic '0' (ground) and '1' (vcc)
    > * Logic AND, OR, NAND, NOR, XOR and NOT gates, in both US and
    >Finnish symbols
    > * SR-latch (NOR and NAND versions), Synchronized SR-latch, D-
    >latch, T-latch, JK-latch
    > * JK-flipflop, D-flipflop, T-flipflop, SR-flipflop
    > * 2-bit MUX block, 3-bit DX-block
    > * Synchronized clock generators (0.1Hz, 0.2Hz, 0.5Hz, 1Hz, 2Hz,
    >5Hz, 10Hz, 20Hz, 50Hz, 100Hz, 200Hz, 500Hz)
    > * Labels
    >
    >Chips list:
    >
    > * 7400 - Quad 2-input NAND Gate
    > * 7402 - Quad 2-input NOR Gate
    > * 7404 - Hex Inverter
    > * 7408 - Quad 2-input AND Gate
    > * 7410 - Triple 3-input NAND Gate
    > * 7420 - Dual 4-input NAND Gate
    > * 7432 - Quad 2-input OR Gate
    > * 7447 - BCD to 7-segment Decoder/Driver
    > * 7473 - 7473: Dual J-K Flip-Flop with Clear
    > * 7474 - 7474: Dual D Positive Edge Triggered Flip-Flop with
    >Preset and Clear
    > * 7485 - 4-bit Magnitude Comparator
    > * 7486 - Quad 2-input XOR Gate
    > * 7490 - Decade Counter (separate Divide-by-2 and Divide-by-5
    >sections)
    > * 74138 - 3 to 8-line Decoder/Demultiplexer
    > * 74139 - Dual 2 to 4-line Decoder/Demultiplexer
    > * 74151 - 8-Line to 1-Line Data Selector/Multiplexer
    > * 74195 - 4-bit Parallel-Access Shift Register
    > * 74163 - Synchronous 4-bit Binary Counter with Synchronous Clear
    > * 74164 - 8-bit Parallel-Out Serial Shift Register with
    >Asynchronous Clear
    > * 74283 - 4-bit Binary Full Adder
    > * 74574 - Octal D-Type Edge-Triggered Flip-Flop with Three-State
    >Outputs
    >
    >I/O parts list:
    >
    > * LEDs (red, green, blue, cyan, magenta, yellow, white)
    > * 7-segment displays in same colors, normal and inverted
    > * Keyboard keys (0,1,2...9, a,b,c...z)
    >
    >If you take it for a spin, please send me mail about your experiences!
    >Many of the features I've implemented are result of user feedback.


    Real-time? That's impressive. How fast a PC do I need to run, say, a
    16-bit PWM generator at 30 MHz?

    John
     
    John Larkin, Jan 29, 2008
    #2
    1. Advertisements

  3. Sol_HSA

    Sol_HSA Guest

    On Jan 29, 7:00 pm, John Larkin
    <> wrote:
    > On Mon, 28 Jan 2008 23:00:28 -0800 (PST), Sol_HSA
    > >As the final project in my school, I'm building a real-time logic
    > >simulator calledAtanua. It's available from:
    > >
    > >http://iki.fi/sol/atanua.html

    >

    [chop]
    > Real-time? That's impressive. How fast a PC do I need to run, say, a
    > 16-bit PWM generator at 30 MHz?
    >
    > John


    Heh, I did not state the fact that the simulation clock runs at 1kHz.
    If you want 30MHz, get a FPGA.
     
    Sol_HSA, Jan 30, 2008
    #3
  4. Sol_HSA

    John Fields Guest

    On Wed, 30 Jan 2008 02:57:43 -0800 (PST), Sol_HSA
    <> wrote:

    >On Jan 29, 7:00 pm, John Larkin
    ><> wrote:
    >> On Mon, 28 Jan 2008 23:00:28 -0800 (PST), Sol_HSA
    >> >As the final project in my school, I'm building a real-time logic
    >> >simulator calledAtanua. It's available from:
    >> >
    >> >http://iki.fi/sol/atanua.html

    >>

    >[chop]
    >> Real-time? That's impressive. How fast a PC do I need to run, say, a
    >> 16-bit PWM generator at 30 MHz?
    >>
    >> John

    >
    >Heh, I did not state the fact that the simulation clock runs at 1kHz.


    ---
    Then it's not running real-time, is it?


    --
    JF
     
    John Fields, Jan 30, 2008
    #4
  5. Sol_HSA

    william Guest

    Silly argument on the realtime aspect. It's limited in frequency, so
    what?

    It's a beautiful program, I love the graphics. I am stretching my
    brain right now, to see if I can come up with any creative designs.

    As a musician, of course, I would like to see some musical i/o via
    audio, or midi... But I nag everyone about that so feel free to
    ignore.


    It's great that you got to work on this for school, but I must
    encourage you to continue development when the class is over. =)

    William
     
    william, Jan 30, 2008
    #5
  6. Sol_HSA

    william Guest

    -The use of keyboard keys as switches is brilliant. Very well
    implemented.

    -I am not sure if the analyzer is supposed to graph the waveforms?

    -I am a big fan of the realism with the graphics. It looks like you
    used photographs of the chips. Please keep doing that. If possible,
    even have more than one photograph of chips. For example, perhaps the
    white 7seg display uses a slightly different photo than the yellow
    7seg.

    Suggestions:

    -When I double click on a Chip, it would be nice if a specification/
    help sheet came up, or an internet link was given.

    -(minor) The font seems to be pre anti-aliased for a specific zoom,
    but ideally would be dynamically anti aliased every time you switch
    zooms.

    -(not very serious): One click shopping. Press one button on the
    corner, and have all the parts purchased for you.

    -When I open a .atanua file with Atanua.exe (from the "open with.."
    prompt) it does not work. It crashes.

    -When I edit a .atanua file with a text editor, I noticed that the
    syntax of a wire is:
    <Wire chip1="2" pad1="0" chip2="15" pad2="1" />

    Does chip "2" stand for the second chip that is defined in the
    order of the text file? That could be problematic for people editing
    the xml file, because they would have to update many of the <wire>'s
    every time they insert or remove a chip. If you do continue to use
    chip index number's, perhaps that number should be included in the
    chip definition. EX:

    <Chip ID="2" Name="LED (red)" xpos="411041792" ypos="486539264" />

    I'm not sure how much this would solve, but perhaps something along
    these lines could be used to improve manual/third-party editing.
     
    william, Jan 30, 2008
    #6
  7. Sol_HSA

    Sol_HSA Guest

    Useful, constructive feedback on the usenet?

    /me pinches himself.

    Yes, I'm still awake.

    >It's a beautiful program, I love the graphics. I am stretching my
    >brain right now, to see if I can come up with any creative designs.


    Thanks, and if you come up with anything, I'd love to see them.

    >As a musician, of course, I would like to see some musical i/o via
    >audio, or midi... But I nag everyone about that so feel free to
    >ignore.


    I'm considering making some kind of audio chip, most probably in a
    form of a preprogrammed microcontroller of some sort, which could be
    used for audio. I'd rather not make any components that can't be found
    in real life, even if it is tempting and would be quite easy.. Some
    kind of aural feedback from the program would be nice in any case.

    All real-life sound chips that I've found so far are way too
    complicated for this kind of use. Something like "select note with
    pins 1-4, trigger note with pin 5" would be ideal.

    >It's great that you got to work on this for school, but I must
    >encourage you to continue development when the class is over. =)


    It's not for a class, this is my final project. Any further
    development will depend on the interest - if nobody's using it,
    there's really no point.. =)

    > -I am not sure if the analyzer is supposed to graph the waveforms?


    Not sure what you mean?

    > -I am a big fan of the realism with the graphics. It looks like you
    > used photographs of the chips. Please keep doing that. If possible,
    > even have more than one photograph of chips. For example, perhaps the
    > white 7seg display uses a slightly different photo than the yellow
    > 7seg.


    I think the 7seg I photographed was green, but anyway.. that all
    depends on how much time I'm going to spend on texture work. And so
    far I think it's more important to get functionality in than tune the
    graphics.

    > -When I double click on a Chip, it would be nice if a specification/
    > help sheet came up, or an internet link was given.


    shellexec("http://www.google.com/search?q=74ls74+data+sheet"); ? =)

    > -(minor) The font seems to be pre anti-aliased for a specific zoom,
    > but ideally would be dynamically anti aliased every time you switch
    > zooms.


    The fonts are bitmapped, so I'm not going to touch this.

    > -(not very serious): One click shopping. Press one button on the
    > corner, and have all the parts purchased for you.


    Heh, many electronics CAD programs actually do have a 'shopping list'
    generators, so that far it wouldn't be too far-fetched. However, any
    actual design will need other parts as well.. and you can collect the
    shopping list from the XML fairly easily.

    > -When I open a .atanuafile withAtanua.exe (from the "open with.."
    > prompt) it does not work. It crashes.


    Heh, that isn't implemented at all, a good catch. I probably have some
    placeholder code there which causes the crash.

    > -When I edit a .atanuafile with a text editor, I noticed that the
    > syntax of a wire is:
    > <Wire chip1="2" pad1="0" chip2="15" pad2="1" />
    >
    > Does chip "2" stand for the second chip that is defined in the
    > order of the text file? That could be problematic for people editing
    > the xml file, because they would have to update many of the <wire>'s
    > every time they insert or remove a chip. If you do continue to use
    > chip index number's, perhaps that number should be included in the
    > chip definition. EX:
    >
    > <Chip ID="2" Name="LED (red)" xpos="411041792" ypos="486539264" />
    >
    > I'm not sure how much this would solve, but perhaps something along
    > these lines could be used to improve manual/third-party editing.


    The XML format isn't too flexible at the moment, i.e. the parts must
    come before the wires. Chip "2" stands for the third chip (since first
    chip is #0). Pad/pin numbering is more confusing, as it doesn't follow
    the actual pin number in data sheets, but instead whatever order the
    pins are defined in code. Most often this is "top row, left to right,
    bottom row, left to right" but there's no definite rule on that.

    In any case, the XML format is more flexible for possible third
    parties than the binary format was.

    Thanks,
    Jari
     
    Sol_HSA, Jan 30, 2008
    #7
  8. Sol_HSA

    David Harmon Guest

    On Tue, 29 Jan 2008 09:00:10 -0800 in sci.electronics.basics, John
    Larkin <> wrote,
    >Real-time? That's impressive. How fast a PC do I need to run, say, a
    >16-bit PWM generator at 30 MHz?


    It doesn't matter how fast your PC is. Of course it will be a
    simulated 30 Mhz. He didn't say it was an Emulator, just a
    Simulator.
     
    David Harmon, Jan 30, 2008
    #8
  9. Sol_HSA

    John Larkin Guest

    On Wed, 30 Jan 2008 10:05:12 -0800, David Harmon <>
    wrote:

    >On Tue, 29 Jan 2008 09:00:10 -0800 in sci.electronics.basics, John
    >Larkin <> wrote,
    >>Real-time? That's impressive. How fast a PC do I need to run, say, a
    >>16-bit PWM generator at 30 MHz?

    >
    >It doesn't matter how fast your PC is. Of course it will be a
    >simulated 30 Mhz.


    Then it won't be real-time.

    John
     
    John Larkin, Jan 31, 2008
    #9
  10. Sol_HSA

    Sol_HSA Guest

    Ever since my first post about this, lots of new features have been
    added, bugs fixed, etc.

    Still available from http://atanua.org =)

    The website has also been updated to include more information,
    screenshots etc. Requests, ideas, and so on still appreciated.

    Changelog:
    - New chips: 74181 (some signals may be inverted), 74240, 74241,
    74244, 74245
    - New chip: 2051 (a 20-pin 8051 variant) based on my 8051 simulator
    - Inverted (low-active) LEDs added
    - New/load/save button order changed
    - Wires now use anti-aliased lines with variable thickness depending
    on the zoom factor. Probably have to make a config file to control
    these kinds of features vs. performance.
    - Windows open-with system should now work (as well as giving atanua
    filename to open, same thing in practise)
    - Wire tooltip for invalid state re-labeled
    - Homework validation system added
    - Deleting connection pins with only two wires will now join the two
    lines (as if they were never split). Pins with more (or less) than two
    wires are deleted as before.
    - Wires are now "fried" when a chip is deleted - connecting wires are
    deleted recursively if connected to non-complicated connection pins.
    - Added atanua.xml, user-editable config file with several options.
    - Made toolkit 15 pixels wider by default.
    - Crash at startup in some configurations fixed.
    - Using 7420 caused crash; fixed.
    - Major logic change: invalid state is now propagated. That is, if you
    feed 'invalid' signal to a chip, it will generate 'invalid' signal
    out. The old behavior (i.e. invalid input generating highz state) can
    be enabled by changing the option PropagateInvalidState to 0 in the
    configuration file. Due to the severity of this change it's possible
    that this introduced some bugs.
    - I believe 7447 BI/RBO pin functionality is now fixed.
    - New program icon
    - Added some custom, context-sensitive mouse cursors. These can be
    disabled in the config file.
    - Toolkit slider now works more like people might expect it to, for
    good or bad. This one can't be disabled in the config file. =)
    - If user clicked on an item, released, and then click-dragged item
    from the toolkit, the work area would move a bit when the item was
    created. Fixed.
    - Newly created items now get keyboard focus.
    - Labels can now span several lines (i.e. accept enter) Still can't,
    and probably won't, support cursor movement.
     
    Sol_HSA, Feb 7, 2008
    #10
  11. Sol_HSA

    Mr. Yantho Guest

    On Feb 7, 12:53 am, Sol_HSA <> wrote:
    > Ever since my first post about this, lots of new features have been
    > added, bugs fixed, etc.
    >
    > Still available fromhttp://atanua.org=)
    >
    > The website has also been updated to include more information,
    > screenshots etc. Requests, ideas, and so on still appreciated.
    >
    > Changelog:
    > - New chips: 74181 (some signals may be inverted), 74240, 74241,
    > 74244, 74245
    > - New chip: 2051 (a 20-pin 8051 variant) based on my 8051 simulator
    > - Inverted (low-active) LEDs added
    > - New/load/save button order changed
    > - Wires now use anti-aliased lines with variable thickness depending
    > on the zoom factor. Probably have to make a config file to control
    > these kinds of features vs. performance.
    > - Windows open-with system should now work (as well as giving atanua
    > filename to open, same thing in practise)
    > - Wire tooltip for invalid state re-labeled
    > - Homework validation system added
    > - Deleting connection pins with only two wires will now join the two
    > lines (as if they were never split). Pins with more (or less) than two
    > wires are deleted as before.
    > - Wires are now "fried" when a chip is deleted - connecting wires are
    > deleted recursively if connected to non-complicated connection pins.
    > - Added atanua.xml, user-editable config file with several options.
    > - Made toolkit 15 pixels wider by default.
    > - Crash at startup in some configurations fixed.
    > - Using 7420 caused crash; fixed.
    > - Major logic change: invalid state is now propagated. That is, if you
    > feed 'invalid' signal to a chip, it will generate 'invalid' signal
    > out. The old behavior (i.e. invalid input generating highz state) can
    > be enabled by changing the option PropagateInvalidState to 0 in the
    > configuration file. Due to the severity of this change it's possible
    > that this introduced some bugs.
    > - I believe 7447 BI/RBO pin functionality is now fixed.
    > - New program icon
    > - Added some custom, context-sensitive mouse cursors. These can be
    > disabled in the config file.
    > - Toolkit slider now works more like people might expect it to, for
    > good or bad. This one can't be disabled in the config file. =)
    > - If user clicked on an item, released, and then click-dragged item
    > from the toolkit, the work area would move a bit when the item was
    > created. Fixed.
    > - Newly created items now get keyboard focus.
    > - Labels can now span several lines (i.e. accept enter) Still can't,
    > and probably won't, support cursor movement.


    I've been looking to use this in a classroom setting to do some
    experimenting that might be a little too time consuming on an actual
    breadboard. Using it to explain flip-flops and digital counters
    should be good. Ive had a problem with trying to set up a 7 segment
    display using the 7447 chip. I match up the pinouts from the 7447
    (the pop-up labelling is slick) And the other inputs are on, except
    what would be ABCD. I can't get any type of numbers to show up. I've
    done this same experiment physically, so I'm a bit confounded. Any
    idea what I'm doing wrong? PS Love the prog.
     
    Mr. Yantho, Feb 15, 2008
    #11
  12. On Feb 7, 4:53 pm, Sol_HSA <> wrote:
    > Ever since my first post about this, lots of new features have been
    > added, bugs fixed, etc.
    >
    > Still available fromhttp://atanua.org=)


    Damn, that looks good!
    Nice work.

    Dave.
     
    David L. Jones, Feb 16, 2008
    #12
  13. Sol_HSA

    Sol_HSA Guest

    > > Still available fromhttp://atanua.org=)
    >
    > I've been looking to use this in a classroom setting to do some
    > experimenting that might be a little too time consuming on an actual
    > breadboard. Using it to explain flip-flops and digital counters
    > should be good. Ive had a problem with trying to set up a 7 segment
    > display using the 7447 chip. I match up the pinouts from the 7447
    > (the pop-up labelling is slick) And the other inputs are on, except
    > what would be ABCD. I can't get any type of numbers to show up. I've
    > done this same experiment physically, so I'm a bit confounded. Any
    > idea what I'm doing wrong? PS Love the prog.


    The output from the 7447 requires "inverted" 7-seg parts, which is the
    most probable reason for problems. Load up the 7447.atanua from
    'tests' directory for a reference.

    P.s. OS X and Linux versions are now also available.
     
    Sol_HSA, Feb 18, 2008
    #13
  14. On Sun, 17 Feb 2008 22:07:54 -0800, Sol_HSA wrote:

    > P.s. OS X and Linux versions are now also available.


    Thanx for not assuming that Windows = the universe. I've seen a few
    other logic simulators for Linux, but they don't include the 74181, and I
    don't feel like stitching one together from individual gates. The CPU I
    want to design to serve as a target for Jack Crenshaw's 'Tiny' compiler
    will take long enough.
     
    Stephen J. Rush, Feb 18, 2008
    #14
  15. Sol_HSA

    lopes

    Joined:
    Oct 26, 2009
    Messages:
    1
    Likes Received:
    0
    7447 and Mac OsX Version

    Hello,

    I try to use a 7447 with an inverted 7 segments display, all the outpout of the 7447 are in red when I atempt to connect something, and when I put the cursor on the red line I got an error message.

    If I connect the an outpout of the 7447 to an inverted led I also got the same red line error.

    Is something to do to activate the 7447 device.

    Is it a bug of the Mac OsX version of atanua?

    Lopes
     
    Last edited: Oct 26, 2009
    lopes, Oct 26, 2009
    #15
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Radium

    Real Hardware Digital Real-time Synth

    Radium, Dec 22, 2003, in forum: General Electronics
    Replies:
    0
    Views:
    902
    Radium
    Dec 22, 2003
  2. Mike

    logic simulator recommendations

    Mike, Apr 1, 2006, in forum: Electronic Design
    Replies:
    8
    Views:
    1,278
    JeffM
    Apr 3, 2006
  3. Jack
    Replies:
    24
    Views:
    1,093
    Dbowey
    Nov 23, 2003
  4. Lorenzo Castelli

    Net Simulator: a digital system simulator

    Lorenzo Castelli, Oct 15, 2007, in forum: Electronic Design
    Replies:
    0
    Views:
    825
    Lorenzo Castelli
    Oct 15, 2007
  5. Sol_HSA

    Atanua - real-time logic simulator

    Sol_HSA, Jan 29, 2008, in forum: Electronic Basics
    Replies:
    13
    Views:
    1,414
    Stephen J. Rush
    Feb 18, 2008
  6. shaheen
    Replies:
    1
    Views:
    1,685
    rob_croxford
    Oct 26, 2010
  7. lewisRRL
    Replies:
    1
    Views:
    399
    donkey
    May 6, 2015
Loading...