2
\$\begingroup\$

I've found several datasheets for the 74ls181 with pinout and function diagrams as pictured below.

This from Jameco (where I bought mine): https://www.jameco.com/Jameco/Products/ProdDS/46973.pdf

enter image description here

enter image description here

This one as the first google search result: http://www.esi.uclm.es/www/isanchez/apuntes/ci/74181.pdf

enter image description here

These do not at all agree with each other. What happens to P and G when switching modes? What happens to the outputs when switching modes? Do they invert or not? How does one go about sorting out this mess?

\$\endgroup\$
2
  • \$\begingroup\$ Can you circle the discrepancies? \$\endgroup\$
    – mike65535
    May 11 '18 at 18:56
  • \$\begingroup\$ inverted outputs, inverted P and/or G? \$\endgroup\$ May 11 '18 at 19:29
2
\$\begingroup\$

Polarity of operands is a sort of arbitrary thing, a matter of data interpretation. What the different symbols mean is that if the data are treated as "active LOW", then the propagate signals also must be treated as "active LOW", and vice versa.

From the datasheet, page 5-2:

As indicated, the LS181 can be used with either active LOW inputs producing active LOW outputs or with active HIGH inputs producing active HIGH outputs.

How does one go about sorting out this mess? This circuit was probably used last time about 30 years ago. The mess is usually sorted out by implementing a clean implementation of the ALU in FPGA using clear Verilog altogether with all control circuitry, pipelines, caches, microcode, and peripheral ports, all in chip much smaller than the LS181 itself.

\$\endgroup\$
8
  • \$\begingroup\$ P&G are always active 0 and not affected by Mode =0,1 complement for functions \$\endgroup\$ May 11 '18 at 19:08
  • \$\begingroup\$ what about F. Do the outputs invert or not? \$\endgroup\$ May 11 '18 at 19:09
  • \$\begingroup\$ I'm more concerned with the outputs and the function of P and G under each circumstance. I understand that this change is only a matter of interpretation with regard to inputs. \$\endgroup\$ May 11 '18 at 19:10
  • \$\begingroup\$ @RobertMeade, if you really want to use this dinosaur of electronics, get some circuit simulator with proper library for SN74 chips, write a test bench, and figure out the exact behavior. \$\endgroup\$ May 11 '18 at 19:15
  • \$\begingroup\$ i'll probably have to do just that. Good idea \$\endgroup\$ May 11 '18 at 19:17
2
\$\begingroup\$

It's a way of getting extra functions out of the device.

What they're saying is, the ALU can be used with active-high or active-low data, but to do that you have to re-map the functions as shown in the tables. For example, the active-high AND operation (F = 4'b10011) becomes an active-low OR by DeMorgan's Theorem.

So if you need a function that isn't provided in the active high set but is in the active-low, you can NOT your data and use the active-low opcode. You could do this by adding a NOT control to the input and output prior to and after the ALU for example and have your microcode flip the data as needed.

Or, you could use extra instructions to NOT input the data, do the op, then un-NOT it once it's finished. Slower, but takes less hardware.

Honestly though, I've never seen it used with active-low data. It's just too weird to wrap one's head around.

BONUS: Explanation of the 'LS181, with an interactive sim. Link: http://www.righto.com/2017/03/inside-vintage-74181-alu-chip-how-it.html

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.