classical logic

46
North Lindsey College 2014 LOGIC RESEARCH Assignment 1 Edward Clark

Upload: anne-marie-trenholme

Post on 11-Mar-2016

225 views

Category:

Documents


6 download

DESCRIPTION

Assignment 1 for Combinational and sequential logic

TRANSCRIPT

Page 1: Classical logic

LOGIC RESEARCHAssignment 1

Edward Clark

2014North Lindsey College

Page 2: Classical logic

Classical Logic – A Very Brief History A digital Artefact. Through almost two thousand years and many civilisations and empires Logic was defined and redefined from Aristotles Organon. Aristotle's Organon introduces his theory of syllogisms, which is a logic with a 

restricted form of judgments: assertions take one of four forms, All Ps are Q, Some Ps are Q, No Ps are Q, and Some Ps are not Q.  These judgments find themselves if two pairs of two dual operators, and each operator is the negation of another, relationships that Aristotle summarised with his square of oppositions. Aristotle explicitly formulated the law of the excluded middle and law of non-contradiction in justifying his system, although these laws cannot be expressed as judgments within the syllogistic framework.

In the 19th century Logic thinking changed George Boole's algebraic reformulation of logic, his system of Boolean logic; The first-order logic found in Gottlob Frege's Begriffsschrift. Computability logic is a semantically constructed formal theory of computability, as 

opposed to classical logic, which is a formal theory of truth; integrates and extends classical, linear and intuitionistic logics.

Many-valued logic, including fuzzy logic, which rejects the law of the excluded middle and allows as a truth value any real number between 0 and 1.

Intuitionistic logic rejects the law of the excluded middle, double negative elimination, and the De Morgan's laws;

Linear logic rejects idempotency of entailment as well; Modal logic extends classical logic with non-truth-functional ("modal") operators. Paraconsistent logic (e.g., dialetheism and relevance logic) rejects the law of 

noncontradiction; Relevance logic, linear logic, and non-monotonic logic reject monotonicity of 

entailment;

Logic1. The study of the principles of reasoning, especially of the structure of propositions 

as distinguished from their content and of method and validity in deductive reasoning.

2.a. A system of reasoning: Aristotle's logic.

Page 3: Classical logic

b. A mode of reasoning: By that logic, we should sell the company tomorrow.c. The formal, guiding principles of a discipline, school, or science.

3. Valid reasoning: Your paper lacks the logic to prove your thesis.4. The relationship between elements and between an element and the whole in a 

set of objects, individuals, principles, or events: There's a certain logic to the motion of rush-hour traffic.

5. Computer Science.a. The non-arithmetic operations performed by a computer, such as sorting, 

comparing, and matching, that involve yes-no decisions.b. Computer circuitry.c. Graphic representation of computer circuitry.

Read more: http://www.answers.com/topic/logic#ixzz2pRR83Ex2

The intended semantics of classical logic is bivalent. With the advent of algebraic logic it became apparent however that classical propositional calculus admits other semantics. In Boolean-valued semantics (for classical propositional logic), the truth values are the elements of an arbitrary Boolean algebra; "true" corresponds to the maximal element of the algebra, and "false" corresponds to the minimal element. Intermediate elements of the algebra correspond to truth values other than "true" and "false". The principle of bivalence holds only when the Boolean algebra is taken to be the two-element algebra, which has no intermediate elements.

The history of Boolean LogicBoolean logic or Boolean algebra is a logical calculus which has only two values, 'true' or 'false'. It was conceived by mathematician, George Boole. During the time when Boole was defining this system of logic, Charles Babbage was developing his 'analytical engine' - today's computer. So, the Boolean logic has been in use with the ancestor of the digital computer. This logic is still an important tool used in search engines and databases for modern-day operation.

Back to History!In the year 1847, English mathematician George Boole (1815 - 1864) published, 'The Mathematical Analysis of Logic'. This book of his showed how using a specific set of logic can help one to wade through piles of data to find the required information. The importance of Boole's work was his way of approach towards logic. By incorporating logic into mathematics, Boole was able to determine what formed the base of Boolean algebra. It was the analogy which algebraic symbols had with those that represented 

Page 4: Classical logic

logical forms. This basic analogy gave birth to what is known as the Boolean Algebra. As we know that working of computers are based on the binary number system (1 or 0), where 1 means 'ON' and 0 signifies 'OFF'. These two states are represented by a difference in voltage. Now, the application of the Boolean logic to the computer's binary number system was incorporated by an MIT grade student Claud Shannon. This was how the Boolean search came into place.

The SymbolsPrecisely, Boolean Logic is defined as a logical system of operators - 'AND', 'OR' and 'NOT', and is a way of comparing individual bits. These connectors or operators are now used in computer construction, switching circuits, etc.

The AND, OR and NOT operators are also known as logic gates, and are used in logical operation. Their schematic diagram can be viewed from any book based on Boolean Algebra. The following describes the symbols and the operation of the logic gates.

The AND GateThe AND gate is denoted by a dot (.). In an AND gate, there will be more than one input and only one output. Here, if all inputs are ON, the output will also be ON. And, if either of the inputs is OFF, then the output will also be OFF. The AND gate's symbol is '&'. Let's see the working in an example.

A . B = C (Here, A and B are the inputs, and C is the output)As we know that in the binary number system, 1 means ON and 0 means OFF. So, if we take the inputs to be 1, the output will also give us 1.

A . B = C1 . 1 = 1 (A = 1, B = 1).

If any of the input is taken as 0, then output will also be 0A . B = C1 . 0 = 0 (A = 1, B = 0)

The OR GateThe OR gate is denoted by plus (+). Here, there will be more than one input and just one output. If we take both the inputs as 1, the output will also be 1. However, unlike the AND gate, if either of the inputs is 0, the output will still be one. Its symbol is '/'. Example;

