Question

Make a RAM with the help of Flip flop using behavioral modeling on Verilog. The code...

Make a RAM with the help of Flip flop using behavioral modeling on Verilog.

The code should be simple as I am a beginner. Also, I need an urgent answer is required.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The behavioral modeling can be done with 2 ways:-

1> Synchronous clear:- Output will reset at triggered edge(can be positive edge or negative edge).

2> Asynchronous clear:- Clear signal is independent of clock.

Here,To make the RAM, I have used D flip fop with Synchronous clear in which output will reset at positive edge of clock.

Code

module dff_behavioral(d,clk,clear,q,qbar); 
input d, clk, clear; 
output reg q, qbar; 
always@(posedge clk) 
begin
if(clear== 1)
q <= 0;
qbar <= 1;
else 
q <= d; 
qbar = !d; 
end 
endmodule

Please provide rating as it keeps us motivated to help you more.

Add a comment
Know the answer?
Add Answer to:
Make a RAM with the help of Flip flop using behavioral modeling on Verilog. The code...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT