EmbDev.net

Forum: FPGA, VHDL & Verilog Express a given function using a PLD.


von Xideden (xideden)


Rate this post
useful
not useful
Hi! I have an assignment, where we have to express a function f, using a 
PLDcell.

The PLDcell is defined as such:
1
y <= i xor ((x(5) and x(4) and x(3)) or (x(2) and x(1) and x(0)));

How do I go about doing this? go from my function to expressing it using 
a single PLDcell? (I am not trying to find the solution, I am trying to 
learn/understand) I am stuck at the fact that the minimized function 
only has 3 or-terms and 3 different variables, meanwhile the defined 
PLDcell has 7 inputs..

I tried doing a truth table for each, the function and the PLDcell, and 
try to find where it matches? but it doesn't seem like the correct way 
because the PLDcell has 2^7 possible combinations. Happy to read stuff, 
if someone can point me in the right direction :)

von Rick D. (rickdangerus)


Rate this post
useful
not useful
I would convert the truth table into an K-map:
https://en.wikipedia.org/wiki/Karnaugh_map

von Kay-Uwe R. (dfias)


Rate this post
useful
not useful
Karnaugh is not usuable for your expression. There are 7 input signals 
(x(0) ... x(5) + i) - by far too much for Karnaugh.
If you want to transform the expression into a PLD representation (NOT - 
AND - OR stages) you should look for 'De Morgan's rules'. Also, XOR must 
be translated into a NOT/AND/OR expression first.
It is a lot of paper work to bring it into the right format. I would 
suggest to do this first for an easier expression than this one.
However, you can ignore the science behind and just use the expression 
as is. The PLD compiler will do the work for you.

von Foobar (asdfasd)


Rate this post
useful
not useful
> y <= i xor ((x(5) and x(4) and x(3)) or (x(2) and x(1) and x(0)));

> I am stuck at the fact that the minimized function
> only has 3 or-terms and 3 different variables, meanwhile the defined
> PLDcell has 7 inputs..

Then you made a mistake in the minimization.  None of the 7 variables 
(i, x(0) to x(5)) can be eliminated.

von Kay-Uwe R. (dfias)


Rate this post
useful
not useful
This is how the PLD logic interprets your formula:
1
y =
2
   (    x(0) and     x(1) and x(2) and not i)
3
or (not x(0) and not x(3)          and     i) 
4
or (not x(0) and not x(4)          and     i) 
5
or (not x(0) and not x(5)          and     i) 
6
or (not x(1) and not x(3)          and     i) 
7
or (not x(1) and not x(4)          and     i) 
8
or (not x(1) and not x(5)          and     i) 
9
or (not x(2) and not x(3)          and     i) 
10
or (not x(2) and not x(4)          and     i) 
11
or (not x(2) and not x(5)          and     i) 
12
or (    x(3) and     x(4) and x(5) and not i)
It is indeed very complex to come here, but you can try it by hand and 
check your result using an online calculator, e.g.
https://www.dcode.fr/boolean-expressions-calculator
(replace x(0) with a, x(1) with b a.s.o.)

von Tau J. (Company: group) (fasgya30)


Rate this post
useful
not useful
I tried doing a truth table for each, the function and the PLDcell, and
try to find where it matches? but it doesn't seem like the correct way
because the PLDcell has 2^7 possible combinations. Happy to read stuff,
if someone can point me in the right direction

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.