Logic Simulation Hack Chat with Al Williams

The Truth (Table) Is Out There

Wednesday, March 2, 2022 12:00 pm PST Local time zone:
Hack Chat
Similar projects worth following

Al Williams will host the Hack Chat on Wednesday, March 2 at noon Pacific.

Time zones got you down? Try our handy time zone converter.


Many of us probably remember -- some fondly, some less so -- our first encounter with a truth table. The little grid of ones and zeros seemed simple enough, but it held real power in its tabular representation of the output of a logic circuit for a given set of inputs. It's what makes more complex logic circuits possible, but only up to a point -- add enough gates, flip flops, and counters, and keeping track of what's high and what's low becomes problematic with just pencil and paper.

If you've reached the point where keeping your digital design in your head doesn't work anymore, or if you never could keep your NANDs and NORs straight, then you're ready for a digital logic simulator. Applications like Falstad and LogiSim let you build a design using everything from discrete logic gates to complete assemblies like adders, counters, and even arithmetic logic units. Add in some passives like capacitors and inductors, and a logic simulator may be the only tool you need to bring a design to life in the virtual world before ever touching a breadboard.

To help us figure out where logic simulators fit in our design processes, Hackaday Staff Writer Al Williams will hop onto the Hack Chat with us. Al ran a very successful FPGA Bootcamp series back in 2018, which included a review of digital logic using Falstad. He'll expand on that in this Hack Chat, so come along with your questions and comments. You won't want to miss this one!

  • Hack Chat Transcript, Part 2

    Dan Maloney03/02/2022 at 21:16 0 comments

    Al Williams12:27 PM
    Well you'd think the functional would not care though.. but yeah so all your post synth work is useless once you go to ASIC and you have to start over

    Al Williams12:28 PM
    You know some of the FPGAs had a mux architecture not LUT

    Al Williams12:28 PM
    And that was like relay logic ...

    Rob Weinstein12:28 PM
    Change of topic: Do you have any recommendations for one of the graphical simulators like 'Logisim-evolution' or 'Digital' that can combine digital and analog simulation in the same design? For example, something that could simulate, say, 56-bit shift registers and serial adders and also control the build-up and collapse of inductors' current through the segments of an LED display. I'd like the running simulation to show the contents of the shifters zipping along and the LEDs responding to the inductor field collapse.

    Al Williams12:28 PM
    If you think relay logic is best with say switches in series for AND and in parallel for OR that's not very efficient. Turns out t hey are a mux and you can do anything with Mux

    Al Williams12:29 PM
    LTSpice can simulate digital:

    Al Williams12:29 PM

    wrong link

    Al Williams12:29 PM
    Mux relay logic:

    Al Williams12:29 PM
    Or to be really perverse: Clever relay XOR:

    Ethan Waldo12:29 PM
    Nice! Something new to absorb!

    Al Williams12:30 PM
    I wonder if anyone has any favorites to share with Ron. I personally would try to do mixed using Spice. It isn't perfect but I know how to use it and it lets me get as analog as I want

    RichardCollins12:30 PM
    @Rob Weinstein You are best to write your own. Best of luck with your discussion. I have to go. This sounds like people who have known each other a long time.

    Al Williams12:30 PM
    But Flastad will do it. Qucs will too

    Al Williams12:31 PM
    As Richard says, you can write your own too

    Al Williams12:31 PM
    There are some python libs made for doing custom simulations but I don't know if any of them have analog or not

    Al Williams12:31 PM
    Not my link but this might be useful too


    Al Williams12:32 PM
    Just out of curiosity, how many of you have done at least one of the bootcamps?

    Ethan Waldo12:33 PM

    Al Williams12:33 PM
    There was a 4th one that for now is the last one and wasn't well publicized too: 4th Bootcamp:

    Al Williams12:33 PM
    The state machines are fun because once you figure them out you realize everything is a state machine

    Al Williams12:33 PM
    in real life I mean

    Ethan Waldo12:34 PM
    I tend to find my abilities with state machines are severely limited by my own creativity. It's great to see examples of how other people are using them.

    Al Williams12:34 PM
    The classic is the traffic light:

    Al Williams12:35 PM


    Becoming A State Machine Design Mastermind

    Imagine a robot with an all-around bump sensor. The response to the bump sensor activating depends on the previous state of the robot. If it had been going forward, a bump will send it backwards and vice versa. This robot exhibits behavior that is easy to model as a state machine.

    Read this on Hackaday

    Al Williams12:36 PM
    So what have you done with a state machine @Ethan Waldo ?

    Ethan Waldo12:36 PM
    Just the typical multi-cycle pipeline type stuff. Nothing that serious.

    Al Williams12:37 PM
    That's another case where you can describe flip flops or you can describe behavior and let tools generate for you

    Ethan Waldo12:37 PM
    Oh, and AWS Step Functions :P

    Al Williams12:37 PM
    Typical trade off... you CAN do a better job than the tools in theory but in practice you might not do a better job

    Al Williams12:38 PM
    One thing I see a lot in industry that I don't see much at hobby level is hardware in the loop simulation

    Al Williams12:39 PM
    In theory,...

    Read more »

  • Hack Chat Transcript, Part 1

    Dan Maloney03/02/2022 at 21:15 0 comments

    Dan Maloney12:00 PM
    OK, folks, good afternoon/evening/morning to you all. We're ready to kick off the Hack Chat! I'm Dan, I'll be moderating today along with Dusan for Hackaday's own Al Williams!

    Dusan Petrovic12:00 PM
    Hi everyone!

    Dusan Petrovic12:00 PM
    Hi Al!

    Al Williams12:01 PM

    Al Williams12:01 PM
    Good to see everyone virutally

    Dan Maloney12:01 PM
    I just saw Al over on the event page chat, asked him to pop over here.

    There we go -- hi Al!

    Bil Herd12:01 PM
    Hey Al, Dan

    Al Williams12:01 PM
    I'm in multiple places at once....

    Dan Maloney12:02 PM
    That sounds like something from the DSM-V...

    Bil Herd12:02 PM
    Ah but the more we know about where you are the less we know about your energy state

    Al Williams12:02 PM
    How's your cat Bil?

    Bil Herd12:02 PM
    Lol... good. Lost the turkey in the cold snap tho...

    Al Williams12:02 PM
    Ready to go Dan?

    Al Williams12:03 PM
    Good to see everyone here...

    Darrin B joined  the room.12:03 PM

    Al Williams12:04 PM
    Ok well let me say a few things about simulation and then we can just kind of freewheel with wherever we want to go with the topic.

    Dan Maloney12:04 PM
    Oh yes, by all means -- how about a little about yourself for those who don't know you?

    Al Williams12:04 PM
    Well, most of you know me from Hackaday and the old among us will remember I was with Dr. Dobb’s Journal and some other magazines back when magazines were made from forest products. Let’s see… I seem to bounce around between things… my undergraduate degree is about 80% EE but I finished with a CS degree (long story). Then I have a Master’s in EE from Columbia (the University, not the country which is spelled different).

    Al Williams12:04 PM
    So I’ve done software ranging from low-level assembly to BIOS code. Hardware design from the die level to vacuum tubes to FPGAs. I have designs that have been at the bottom of the ocean and in orbit. I’ve been a ham radio operator for about 45 years or so. I’ve written a bunch of books and a while back I wrote the FPGA bootcamp series that is on

    Al Williams12:04 PM
    We actually started out with Bootcamp #1 which uses Verilog, but after talking to some people, I found out that many people really needed to learn just the fundamentals of digital logic. So we did bootcamp #0 which uses online tools to do simulations in your browser. Of course, the Verilog is also a simulation (until it is compiled) and that can be in your browser, too.

    stefan joined  the room.12:04 PM

    Al Williams12:05 PM
    It reminds me of when I was in school a very long time ago. We learned drafting with T-squares and pencils. But we had two weeks of “computer aided drafting” where we punched cards like: rectangle(20,20,100,195) and circle(15,30,44). At the time, I thought that was stupid because the future was drawing stuff on the computer.

    Al Williams12:05 PM
    But if you look at modern CAD tools, they do let you “code” things so you can have parametric CAD. Some tools like OpenSCAD that’s all you do. If you are making a donut shape, drawing is OK. But if you are making something complex, modeling the relationships is more efficient in the long run. So this also happens with simulations. A lot of people – me included – start learning about Verilog and think that it is stupid because you can just draw schematics. But when you have a CPU with tens of thousands of gates, the schematic entry gets clunky fast. Verilog or VHDL or something like that is the way to go. Consider this 7 segment decoder:

    Vs this one:

    Al Williams12:05 PM
    always @(*)

    case (number)

    4'h0: dispoutput <= 7'b1111110; // all segments but center

    4'h1: dispoutput <= 7'b0110000; // two segments to form "1"

    4'h2: dispoutput <= 7'b1101101; // five segments to form "2"

    . . .

    Ethan Waldo12:06 PM
    Amazing, a Hack Chat with someone that types faster than 1 sentence per 3 minutes!

    Al Williams12:06 PM
    So a few random topics we could chat about...

    Schematic entry vs HDL....

    Read more »

View all 2 event logs

Enjoy this event?



Asgaut Eng wrote 03/02/2022 at 17:19 point

I would like to recommend this simulator by Helmut Neemann: over LogiSim (which is no longer maintained). 

  Are you sure? yes | no

Interested in attending?

Become a member to follow this event or host your own