diff --git a/docs/1b/ece124.md b/docs/1b/ece124.md index add2cae..d682fea 100644 --- a/docs/1b/ece124.md +++ b/docs/1b/ece124.md @@ -524,6 +524,47 @@ Alternatively, each state can be assigned exactly one `1` bit, and transitions f **Dynamic hazards** occur when outputs flip multiple times before stabilising. These can be avoided by switching everything to 2-term POS or SOP and fixing static hazards. +## Multilevel synthesis + +!!! definition + - A **literal** is an input character. + - An **implicant** is a collection of inputs that results in a true output. + - A **prime implicant** is such that no literals can be removed while remaining an implicant. + - A **cover** is a set of implicants that cover every possible way $f=1$. + - An **essential prime implicant** is such that there is no other prime implicant that fulfill a necessary condition to make $f$ true. + +TO reduce fan-in, multi-input ANDs and ORs can be broken up to multiple versions of their nested form via **factoring**. + +$$abcde\to(abc)(de)$$ + +**Functional decomposition** takes common terms and only calculates them first before feeding that input into the rest of the circuit. + +### Tabular method + +Cost is minimised when all essential prime implicants are present and the fewest number of prime implicants for the remaining terms. + +1. List minterms, group by the number of ones in binary (don't cares can be treated as minterms) +2. Write the implicant for each +3. For each group, if an implicant differs by one bit from an implicant in the group above, merge them (replacing the distinctive term with $x$) and check that minterm / implicant off +4. Repeat, ensuring that $x$ only merges with $x$ in the same columns + +Implicants not checked off are prime implicants. + +1. List all primes and the minterms they cover as a table, excluding don't cares + - Minterms with only one prime have that as an essential prime +2. Primes that cover the same minterms as another but also more are objectively better (**row dominance**) +3. Make educated guesses to minimise prime implicants + +Alternatively, instead of removing **dominated rows**, **dominatING columns** can be removed instead. + +### Petrick method + +Once reduced to tablular form: + +1. For each column, sum all the possible ways a minterm can be covered, then product those sums +2. Expand and simplify, then choose the products with the least number of literals +3. Each product is a solution if you replace the product with a sum of the multiplied literals instead + ## VHDL VHDL is a hardware schematic language.