lecture7 - ECE 4514 Digital Design II Spring 2008 Lecture...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 4514 Digital Design II Spring 2008 ecture 7: Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling Lecture 7: Dataflow Modeling A language Lecture Patrick Schaumont
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Today's topic b Dataflow Modeling module input input input output output Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling Model with submodules and gates = Structural Model with always and initial blocks = Behavioral Procedural Model with assign statements = Behavioral Dataflow
Background image of page 2
Example a b q Structural Behavioral Procedural Behavioral Dataflow Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling module nand(q, a, b) output q; input a, b; wire n; and G1(n, a, b); not G2(q, n); endmodule module nand(q, a, b) output q; reg q; input a, b; always @(a or b) q = ~(a | b); endmodule module nand(q, a, b) output q; input a, b; assign q = ~(a | b); endmodule
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Key differences with procedural code b Must assign nets (wires) instead of registers module nand(q, a, b) output q; reg q; input a, b; module nand(q, a, b) output q; input a, b; Behavioral - Procedural assign reg Behavioral - Dataflow assign wire Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling always @(a or b) q = ~(a | b); endmodule assign q = ~(a | b); endmodule Procedural Assignment Continuous Assignment
Background image of page 4
Key differences with procedural code b Must assign nets (wires) instead of registers module nand(q, a, b) output q; reg q; input a, b; module nand(q, a, b) output q; input a, b; Behavioral - Procedural assign reg Behavioral - Dataflow assign wire Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling always @(a or b) q = ~(a | b); endmodule assign q = ~(a | b); endmodule Note that both will end up as the same hardware
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Two forms of assignment b Net Declaration ( Palnitkar: Implicit Assignment) module nand(q, a, b) output q; input a, b; wire n = (a | b); ... endmodule a Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling b q wire n b Continuous Assignment module nand(q, a, b) output q; input a, b; wire n; assign n = (a | b); ... endmodule
Background image of page 6
Assign two wires Concurrent Assign statements q1 module nand(q1, q2, a, b) output q1, q2; input a, b; Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling a b q2 assign q1 = ~(a | b); assign q2 = ~(a & b); ... endmodule
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
q1 module nand(q1, q2, a, b) output q1, q2; Single Assign statement with two independent assignments Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 7: Dataflow Modeling a b q2 input a, b; assign q1 = ~(a | b), q2 = ~(a & b); ... endmodule
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 49

lecture7 - ECE 4514 Digital Design II Spring 2008 Lecture...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online