A + B = C (Here, A and B are the inputs, and C is the output)

For A = 1, B = 1A + B = C1 +1 = 1

For A = 1, B = 0

Page 5: Classical logic

A + B = C1 + 0 = 1

For A = 0, B = 0A + B = C0 + 0 = 0

The NOT GateThe NOT Gate is also known as the inverter gate. As the name suggests, here the output will be opposite to the input. There will be one input and one output. That is, if the input is 1 (ON), then the output will be 0 (OFF). The NOT gate is symbolized by a line over top of the input (Ā). The sign is also known as a 'complement'. For example,

For example, if A is the input, the output will be ĀThat is,For A = 1, output is 0And for A = 0, ouput is 1

The NAND and the NOR gates are known to be the universal gates in Boolean logic. Their combinations may be used to form any kind of logic gates. A NAND gate is formed by combining a NOT and AND gate. A NOR gate is a combination of a NOT and OR gate. The other logic gates are XOR (exclusive OR) and XNOR gates.

Simplifying Boolean ExpressionsFor simplifying Boolean expressions, there are certain laws which need to be followed. They are the Boolean Rules for Simplification.

The Idempotent LawsA . A = AA + A = A

The Associative Laws(A . B) C = A (B . C)A + B) + C = A + (B + C)

The Commutative LawsA . B = B . AA + B = B + A

The Distributive LawsA (B + C) = AB + ACA + BC = (A + B) (A + C)

The Complement LawsA . Ā = 0A + Ā = 1

Page 6: Classical logic

The Involution LawA(double complement) = A

The Law of UnionA + 1 = 1A + 0 = A

The Law of IntersectionA . 1 = AA . 0 = 0

The Law of AbsorptionA (A + B) = AA + (A . B) = A

The Law of Common IdentitiesA (Ā + B) = A . BA + (Ā . B) = A + B

DeMorgan's Law(A . B)(complement) = A(complement) + B(complement)(A + B)(complement) = A(complement) . B(complement)

Let's take a simple example of a simplified Boolean Expression. Suppose a logical circuit gives an expression A + ĀB = A + BNow, the simplification goes like this,

A + ĀB= (A + Ā) (A+B)= A + B

With the help of truth table for each logic gates, and the logical circuit, it becomes easy to simplify any Boolean expression.

The history of Boolean origination, has far more depths than what has been described. The Boolean logic has given way to several innovations and applications in the filed of computer science. No doubt, the Boolean algebra is an admirable finding by one of the greatest mathematicians George Boole.Read more at Buzzle: http://www.buzzle.com/articles/boolean-origination-history-and-origin-of-boolean-logic.htmlSource :  http://www.buzzle.com/articles/boolean-origination-history-and-origin-of-boolean-logic.html

Page 7: Classical logic

What is programmable logic?Programmable logic is loosely defined as a device with configurable logic and flip-flops linked together with programmable interconnect.  Memory cells control and define the function that the logic performs and how the various logic functions are interconnected. Though various devices use different architectures, all are based on this fundamental idea.What kinds of programmable logic devices are available today? How are they different from one another?There are a few major programmable logic architecture devices  available today. Each architecture  typically has vendor-specific sub-variants within each type. The major types include:

Simple Programmable Logic Devices (SPLDs), Complex Programmable Logic Devices (CPLDs), and Field Programmable Gate Arrays (FPGAs) Field Programmable Inter Connect (FPICs)

SPLD - Simple Programmable Logic DeviceAlso known as:

PAL (Programmable Array Logic, Vantis) GAL (Generic Array Logic, Lattice) PLA (Programmable Logic Array) PLD (Programmable Logic Device)

SPLDs are the smallest and consequently the least-expensive form of programmable logic. An SPLD is typically comprised of four to 22 macrocells and can typically replace a few 7400-series TTL devices. Each of the macrocells is typically fully connected to the others in the device. Most SPLDs use either fuses or non-volatile memory cells such as EPROM, EEPROM, or FLASH to define the functionality.CPLD - Complex Programmable Logic DeviceAlso known as:

EPLD (Erasable Programmable Logic Device) PEEL EEPLD (Electrically-Erasable Programmable Logic Device) MAX (Multiple Array matriX, Altera)

CPLDs are similar to SPLDs except that they are significantly higher capacity. A typical CPLD is the equivalent of two to 64 SPLDs. A CPLD typically contains from tens to a few hundred macrocells. A group of eight to 16 macrocells is typically grouped together into a larger function block. The macrocells within a function block are usually fully connected. If a device contains multiple function blocks, then the function blocks are further interconnected. Not all CPLDs are fully connected between function blocks-this is vendor and family specific. Less than 100% connection between function blocks means 

Page 8: Classical logic

that there is a chance that the device will not route or may have problems keeping the same pinout between design revisions.In concept, CPLDs consist of multiple PAL-like logic blocks interconnected together via a programmable switch matrix. Typically, each logic block contains 4 to 16 macrocells, depending on the architecture.

CPLDs provide a natural migration path for SPLD designers seeking higher density. CPLDs have a PAL-like architecture and generally four or more PALs comfortably fit into a CPLD. Most CPLDs support the SPLD development languages such as ABEL, CuPL, PALASM, etc.CPLDs are generally best for control-oriented designs, due in part to their fast pin-to-pin performance. The wide fan-in of their macrocells makes them well-suited to complex, high performance state machines.Some of the major variations between CPLD architectures include the number of product terms per macrocell, whether product terms from one macrocell can be borrowed or allocated to another macrocell, and whether the interconnect switch matrix is fully- or partially-populated.In some architectures, when the number of product terms required exceeds the number available in the macrocell, additional product terms are borrowed from an adjoining macrocell. This makes the CPLD device useful for a wider variety of applications. When borrowing product terms from an adjoining macrocell, that macrocell may no longer be 

