Eight to three priority encoder simulation-Is it possible?

Is it possible to simulate an 8 bit to 3 bit priority encoder the same as a CD4532 with QSPICE?
This is the description lifted from the data sheet.

CD45328 consists of combination-
al logic that encodes the highest priority
input (D7-DO) to a 3-bit binary code. The
eight inputs, D7 through DO, each have an
assigned priority; D7 is the highest priority
and DO is the lowest. The priority encoder is
inhibited when the chip-enable input Ei is
low. When Ei is high, the binary representa-
tion of the highest priority input appears on
output lines Q2-Q0, and the group select
line GS is high to indicate that priority inputs
are present. The enable-out (Eo) is high
when no priority inputs are present. If any
one input is high, Eo is low and all cascaded
lower-order stages are disabled.

Maybe it can be done using verilog. Unfortunately I have no experience with verilog so i’m not sure where to start. Can anyone help?

I think you can build a symbol with its logic diagram, but do you only need this or the entire logic relationship?

1 Like

Thanks for your reply.I want it so I can understand how it works before I test the real chip on a breadboard.

This symbol is made according to the CD4532 logic table. This model does not include delay time or logic output impedance. I compared the simulation output with the logic table, and it seems to follow. If there are any discrepancies, please feel free to provide feedback.

Qspice/Symbols-KSKelvin/digital/CD4000 series/CD4532-Behavorial.qsym · KSKelvin-Github

example.CD4532-Behavorial.qsch (49.9 KB)

This is the concept schematic to build this symbol if you want to learn to build symbol for logic devices.
concept.CD4532-Behavorial.qsch (39.6 KB)

1 Like