Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/29/05 05:54
Read: times


 
#86087 - CPLD/ABEL question/invitation
Hi All,

I've got four questions on CPLDs. please let me know which one you are answering otherwise I shall get lost. I'm a little more stupid than I seem to be...you know.
Here I want to ask/invite/welcome all those who are not familiar with CPLDs -like myself- to start learning together. CPLDing seems to be fun. Read these first:
some web pages:
http://www.ee.upenn.edu/rca/softw...rimer.html
http://www.seattlerobotics.org/encoder/2...6/cpld.htm
Xilinx "Getting started":
http://www.xilinx.com/xlnx/xil_...learn_page
Some pdfs:
http://direct.xilinx.com/bvdocs/ap...app073.pdf
http://direct.xilinx.com/bvdocs/ap...app069.pdf
http://direct.xilinx.com/bvdocs/ap...app104.pdf
http://direct.xilinx.com/bvdocs/ap...app100.pdf
http://direct.xilinx.com/bvdocs/ap...app338.pdf
My questions:
Consider the two "glue logic" implementations of the following decoders. They're supposed to provide CS of a 28F512 at addresses 0000H to FFDFH and LE of 32 HC573s placed at the rest of the addr. space from FFE0H to FFFFH.

These two decoders are logically idenical, but it is better to use the second one, not just because of it's less chip count, but because of propagation delay and glitches. The ABEL code for a CPLD implementation should be something like this:

module decoder;

"input pins
WR pin 4;
A0 pin 1;
A1 pin 6;
A2 pin 7;
A3 pin 2;
A4 pin 3;
A5 pin 11;
A6 pin 5;
A7 pin 13;
A8 pin 18;
A9 pin 20;
A10 pin 14;
A11 pin 23;
A12 pin 15;
A13 pin 24;
A14 pin 63;
A15 pin 69;

"output pins
CS pin 25 istype 'com';
L0 pin 17 istype 'com';
L1 pin 31 istype 'com';
L2 pin 32 istype 'com';
L3 pin 19 istype 'com';
L4 pin 34 istype 'com';
L5 pin 35 istype 'com';
L6 pin 21 istype 'com';
L7 pin 26 istype 'com';
L8 pin 40 istype 'com';
L9 pin 33 istype 'com';
L10 pin 41 istype 'com';
L11 pin 43 istype 'com';
L12 pin 36 istype 'com';
L13 pin 37 istype 'com';
L14 pin 45 istype 'com';
L15 pin 39 istype 'com';
L16 pin 46 istype 'com';
L17 pin 44 istype 'com';
L18 pin 51 istype 'com';
L19 pin 52 istype 'com';
L20 pin 47 istype 'com';
L21 pin 54 istype 'com';
L22 pin 55 istype 'com';
L23 pin 48 istype 'com';
L24 pin 50 istype 'com';
L25 pin 57 istype 'com';
L26 pin 53 istype 'com';
L27 pin 58 istype 'com';
L28 pin 61 istype 'com';
L29 pin 56 istype 'com';
L30 pin 65 istype 'com';
L31 pin 62 istype 'com';

equations

CS = A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5;
L0 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&!A2&!A1&!A0;
L1 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&!A2&!A1&A0;
L2 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&!A2&A1&!A0;
L3 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&!A2&A1&A0;
L4 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&A2&!A1&!A0;
L5 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&A2&!A1&A0;
L6 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&A2&A1&!A0;
L7 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&!A3&A2&A1&A0;
L8 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&!A2&!A1&!A0;
L9 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&!A2&!A1&A0;
L10 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&!A2&A1&!A0;
L11 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&!A2&A1&A0;
L12 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&A2&!A1&!A0;
L13 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&A2&!A1&A0;
L14 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&A2&A1&!A0;
L15 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&!A4&A3&A2&A1&A0;
L16 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&!A2&!A1&!A0;
L17 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&!A2&!A1&A0;
L18 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&!A2&A1&!A0;
L19 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&!A2&A1&A0;
L20 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&A2&!A1&!A0;
L21 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&A2&!A1&A0;
L22 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&A2&A1&!A0;
L23 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&!A3&A2&A1&A0;
L24 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&!A2&!A1&!A0;
L25 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&!A2&!A1&A0;
L26 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&!A2&A1&!A0;
L27 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&!A2&A1&A0;
L28 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&A2&!A1&!A0;
L29 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&A2&!A1&A0;
L30 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&A2&A1&!A0;
L31 = !WR&A15&A14&A13&A12&A11&A10&A9&A8&A7&A6&A5&A4&A3&A2&A1&A0;

"Version for the astigmatic here:
L1 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1]);
L2 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);
L3 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1]);
L4 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0]);
L5 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1]);
L6 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0]);
L7 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1]);
L8 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0]);
L9 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,1]);
L10 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]);
L11 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1]);
L12 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0]);
L13 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1]);
L14 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0]);
L15 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1]);
L16 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0]);
L17 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1]);
L18 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0]);
L19 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1]);
L20 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0]);
L21 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1]);
L22 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0]);
L23 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1]);
L24 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0]);
L25 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1]);
L26 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0]);
L27 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1]);
L28 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0]);
L29 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1]);
L30 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0]);
L31 = !WR & (AD[15..0] == [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]);
"These arrays or whatever must be declared somewhere, I know.