Page 9: Classical logic

useful. In some architectures, the macrocell still has some basic functionality. Borrowed product terms usually means increased propagation delay.Another difference in architectures is the number of connections within the switch matrix. A switch matrix supporting all possible connections is fully populated. A partially- populated switch supports most, but not all, connections. The number of connections within the switch matrix determines how easy a design will fit in a given device. With a fully-populated switch matrix, a design will route even with a majority of the device resources used and with fixed I/O pin assignment. Generally, the delays within a fully populated switch matrix are fixed and predictable.A device with a partially-populated switch matrix may have problems routing complex designs. Also, it may be difficult to make design changes in these devices without using a different pinout. Routing to a fixed pinout is important. It is far easier to change the internals of a programmable logic device than it is to re-layout a circuit board. The delays within a partially-populated switch matrix are not fixed and less easily predicted, similar to most FPGA devices. Though a partially populated switch matrix has some potential limitations, it is less expensive to manufacture.CPLDs are manufactured using one of three process technologies-EPROM, EEPROM, or FLASH. EPROM-based CPLDs are usually one-time programmable (OTP) unless they are in an UV-erasable windowed package. A device programmer or the manufacturer or distributor programs an EPROM-based CPLD.Generally, CPLDs are CMOS and use non-volatile memory cells such as EPROM, EEPROM, or FLASH to define the functionality. Many of the most-recently introduced CPLD families use a EEPROM or FLASH and have been designed so that they can be programmed in-circuit (also called ISP for in-system programmable). 

Table 1. CPLD Devices and Programming.Programmer Required In-Circuit Programmable

AlteraAtmel

CypressLatticePhilipsVantisXilinx

AlteraCypressLatticeVantisXilinx

FPGA - Field Programmable Gate ArrayAlso known as:

LCA (Logic Cell Array) pASIC (programmable ASIC) FLEX, APEX (Altera) ACT (Actel)

Page 10: Classical logic

ORCA (Lucent) Virtex (Xilinx) pASIC (QuickLogic)

FPGAs are a distinct from SPLDs and CPLDs and typically offer the highest logic capacity. An FPGA consists of an array of logic blocks, surrounded by programmable I/O blocks, and connected with programmable interconnect. A typical FPGA contains from 64 to tens of thousands of logic blocks and an even greater number of flip-flops. Most FPGAs do not provide 100% interconnect between logic blocks (to do so would be prohibitively expensive). Instead, sophisticated software places and routes the logic on the device much like a PCB autorouter would place and route components.A generic description of an FPGA is a programmable device with an internal array of logic blocks, surrounded by a ring of programmable input/output blocks, connected together via programmable interconnect. There are a wide variety of sub-architectures within this group. The secret to density and performance in these devices lies in the logic contained in their logic blocks and on the performance and efficiency of their routing architecture.

There are two primary classes of FPGA architectures: coarse-grained, and fine-grained.

Page 11: Classical logic

Coarse-grained architectures consist of fairly large logic blocks, often containing two or more look-up tables and two or more flip-flops. In a majority of these architectures, a four-input look-up table (think of it as a 16x1 ROM) implements the actual logic. The larger logic block usually corresponds to improved performance.

Table 1. FPGA Architectures and Processes.Architecture Static Memory Anti-Fuse Flash

Coarse-grained

Altera: (FLEX, APEX)Atmel: (AT40K)DynaChipLucent: (ORCA)Vantis: (VF1)Xilinx: (XC3000,XC4000xx,Spartan,Virtex)

QuickLogic: (pASIC) .

Fine-grained

Actel: (SPGA)Atmel: (AT6000) Actel: (ACT) Gatefield

NOTE: Also see the summary table of programmable devices and manufacturers.The other architecture type is called fine-grained. In these devices, there are a large number of relatively simple logic blocks. The logic block usually contains either a two-input logic function or a 4-to-1 multiplexer and a flip-flop. These devices are good at systolic functions and have some benefits for designs created by logic synthesis.Another difference in architectures is the underlying process technology used to manufacture the device. Currently, the highest-density FPGAs are built using static memory (SRAM) technology, similar to microprocessors. The other common process technology is called anti-fuse, which has benefits for more plentiful programmable interconnect.SRAM-based devices are inherently re-programmable, even in-system. However, they require some form of external configuration memory source. The configuration memory holds the program that defines how each of the logic blocks functions, which I/O blocks are inputs and outputs, and how the blocks are interconnected together. The FPGA either self-loads its configuration memory or an external processor downloads the memory into the FPGA. When self-loading, the FPGA addresses a standard byte-wide PROM-much like a processor addresses its boot PROM-or uses a special sequential-access serial PROM. When downloaded by a processor, the FPGA appears much like a standard microprocessor peripheral. The configuration time is typically less than 200 ms, depending on the device size and configuration method.In contrast, anti-fuse devices are one-time programmable (OTP). Once programmed, they cannot be modified, but they also retain their program when the power is off. Anti-fuse devices are programmed in a device programmer either by the end user or by the factory or distributor.Some FPGAs have system-level features built-in like on-chip bussing, on-chip RAM for building small register files or FIFOs, and built-in JTAG boundary-scan support.Most FPGAs use either SRAM or anti-fuse CMOS technology. SRAM-based FPGAs are in-system programmable whereas anti-fuse-based FPGAs are one-time programmable.

Page 12: Classical logic

TTL and CMOSTTL (Transistor-Transistor Logic) is a name for type of logic circuits which are constructed using the bipolar transistors. 

