Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

I wrote three different types of code (gate level modeling, dataflow level modeling and behavioral modeling). 

below I have attached the three codes hoping you could write a comment on each line of code describing what each line does and then explain how each code is different. 

(Gate level modeling)

module project_gate1 (q, qbar, s, r, clk ); //(EXAMPLE COMMENTS WOULD GO HERE FOR EACH LINE)

/this is to model a SR Flip-flop in gate level modeling

input s, r, clk;

output q, qbar;

wire nand1_out;

wire nand2_out;

nand(nand1_out, s, clk);

nand(nand2_out, r, clk);

nand(q, nand1_out, qbar);

nand(qbar, nand2_out, q);

endmodule

(Data flow modeling)

module srff_dataflow(q, qbar, s, r, clk);

output q, qbar;

input s, r, clk;

wire s_bar, r_bar;

assign s_bar = ~(s & clk & qbar);

assign r_bar = ~(r & clk & q);

assign q = s_bar;

assign qbar = r_bar;

endmodule

(Behavioral level modeling)

module srff_07 (s, r, clk, q, qbar);

input s, r, clk;

output q, qbar;

reg q, qbar;

always@(posedge clk)

begin

if (s == 1 && r == 0)

begin

q <= 1;

qbar <= 0;

end

else if (s == 0 && r == 1)

begin

q <= 0;

qbar <= 1;

end

else if (s==0 && r==0)

begin

q <= q;

qbar <= qbar;

end

end

 

Expert Solution
Check Mark
Step 1: Define as gates

Gates can be defined in such a way that they are electronic devices or logical components that perform basic logical functions based on Boolean algebra.

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education