0% found this document useful (0 votes)
23 views18 pages

Week 6 A

Uploaded by

Gqgqg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views18 pages

Week 6 A

Uploaded by

Gqgqg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Lecture 10

Logic Synthesis, Part 1

Xuan ‘Silvia’ Zhang


Washington University in St. Louis

http://classes.engineering.wustl.edu/ese461/
Outline

Write Synthesizable Code

Write Synthesis Script

2
Synthesizable Verilog

• Top-down design
– top-level module
– example: module MyChip_ASIC();
– lower-level modules
– initially empty placeholders, or stubs

• Functionally identical or equivalent

3
Logic Circuit Synthesis

• Combinational circuit
– continuous assignment

– always statement
– contains only signals with no edges
– level-sensitive list

4
Logic Circuit Synthesis

• Combinational circuit
– concatenation or bit reduction

5
Logic Circuit Synthesis

• Example 3-8 decoder

6
Logic Circuit Synthesis

• Don’ts
– miss signals in the sensitivity list
– use variables before assignment

7
Logic Circuit Synthesis

• Multiplexers
– imply a MUX using case

– if not always assign to an input, might imply latch

8
Logic Circuit Synthesis

• Case statement
– include default to be exhaustive
– don’t care x, gives synthesizer flexibility

9
Logic Circuit Synthesis

• Sequential logic
– edge sensitive always block, with non-blocking
• Example: D Flip Flop
• Don’t use “@ clk”
– will have latch
– we hate latch

10
Logic Circuit Synthesis

• Sequential logic
– initialize the memory element by specifying reset
– use a template

11
Logic Circuit Synthesis

• Datapath synthesis
– bus-wide arithmetic and other bus-wide operations
– example: 32-bit multiplier
– Synopsys DesignWare library
– use directives

12
Logic Circuit Synthesis

• Hand instantiation
– generic logic netlist
– to ensure a particular cell be included

13
Finite-State Machine Synthesis

• Encoding style

• Style template
– using two always blocks
– using single always blocks
– using a function for combinational logic

• Example
– http://www.asic-world.com/tidbits/verilog_fsm.html

14
Non-Synthesizable Constructs

• Initial, events: used only in test bench


• Real, time (delay with #)
– data not supported by synthesizer
• Comparison to x and z

• Assign (to register)


• Fork – join
– test bench only
• Primitives
– only gate level primitives are supported
• Table

15
Write Synthesizable Code

• Use meaningful names for signals and variables


• Don't mix level and edge sensitive elements in the same always
block
• Avoid mixing positive and negative edge-triggered flip-flops
• Use parentheses to optimize logic structure
• Use continuous assign statements for simple combo logic
• Use nonblocking for sequential and blocking for combo logic
• Don't mix blocking and nonblocking assignments in the same
always block (even if Design compiler supports them!!)
• Be careful with multiple assignments to the same variable
• Define if-else or case statements explicitly

16
Synopsys Design Compiler

• Tutorial posted on class website


• Follow the step-by-step instruction before Wed
lecture

17
Questions?

Comments?

Discussion?

18

You might also like