In general the bipolar transistors such as the NPN and PNP transistors are current operated devices. In these types of transistors, when used for digital logic circuits, typically the input voltage is applied across the Base-Emitter junction. As a result of this a small base current is produced in that junction. This small base current is magnified by the transistor's current gain factor B(called Beta), resulting in a large amount of collector-emitter current. This is basically how a TTL switch works. 

The TTL family of circuits are generally very fast, but this speed comes at the cost of higher power dissipation. Also, a typical TTL logic gate circuit requires multiple transistors and other passive components such as resistors. This  results in lower number of gates that can be put on an IC built using TTL family. 

The CMOS (Complimentary Metal Oxide Semiconductor) family of logic circuits are built using Metal Oxide Semiconductor(MOS) Field Effect Transistors (FET). These types of transistors are voltage operated devices. A typical CMOS logic gate circuit can be constructed using as little as two MOSFET transistors (A CMOS Inverter) resulting in a much higher density of logic gates that can be put on an IC. 

Also, CMOS gates use much much lower power to operate compared to the TTL gates because no resistors are required to build such circuits. 

CMOS logic also allows much higher operating voltages compared to the TTL family. One drawback of CMOS family is that they are slower than the TTL family, however these days this may no longer be true.Basically, TTL (transistor-transistor logic) was a series of chips produced that contained various configurations of logic gates that were designed to operate on a 5V logic high voltage system. CMOS were the same sort of idea but designed to work on a 12V rail, since this was a voltage more readily available in a lot of practical applications. CMOS were a lot more static sensitive before they were installed, but were usually faster. Source :       http://answers.yahoo.com/question/index?qid=1006043007001

FPIC - Field Programmable Interconnect DeviceAn FPIC is not really a logic device but rather a programmable "wiring" device. Through programming, an FPIC connects one pin on the device to another on the device providing programmable interconnect. FPICs use either SRAM or anti-fuse programming technology.

Page 13: Classical logic

I-Cube provides FPIC devices as stand-alone components. Aptix sells their FPIC devices as part of their hardware emulation system.

How do I design with programmable logic?A typical programmable logic design involves three steps:

1. Design EntryA variety of available tools are available to accomplish the design entry step. Some designers prefer to use their favourite schematic entry package while others prefer to specify their design using a hardware description language such as Verilog, VHDL, or ABEL. Others prefer to mix both schematics and language-based entry in the same design. There has been an on-going battle as to which method is best.Traditionally, schematic-based tools provided experienced designers more control over the physical placement and partitioning of logic on the device. However, this extra tailoring took time. Likewise, language-based tools allowed quick design entry but often at the cost of lower performance or density. Synthesis for language-based designs has significantly improved in the last few years, especially for FPGA design. In either case, learning the architecture and the tool helps you to create a better design. Technology-ignorant design is very possible, but at the expense of density and performance.Cores, such as a PCI bus interface or a DMA controller, are a new and increasingly important addition to the programmable logic world. These cores are predefined functions specifically implemented and verified in programmable logic. Cores have been available for gate arrays for quite some time. Now that FPGA devices push beyond the 50,000 gate density level, cores should become a popular design entry tool for programmable logic users. Core help reduce design and verification time on commonly used functions.

Page 14: Classical logic

2. Design ImplementationAfter the design is entered using schematic capture or synthesized, it is ready for implementation on the target device. The first step involves converting the design into the format supported internally by the tools. Most implementation tools read "standard" netlist formats and the translation process is usually automatic.Once translated, the tools perform a design rule check and optimization on the incoming netlist. Then the software partitions the designs into the logic blocks available on the device. Partitioning is an important step for both FPGAs and CPLDs. Good partitioning results in higher routing completion and better performance for FPGAs and increased density and performance for CPLDs.After the logic is partitioned into the logic blocks, the implementation software searches for the best location to place the logic block among all of the possibilities. The primary goal is to reduce the amount of routing resources required and to maximize system performance. This is a computer intensive operation for FPGAs and larger CPLDs. The implementation software monitors the routing length and routing track congestion while placing the blocks. In some systems, the implementation software also tracks the absolute path delays in order to meet user-

Page 15: Classical logic

specified timing constraints. Overall, the process mimics printed circuit board place and route.When the placement and routing process is complete, the software creates the binary programming file used to configure the device.In large or complex applications, the software may not be able to successfully place and route the design. Some packages allow the software to try different options or to run many iterations in an attempt to obtain a fully-routed design. Generally, try to use less than 85% of the available device resources. This technique provides the software extra resources to help route the design. Also, some vendors supply floorplanning tools to aid in physical layout. Layout is especially important for larger FPGAs because some tools have problems recognizing design structure. A good floorplanning tool allows the designer to convey this structure to the place and route software.

3. VerificationDesign verification occurs at various levels and steps throughout the design. There are a few fundamental types of verification as applied to programmable logic. Functional simulation is performed in conjunction with design entry, but before place and route, to verify correct logic functionality. Full timing simulation must wait until after the place and route step. After place and route, the software back-annotates the logic and routing delays to the netlist for simulation. While simulation is always recommended, programmable logic usually does not require exhaustive timing stimulation like gate arrays.In a gate array, full timing simulation is important because the devices are mask-programmed and therefore not changeable. Plus a design change typically involves thousand of extra dollars in non-recurring engineering (NRE) costs and weeks of time. Compare this to a programmable device where changes are made in minutes to hours at little or no cost. In a gate array, you cannot afford to find a mistake at the silicon level.One successful technique for programmable logic design is to functionally simulate the design to guarantee proper functionality, verify the timing using a static timing calculator, and then verify complete functionality by testing the design in the system.Programmable logic devices have a distinct advantage over gate arrays. Changes are practically free. With in-system programmable (ISP) devices, such as SRAM-based FPGAs and ISP CPLDs, changes are possible even while the parts are mounted in the system. Using in-system verification techniques, the design is verified at full speed, with all of the other hardware and software. Creating timing simulation vectors to match these conditions would be extremely difficult and time consuming.Some of the device vendors supply additional in-system debugging capabilities. For example, Xilinx ships a small pod called an XChecker 

Page 16: Classical logic

cable that connects to your serial port and allows quick downloading of a design. With a few simple additions to your design and board, the XChecker cable is capable of stopping or single-stepping the clock and can read back the state of internal flip-flops. Likewise, Actel's Action Probes provide access to internal nodes within their anti-fuse based FPGAs.One caveat—even though in-system debugging in quick and relatively easy, it should not be viewed as a complete replacement for simulation.

4. Device ProgrammingAfter creating a programming file, the programmable device is configured and ready for action. The actual programming method depends on the target technology. Most programmable logic technologies, including the PROMs for SRAM-based FPGAs, require some sort of a device programmer. For a nominal fee, your local distributor may do the actual production programming but a low-volume device programmer is generally required in the lab.In-system programmable devices, including SRAM-based FPGAs, may not require a physical programmer but do require some intelligent system resource to download the programming file into the device. This is performed with a microprocessor, micro-controller, or via a JTAG test port.

Which companies supply programmable logic?Ranked by 1997 sales volume (the last year that market data was available), the major high-density programmable logic suppliers are:

1. Altera2. Xilinx3. Vantis (formerly AMD's programmable logic division, now part of

Lattice)4. Lattice Semiconductor5. Actel6. Lucent Technologies7. Cypress Semiconductor8. Atmel9. QuickLogic

The vendor summary table indicates which vendor supplies which architecture using which process technology.

Page 17: Classical logic

Different devices use different process technologies to build the memory cells used to program a device. Which one is best?Static Memory Technology (SRAM)Similar to the technology used in static RAM devices but with a few modifications. The RAM cells in a memory device are designed for fastest possible read/write performance. The RAM cells in a programmable device are usually designed for stability instead of read/write performance. Consequently, RAM cells in a programmable device have a low-impedance connect to VCC and ground to provide maximum stability over voltage fluctuations.Because static memory is volatile (i.e.-the contents disappear when the power is turned off), SRAM-based devices are "booted" after power-on. This makes them in-system programmable and re-programmable, even in real-time. As a result, SRAM-based FPGAs are common in reconfigurable computing applications where the device's function is dynamically changed.The configuration process typically requires only a few hundred milliseconds at most. Most SRAM-based devices can boot themselves automatically at power-on much like a microprocessor. Furthermore, most SRAM-based devices are designed to work with either standard byte-wide PROMs or with sequential-access serial PROMs.SRAM cells are also used in many non-volatile CPLDs to hold some configuration bits to reduce internal capacitive loading.Vendors using SRAM technology: Xilinx FPGAs, Altera FPGAs, Actel (SPGA), Lucent FPGAs, Motorola FPGAs, DynaChip FPGAs.FuseFuse technology was the original programming technology for programmable logic. It is still used to manufacture bipolar SPLDs. A fuse is a metal link (connection) that can be programmed (open connection) by passing a current through the fusible link. Fuse technology is one-time programmable (OTP).Vendors using fuse technology: Texas InstrumentsAnti-fuseAnti-fuse is similar to fuse technology in that is one-time programmable (OTP). The anti- part of anti-fuse comes from its programming method. Instead of breaking a metal connection by passing current through it, a link is grown to make a connection. Anti-fuses are either amorphous silicon and metal-to-metal connections. They are usually physically quite small and have low on-resistance. Consequently, anti-fuse technology has benefits for creating programmable interconnect. However, they require large programming transistors on the device.Vendors using anti-fuse technology: Actel FPGAs, QuickLogic FPGAsEPROMElectrically Programmable Read-Only Memory. Similar to the technology used in standard EPROM memory devices. Commonly used in both SPLD and CPLD devices. EPROM cells are electrically programmed in a device programmer. Some EPROM-

Page 18: Classical logic

based devices are erasable using ultra-violet (UV) light if they are in a windowed package. However, most EPROM-based SPLD/CPLDs are in low-cost plastic packaging for production. Plastic packages cannot be UV erased.Vendors using EPROM technology: Xilinx, Altera, AMD, Cypress, Philips, Atmel, ICT, Waferscale Integration (WSI).EEPROM (E2PROM)Electrically-Erasable Programmable Read-Only Memory. An EEPROM memory cell is physically larger than an EPROM cell but offers the advantage of being erased electrically--no special UV erasers require. Plus, EEPROM devices can be erased, even in low-cost plastic packaging.

FLASHFLASH-erased (or bulk erased) electrically-erasable programmable read-only memory. FLASH has the electrically-erasable benefits of EEPROM but the small, economical cell size of EPROM technology.

MacrocellA macrocell on most modern CPLDs contains a sum-of-products combinatorial logic function and an optional flip-flop. The combinatorial logic function typically supports four to sixteen product terms with wide fan-in. In other words, a macrocell may have many inputs, but the complexity of the logic function is limited. Contrast this to most FPGA logic blocks where the complexity is unlimited, but the logic function has just four inputs.

One-Time Programmable (OTP)A one-time programmable device can only be programmed once. Once programmed, it cannot be re-programmed. All fuse- and anti-fuse-based devices are one-time programmable. EPROM-based devices in plastic packages are one-time programmable.

What does 'in-circuit programmable' or 'in-system programmable (ISP)' mean?Though definitions vary slightly, in-circuit programmable or in-system programmable (ISP) means that the device can be programmed while it is mounted on the circuit board with the other components.Most ISP devices are built using SRAM, EEPROM, or FLASH technologies. All SRAM-based devices are inherently in-system programmable because they must be configured on power-up.EEPROM and FLASH processes are erasable technologies. However, not all EEPROM- and FLASH-based are programmable while soldered on the circuit board. In-system programmability (ISP) requires special on-chip programming logic. Not all CPLDs have this logic, even if they are built with EEPROM and FLASH. Those lacking the on-chip programming circuitry are programmed and erased in a device programmer. Those with 

Page 19: Classical logic

the programming circuitry either use a vendor proprietary interface or a JTAG (IEEE 1149.1) standard interface to re-program the device.

What general advice can you give to a programmable logic user? Buyer beware!

There is a lot of marketing hype out there from the suppliers about how fast, how big, and how inexpensive their devices are. Take all vendor claims with a grain of salt, especially when they talk about their competition. Programmable logic is wonderful stuff and it will match up with vendor's claims in a few years.

Keep it synchronous.Avoid gated clocks! Let me state that again: Avoid gated clocks! If possible, use a single clock for your entire design.

Spaghetti code results in spaghetti logic.Watch your VHDL or Verilog coding style (and that goes for CuPL, ABEL, AHDL, and the rest). The way that you describe your logic has a direct impact on how well or poorly the logic synthesizer can create your design. Good coding can produce designs that run twice as fast or consume four times less logic! Some of the logic optimization software out there is truly amazing, but they don't work miracles on a sloppy design.

Keep it under 85.Try to keep your logic utilization at 85% of the available resources or below. This makes it easier to place-and-route the design and allows sufficient room for future design iterations.

Outsource.Don't have time to learn how to use programmable logic? No problem. There are a number of highly-qualified design consultants and macro suppliers that can do miracles with programmable logic (I've seen some of their work). Don't be afraid to use them. Also, remember that most electronics distributors and vendors have their own design centers.

Many devices are output disabled.Most CPLD devices and some FPGA devices have just a few output-enable signals. Check the number of output-enable and open-drain outputs required by your design before you choose a device!

CMOS does not mean low power.In the old days, CMOS equalled low power. My, how things have changed. CMOS has very, very low static current. If your design just sits there, clocking at a few megahertz, power consumption is 

Page 20: Classical logic

not an issue (well, unless you're using a CPLD, which has a much higher quiescent current--but that's another story). The faster you clock a CMOS device, the more power it consumes.Therein lies the problem for modern system design. You almost always need more performance. So if CMOS burns more power the faster you go, what can you do to avoid melting the device? The easy way out comes to us via physics. CMOS power consumption is directly related to capacitance and the voltage, squared. Lower the voltage and voilà, down comes the power. How can you easily lower the voltage? Move to 3.3 volts or below. Many vendors now supply low-voltage devices.

A little knowledge doubles your performance and your density.Learn the underlying device architecture and you will be amazed at what you can achieve in programmable logic!

Source :     http://www.fpga-site.com/faq.html#What_Is_Programmable_Logic

Programmable Logic Device DefinitionsDigital Signal - A digital signal is one whose key characteristic (e.g., voltage or current) fall into discrete ranges of values.  The interpretation of an analog signal would correspond to a signal whose key characteristic would be a continuous signal.  Most digital systems utilize two voltage levels.   Systems with more than two levels include MIL-STD-1553 busses.  There are three ranges defined (with several keep out zones).  The newer flash memory devices utilize four levels for storage, doubling the bit density to two bits per cell.Programmable Logic - a logic element whose function is not restricted to a particular function.  It may be programmed at different points of the life cycle.  At the earliest, it is programmed by the semiconductor vendor (standard cell, gate array), by the designer prior to assembly, or by the user, in circuit.Gate Array - Transistors or gates are fabricated in a 2 dimensional array on a die to form the standard base of an application specific integrated circuit (ASIC).  The devices is programmed by custom metal layers interconnecting nodes in the array.  Some gate 

Page 21: Classical logic

arrays have other features such as SRAM blocks, phase lock loops, delay locked loops, etc.Standard Cell - This device differs from the gate array since each cell may be different and optimized for each "standard" function.  There are no standard layers to the device and each layer of the chip is a unique design.Field Programmable Logic Array (FPLA) - And/Or/Invert architecture with three level fusing.Field Programmable Logic Sequencer (FPLS) - Full Mealy state machine.   Programmable AND and OR planes.Field Programmable Gate Array (FPGA) - This device is similar to the gate array, defined above, with the device shipped to the user with general-purpose metallization pre-fabricated, often with variable length segments or routing tracks.  The device is programmed by turning on switches which make connections between circuit nodes and the metal routing tracks.  The connection may be made by a transistor switch (which are controlled by a programmable memory element) or by an antifuse.  The transistor switch may be controlled by an SRAM cell or an EPROM/EEPROM/Flash cell.  Timing is generally not easily predictable.  Some architectures employ dedicated logic and routing resources for optimizing high-speed functions such as carry chains, wide decodes, etc.The PROM, PAL, AND PLA are three related devices.  They share an architecture that consists of AND and OR planes.  Additional features such as programmable I/O blocks, storage registers, etc., may be included in these devices.  Commercial, military, and space devices use a variety of programmable elements.  A complete list is beyond the scope of this tutorial. Some aerospace examples are given below.Programmable Read Only Memory (PROM) - This device has a fixed, fully decoded AND plane and a programmable OR plane.  The programmable element for these devices include EPROM, EEPROM, fuses and antifuses.  Fuse materials include nichrome and polysilicon elements.  Antifuse structures may consist of Oxide-Nitride-Oxide (Lockheed-Martin) or amorphous silicon (UTMC) material.  Other elements are possible and may be used in some devices.Programmed Array Logic (PAL) - This device has a programmable AND plane and a fixed OR plane.  Many commercial/military devices use fuses - one device family uses EEPROM cells and logic (CoolRunner).  The UTMC UT22VP10 device uses an amorphous silicon antifuse as the programmable element.   These are often referred to as Simple Programmable Logic Devices (SPLDs).Programmable Logic Array (PLA) - This device has both programmable AND and OR planes.  The space-flight application that I am aware utilized the bipolar, fuse-based, 82S100 in the central processing units of the Magellan and Galileo attitude control computers.  PLA structures may also appear as part of some CPLDs.  The two layers of programmable structure add a fixed delay.Complex Programmable Logic Device (CPLD) - A high density programmable device generally based on the PAL or SPLD architecture.  The routing structure leads to more predictable timing than the FPGA. 

