Lecture verilog ii_c

13
ECE 287 – Lecture Verilog II Verilog HDL with Sequential Circuits

Transcript of Lecture verilog ii_c

Page 1: Lecture verilog ii_c

ECE 287 – Lecture Verilog II

Verilog HDL with Sequential Circuits

Page 2: Lecture verilog ii_c

Announcements

Next WednesdayExam II – Nov 15th

Last Day to Demo Labs – Nov 14th

Project Oral Proposal - Nov 1st

Page 3: Lecture verilog ii_c
Page 4: Lecture verilog ii_c
Page 5: Lecture verilog ii_c

What you should know how to use in Verilog•The Golden Rule I•Combinational always blocks• If, Case

•Modules instantiated in other modules•? Operator•Groupings•Constants•Conditionals•Logic Operators

If you don’t talk to me…

Page 6: Lecture verilog ii_c

Sequential Circuits … example

What’s different?

Page 7: Lecture verilog ii_c

Second Golden Rule!!!• Use “=“ in combinational always blocks

• Use “<=“ in sequential always blocks

Page 8: Lecture verilog ii_c

Circuit Reset This is how you’ll write most sequential circuits…

Include a reset !!!

Page 9: Lecture verilog ii_c

Use fully defined if and case structures…

For the following example, what is the value of c?

Page 10: Lecture verilog ii_c

Parameter

Page 11: Lecture verilog ii_c

Problem…

Build a circuit that has 2, 8 bit multipliers and 1 32 bit multiplier and stores the result in flip-flops. It needs a reset and clock.

Page 12: Lecture verilog ii_c

Problem as a group…

Build the ram from last class…

Page 13: Lecture verilog ii_c

Problem Set

1. Build Verilog code for a counter that counts from 0 to 259 and then starts over.

2. Build Verilog code that multiplies by 5.