Using K-maps in circuit design

In analog VLSI it’s not uncommon to need basic asynchronous state machines to generate various control signals for things. These are usually pretty small and custom made. When I do them I use a technique called “flow table synthesis” which is just a fancy K-map at the end of the day.

For more on the technique one can look here:

P.S. A common new college grad digital VLSI interview question is divide a clock by 3 but the output clock needs a ~50% duty cycle. Flow table synthesis can give a easy compact solution that kills in power, performance, area…

My thoughts on the question you posed on the podcast…

When we were taught Karnough maps back in school, I was neutral about them. Many examples we did do by hand seemed trivial, but I could see how they could be useful for large designs, as they optimize the number of logical elements. This was not an area of EE that I was going to focus on, so it didn’t really stick with me.

My instinct was right. I very briefly used them early in my career, but as you guys pointed out, so much functionality has been rolled into our ICs these days it’s rare to design a circuit any more having a sea of logic chips.

I don’t know if these days with the decreasing size and power consumption of logic gates. is this even a concern for the typical engineer these days? But I can still see this being useful for people designing chips, but not so much for PCB circuit design these days.

What about solving that problem in an automated way by computer? Would such an algorithm use K-maps, or are there other methods available?

When you discussed how infrequently you used logic gates these days, I was reminded of the families of low-pin-count, single-gate chips. These SMD transistor-sized gates can be plopped down exactly where they’re needed, and can be quite handy in a design that only needs a few gates here and there.

For example, 74AHC1G00 is one NAND gate in an SOT25 package. My first search result was from Diodes Inc, and I know TI also makes a similar series.

Since you brought it up, I feel compelled to also comment on Smith charts. When we learned those in school. I was really heavy into analog and RF design, and I paid much more attention to Smith charts than I did K-maps. The timing in my education probably played a role as well, because this was at a point where I began to seriously question how the hell did all these crazy math equations we were using in E-mag actually relate to the real world. I was fortunate to have some excellent professors at that time, and made it through that “crisis” in reasonably good shape: I reconciled this by understanding that all the complex (in the real/imaginary plane) math we were doing was just a tool that approximated real life and was useful in solving problems. In particular, only the real part of the equations was “real”, the imaginary part was, well, “imaginary” and was just necessary baggage — required by the mathematical rules, but in the end, not corresponding to any actual physical quantity.

Because of my keen interest in things RF, I found the Smith chart absolutely fascinating. Knowing how it worked and how to use it seemed almost magical. But even back then, I kinda wondered how much help it could be anymore. I had a rudimentary programmable calculator at the time, and I could do almost everything the Smith chart did in a few short and simple programs in my hand.

I think any value of the Smith chart these days is not so much as a graphical calculator, but as a way to visualize a system / problem. This view is supported by the fact that many network analyzers still have a Smith chart view.

And if you think the Smith chart is crazy, go have a look at the combined Impedance + Admittance Smith charts, which have both charts overlapped in different colors. It’s wild.

I probably still have this somewhere … there was also a plastic Smith chart that was permanent. You marked on it with something temporary like a grease pencil and it rotated around, not unlike a circular slide rule.

Image from here: Reddit - Dive into anything

Last comment — I also experienced the problem you guys mentioned about professors not putting the subject matter in context. It seems like maybe I had a slightly better experience — we had a lot of good profs at Ga Tech back in the early 80s, some of them surprisingly young. I could also guess that being involved in Ham radio and making projects outside of coursework probably helped me put many things into context without being formally explained by the professors. I did meet some fellow students who had never built a circuit outside of the labs, and wondered how well they coped with all the material we were ingesting.

For me at least, knowing the context, no matter how trivial, makes it easier to learn. Why is this thing useful? How were these techniques developed? Even if the answer is “this is how we used to do things but it is rarely used today”, I think can be helpful. Just a blanket “just learn this because I said so” is almost a block to my learning something.

I’ve been talking to some university engineers recently, and it stuck me how random the quality and ability of a professor can be. It seems like it’s the luck of the draw. You can find poor professors at the most expensive and prestigious institutions, and you can find excellent ones at the loneliest community college. And by poor and excellent, I’m talking about their ability to teach, not necessarily their subject matter ability — those two aspects don’t always go hand in hand.

K-maps are graphical/visual aids for logic minimization. Back in the day, I used Quine-McCluskey because it could be programmed. I even wrote a program for the C64 to do it. In assembly, so you can judge my mental state at the time from that.