Page 22: Classical logic

Programmable ElementsFuse - This is a two-terminal device that is normally a low resistive element and is programmed or "blown" resulting in an open or high impedance.   Typical materials are nichrome and polysilicon.  This is element is inherently radiation-hard.Antifuse - This is a two-terminal device that is normally a high resistive element and is programmed to a low impedance.  Typical programmed impedances range from 25 to 500 ohms, depending on the specific antifuse material, technology, and programming.  This element is generally inherently radiation-tolerant; certain versions can be made radiation-hard.  The failure mode of these elements during irradiation is rupture from a heavy ion.  For a memory application, a cell's programmed state may be sensed differentially, with one element programmed (closed) and the other unprogrammed (open).  An example of this structure is the UTMC PROM family.Switch - This device consists of a memory element (either volatile or non-volatile) which controls a switch.  This generally has the highest impedance of the three classes of programmable elements.  The volatile, SRAM-based memory elements in use today are considered radiation-soft.  EPROM, EEPROM, or SONOS (Northrop-Grumman) non-volatile elements should be relatively radiation-hard to upset.   EEPROM cells have been shown to be susceptible to rupture during write cycles (high voltage present) by heavy ions.Volatile - The memory elements lose their contents when power is removed from the device.  SRAM-based devices are volatile and require another device to store their configuration program.Non-volatile - The memory elements keep their contents when power is removed from the device.  The element may be one time programmable or "reprogrammable."  Examples of the former include fuses and antifuses.   Examples of the latter include EPROM, and EEPROM storage elements.   Programmable devices can be both non-volatile and reprogrammable.One Time Programmable - This device can be programmed only once; it's contents can not be changed.  While typically these devices are fuse or antifuse based, they can also be low-cost EPROM devices.  In this case, typically used for production devices, an inexpensive package is used without a window.Reprogrammable - These devices can have their configuration loaded more than once.  SRAM-based devices may be reloaded without restriction.  Many other forms of reprogrammable elements have restrictions on the number of write cycles, although they are high enough not to be of practical concern for most applications.   The FRAM (ferroelectric RAM) is a non-volatile memory element which a limit to the number of read cycles; the readout mechanism of this two-terminal element is destructive and requires a write cycle to restore the contents.

Page 23: Classical logic

What IS a PLC?

The letters PLC, in electronic control and automation realms, are an abbreviation and stand for,

Programmable Logic Controller"What’s one of those?" I hear!

In the business sense, the abbreviation stands for Public Limited Company, but that's not what we're talking about here of course. In the realms of industry and automation it stands for Programmable Logic Controller or PLC as an acronym.These little beasties are basically a computer. Even the smallest PLC has a microprocessor, that qualifies it as a computer.Yes a computer, but not in the generally accepted (home PC) form, they are what you would term as an industrial computer. Built to withstand very harsh environments. Find out what makes a PLC tick and how they work.Their appearance (of the smaller ones at least) is rather nondescript as most look like a smallish box with rows of screws on top and bottom. This is because they are manufactured to withstand harsh environments and be very reliable its programmed task (or tasks).They don't have a mouse, keyboard or even a screen, they don't even talk the same language as a PC. Of course ultimately all computers use binary when running a program, but saying language I'm referring to programming, this is how humans program them to perform a task or tasks.The outputs (real world switches) are switched on and off according to the program, which in turn can be effected by the input (real world signals) conditions. This is basically how PLC''s can perform automated operations and tasks without human intervention.

Page 24: Classical logic

Incidentally, if your interest is of a level to want to fault find or to write programs with them, have a look at our PLC tutorial page or register yourself for our Programmable Logic Controller "Programming From the Start" self teach course that's in the making with the form on the bottom of the page hereIn the picture, above at the top, is a Mitsubishi FX1S-20MR, the 20 stands for the amount of inputs and outputs, in this case 12 inputs and 8 outputs. The 'FX' is the (Mitsubishi) family of PLC that it belongs to and the '1S' part is its model type.Just for your information, the abbreviation PLC and the term 'Programmable Logic Controller' are in fact registered trademarks of the Allen-Bradley Company, although nowadays they are widely used as a generic description. You could divert into PLC history here if you like to learn how they came to be. Otherwise carry on and find out more about them.