end decoder;

They say I can use the following code instead of the first one.

when (A5 & A6 & A7 & A8 & A9 & A10 & A11 & A12 & A13 & A14 & A15) then
{
CS = 1;
when (WR) then
{
LE[0..15] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
}
else
{
L0 = (AD[4..0] == [0,0,0,0,0]);
L1 = (AD[4..0] == [0,0,0,0,1]);
L2 = (AD[4..0] == [0,0,0,1,0]);
L3 = (AD[4..0] == [0,0,0,1,1]);
L4 = (AD[4..0] == [0,0,1,0,0]);
L5 = (AD[4..0] == [0,0,1,0,1]);
L6 = (AD[4..0] == [0,0,1,1,0]);
L7 = (AD[4..0] == [0,0,1,1,1]);
L8 = (AD[4..0] == [0,1,0,0,0]);
L9 = (AD[4..0] == [0,1,0,0,1]);
L10 = (AD[4..0] == [0,1,0,1,0]);
L11 = (AD[4..0] == [0,1,0,1,1]);
L12 = (AD[4..0] == [0,1,1,0,0]);
L13 = (AD[4..0] == [0,1,1,0,1]);
L14 = (AD[4..0] == [0,1,1,1,0]);
L15 = (AD[4..0] == [0,1,1,1,1]);
L16 = (AD[4..0] == [1,0,0,0,0]);
L17 = (AD[4..0] == [1,0,0,0,1]);
L18 = (AD[4..0] == [1,0,0,1,0]);
L19 = (AD[4..0] == [1,0,0,1,1]);
L20 = (AD[4..0] == [1,0,1,0,0]);
L21 = (AD[4..0] == [1,0,1,0,1]);
L22 = (AD[4..0] == [1,0,1,1,0]);
L23 = (AD[4..0] == [1,0,1,1,1]);
L24 = (AD[4..0] == [1,1,0,0,0]);
L25 = (AD[4..0] == [1,1,0,0,1]);
L26 = (AD[4..0] == [1,1,0,1,0]);
L27 = (AD[4..0] == [1,1,0,1,1]);
L28 = (AD[4..0] == [1,1,1,0,0]);
L29 = (AD[4..0] == [1,1,1,0,1]);
L30 = (AD[4..0] == [1,1,1,1,0]);
L31 = (AD[4..0] == [1,1,1,1,1]);
}
}
else
{
CS = 0;
LE[0..15] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
}

Now,

1) Is the "code" generated by ABEL compiler identical for these two expressions of the same thing? It IS supposed to be identical but is it? Who guarantees this? I mean...you know...it's a very delicate task to be done by the compiler, and a beautiful one of course. The compiled code of these two expressions must exactly yield to the same burnt fuses or whatever in the two CPLDs. It does not seem to me that the compiler designers have been stupid enough to neglect this point. what do you think? Maybe the sum of products structure inherently implies this, right? wrong?

2) Given to the ABEL compiler one of these two expressions, does it really produce the simplest arrengement of gates? With the least number of gates? Again consider the two "glue logic" implementations of the decoder at the top of the page. Some "simplification" -similar to what was done to the first decoder that led to the second- is supposed to be done in the CPLDs by the compiler. I feel designing a decoder like this is not just some "Carno map stuff". Will the compiler be intelligent enough?

3) Somehow a repeatition of the same questions: Do we have to "tell" the ABEL compiler what we want in the simplest way i.e. (A and B) instead of !(!A or !B)? for instance? or the compiler has the ability to "reduce" it to death?

4) Assume a combinational-only CPLD. now, if a number of signals are geiven to CPLD input pins all at once, will the combinational outputs get out of output pins at once? I mean is the propagation delay the same for all the output signals independent of their logic function? In my upper implementation for instance, had we had the CPLD to negate a signal, would the negated signal get out of the CPLD faster than the LE signals? Or they all would get out with the same say 7.5ns(for 9572) delay?

Best.






List of 18 messages in thread
TopicAuthorDate
CPLD/ABEL question/invitation            01/01/70 00:00      
   CPLD questions            01/01/70 00:00      
   ABEL questions            01/01/70 00:00      
   vell...            01/01/70 00:00      
   Minimisation            01/01/70 00:00      
      NP complete            01/01/70 00:00      
   Answer to the third question            01/01/70 00:00      
   CPLD headstart (ppt)            01/01/70 00:00      
   New questions            01/01/70 00:00      
      new answers            01/01/70 00:00      
         JTAG pull-up            01/01/70 00:00      
            re: JTAG pull-up            01/01/70 00:00      
   NP completness            01/01/70 00:00      
   basic error            01/01/70 00:00      
      Eric            01/01/70 00:00      
   How to Build a Jtag Cable            01/01/70 00:00      
      pegboard            01/01/70 00:00      
   jtag cable            01/01/70 00:00      

Back to Subject List