I worked in academia for a time. Like any organization, you get a real grab-bag of personalities/abilities. But then they’re immersed in a toxic stew of perverse incentives. It’s a wonder anybody learns anything. In a lot of cases, I think the students learn more from each other…

1 Like

David, that’s a good observation. Another random factor is what school a given student selects. And also the era. Just because I had a really good luck of the draw when I attended university doesn’t necessarily mean someone attending the same university ten years before or after will have the same experience — although I suspect there’s some correlation with time, especially within a year or two.

About learning from other students, I hadn’t thought about that until you brought it up. And in my case, it was a big factor. Not only was there study groups (more so when I lived on campus than later when I was off), but being in the Ham radio club, older members would steer me in the right direction when I took on a project that was over my head. The time I had the crazy idea to use an old TT-4 teletype as a printer for my C-64 (it worked but was hella noisy) comes to mind. Also entering the coop program, which I did for financial reasons, was a big boost to my skills. It was a sneaky thing —I wasn’t trying to learn, just make money. But because the job was fun, I got additional education without even trying — AND got paid to boot.

I know this is an engineering forum, so it goes without saying that we’re engineers or at least interested in things engineering. But regarding luck, just the basic choice of an engineering career is another factor itself. I had a mild interest in electronics, and it seemed like a good field to enter. But it wasn’t like I was hell-bent on it. I hadn’t chosen EE because of hireability or future earning power. It was a pleasant surprise when the Dean of the EE school told us incoming freshman that EEs were in high demand, and especially so with the advent of digital electronics and computers. Our prospects for employment after graduation would be very high, and the long-term demand for EEs was expected to be rock solid or to grow in the years following. He was substantially right (although I hear from young engineers here in South Korea that mechanical engineering is the latest “top” field to shoot for, YMMV). Had I stumbled into say, Art History or English Literature, things would be quite different.

So yeah, luck does play a big part in getting a good education, which is far from ideal. I’m not in touch with the overall situation at universities today, but my feeling is that it’s only gotten worse in the past few decades.

I think universities have gotten worse in terms of imparting useful knowledge per dollar (higher tuition coupled with outdated material like three semesters of manual differentiation/integration).

But the total educational environment may be better:

  1. Course material from many individuals, universities, companies that’s readily available from all over the world.
  2. Forums where help is freely given.
  3. FOSS software that rivals much of the commercial offerings.
  4. Cheap engineering supplies/equipment/services from China.

The ability to get an education may have been freed from the university, but they still have a lock on credentialing. If I were 18 again, this would be my plan:

  1. Go to community college for the basic courses (no use paying high tuition for mediocre lessons in literature).
  2. Transfer to the best in-state university (for lower tuition).
  3. Don’t concentrate on grades in my classes. Just make sure I pass. The point of the university is to provide me with a BS credential.
  4. While I’m in school, I’d also be doing my own projects, writing blogs, doing youtubes, etc. And i’d be talking about them with fellow students and faculty as well as online. I’d be making contacts and a portfolio as well as developing people skills. If I could throw in coop, so much the better.
  5. Once I graduate, I have my BS credential to get me past that first HR filter. Then I can use my contacts to get interviews where I impress them with my portfolio which shows my skills and the ability to be self-directed.
  1. Don’t concentrate on grades in my classes. Just make sure I pass. The point of the university is to provide me with a BS credential.

Many internships and other various opportunities will have a minimum GPA requirement. Getting straight As is probably too far in one direction, but not concentrating on grades at all is probably too far in the other.

We’ve certainly gotten off track. How about them Karnough maps? :sunglasses:

By the end of college, I treated it this way. The grade didn’t matter as long as I passed. My GPA never prevented me from getting a job or internships.

This is a good path imo. I would also throw in being able to use the tools available like AI.

One of the questions I ask engineer’s now in interviews is what kind of AI tools they have experience with and their thoughts on them. Examples of use, ect.

I think its important to use the tools, but also know the principles behind the tools.

For instance, have students write out their KVL equations for a circuit. Then solve them using Python/numpy or Octave. Then have them do it with SPICE.

Or solve simple problems in electromagnetics analytically. Then use OpenEMS to replicate the solutions.

Totally on board with this, with how I was taught in school (and still is from students I have talked to) they never go past doing everything by hand… sometimes you get to use a graphing calculator. But in the industry you would do it with python/spice/ect.