A Programmable Logic Controller is a device that a user can program to perform a series or sequence of events. These events are triggered by stimuli (called inputs) received at the programmable logic controller through delayed actions such as time delays or counted occurrences.Once an event triggers, it actuates in the outside world by switching on or off electronic control gear or the physical actuation of devices. A Programmable Logic Controllers will continually loop through its user defined program waiting for inputs and giving outputs at the specific programmed times.As you would imagine in the world of computers they have their own language. This language is used to program the Programmable Logic Controller can be used in three formats, ladder, instruction list and logic symbol. More about this a bit later on.Programmable Logic Controllers first came about as a replacement for automatic control systems that used tens and hundreds (maybe even thousands) of hard wired relays, motor driven cam timers and rotary sequencers.More often then not, a single PLC can be programmed to replace thousands of relays and timers. These Programmable Logic Controllers were first befriended by the automotive manufacturing industry, this enabled software revision to replace the laborious re-wiring of control panels when a new production model was introduced.Many of the earliest Programmable Logic Controllers expressed all decision making logic in a program format called Ladder Logic, which from its appearance was very similar to electrical schematic diagrams.This of course was perfect for the electricians of the day, who were quite able to follow and trace out circuit problems with electrical schematic diagrams.So using ladder logic became second nature to them allowing the electricians a relatively easy transition from hard wired circuits to software driven circuits.This is the reason this program notation was chosen, to reduce training time for the existing technicians. Other early Programmable Logic Controllers used an instruction list type form of programming, based on a stack-based logic solver. Which was far more difficult to master.

Page 25: Classical logic

So, what’s a Program?

I’m glad you asked!A program is a connected series of instructions written in a language that the Programmable Logic Controller can understand. There are three forms of program format for PLC’s these are Ladder, Instruction and SFC/STL. Not all programming tools can work with all programming formats.Generally hand held programming panels only work with instruction format while most graphic programming tools work with both instruction and ladder format. Specialist programming software will also allow SFC style programming but that’s for another time.We will only be concerning ourselves with Ladder Logic programming here, because it's the most widespread in use today, probably because it's the easiest to grasp and get into the quickest.Now, there's one big difference between a PLC and a PC type computer; as mentioned above, they only have one program to run, unlike the PC, which is capable of running several programs at once within the Windows framework. These instructions cold be loaded onto a PC, but why not ? In one word, speed.A PLC will be designed to run its one program at a very fast speed, only branching out from within the main bit when an event happens. Events that happen in real time. This gives our little PLC beastie the ability to respond very quickly to any of the events under its control via an input.Its response would then be carried out via an output. For example controlling a machines production running at 30,000 units an hour ! Such as an offset web printing press churning out newspapers or book pages.Ladder Logic, (the PLC programming language) is very closely associated to relay logic. In relay logic there are both contacts and coils that can be loaded and driven in different configurations. As there are in ladder logic, but a lot more configurations are possible. However the basic principal remains the same.The program is written to switch the desired outputs for a given set of inputs energized. The 'hello world' program equivalent for a PLC would be a light bulb and a switch (see below). The switch is the input and the bulb would be controlled by the output. So, when the switch (input) is on, the bulb (output) is on.

Page 26: Classical logic

A coil (relay logic terminology) drives outputs of the PLC (a ‘Y’ device, e.g. Y01) or drives internal coils (‘M’ device) timers, counters or flags. Each coil has associated contacts. These contacts are available in both normally open (NO) and normally closed(NC) configurations.The term normally refers to the status of the contacts when the coil is not energized. Using a relay analogy, when the coil is off, a NO contact would have no current flow, that is, a load being supplied through a NO contact would not operate. However, a NC contact would allow current to flow, hence the connected load would be active.Activating the coil reverses the contact status, that is, the current would flow in a NO contact and a NC contact would then inhibit the flow.Physical inputs to the PLC (X devices) have no programmable coil. These devices may only be used in a contact format, again with NO and NC types available.Because of the close relay logic association, ladder logic programs can be read as current flowing from the left vertical line to the right vertical line. This current must pass through the input (switch) configuration in order to switch the output coil Y0 on.Therefore in the example below, switching X0 on and X1 being off would causes the output Y0 to also to switch on. However, if X1 were to switch on while X0 was on, the output coil would then switch off.

This is a very basic example of course, as they are very capable of automating a complete warehouse or running very complex machines on their own. 

Then, as you would imagine, the program it would be running would have many twists and turns to respond to the 10's and quite possibly even 100's of inputs and outputs. These inputs in conjunction with the program would be dictating the on and off pattern of the outputs at any given time. 

Here are just a few examples of Programmable Logic Controller programming applications that have been successfully completed and are in use today.

Manufacturing Industry- Lead acid battery plant, complete manufacturing system- Extruder factory, silo feeding control system

Page 27: Classical logic

Travel Industry- Escalator operation, monitored safety control system- Lift operation, monitored safety control system

Aerospace- Water tank quenching system

Printing Industry- Offset web press print register control system- Multistage screen washing system

Food Industry- Filling machine control system- Main factory feed water pump duty changeover system

Textile Industry- Industrial batch washing machine control system- Closed loop textile shrinkage system

Hospitals- Coal fired boiler fan change-over system

Film Industry- Servo axis controlled camera positioning system

Corrugating- Main corrugation machine control system- BOBST platten press drive and control system

Plastics Industry- Extruder factory, silo feeding control system- Injection moulding control system

Agriculture- Glasshouse heating, ventilation & watering system

Foundry- Overhead transportation system from casting process to shotblasting machine

Leisure- Roller coaster ride and effects control system- Greyhound track 'Rabbit' drive system

As I said these are just a few examples of plc programming applications, there are many many more in use today. In point of fact, there are far too many to list here, the PLC is today's unseen hero controlling a massive range of equipment.Manufacturers such as Mitsubishi, Allen Bradley, Omron and Siemens have been around for a long time and produce very high quality equipment through years of development (they should be paying me for advertising). It is quite probable that your machines have one of these makes controlling it.So spare a thought for the Programmable Logic Controller as you journey through this site, it does do a lot of work and it doesn't get out much! 

Page 28: Classical logic

Source :   http://www.machine-information-systems.com/PLC.html