Question

write a module in verilog that takes in a 1 hz clock and outputs a counter...

write a module in verilog that takes in a 1 hz clock and outputs a counter for hours seconds and minutes on a digital clock. I was thinking of making two bits for hours minutes and seconds. when the first bit gets to 9, then it resets to 0 and the second bit, or most significant bit becomes 1. please do not paste the code online.....put it in a file I can simply test. privacy is important here

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

I am giving you the code to the upward counter in verilog and hope it will help you to implement it on the given code

module clk_counter (
op ,                
en ,                                            
clock_ip ,    
refresh   
);

output [7:0] op;                    // O/p ports

input en, clock_ip, refresh;        // I/p ports

reg [7:0] op;

   //Code starts
  
always @(posedge clock_ip)
if (refresh) begin
op <= 8'b0 ;
end else if (en) begin
op <= op + 1;
end


endmodule

Hope it helps.

Add a comment
Know the answer?
Add Answer to:
write a module in verilog that takes in a 1 hz clock and outputs a counter...
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
  • Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter load...

    Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter loads the "0000" state if reset is low. The counter should start and end with this state. Write a testbench to verify the correctness of the 4-bit Johnson counter. The testbenclh should have a clock with a period of 20ns and a reset signal. The testbench should store the 4-bit binary outputs of the counter in a file, which will be used to provide...

  • Im building a clock using HDL system verilog and I need help implementing this instantiation meth...

    Im building a clock using HDL system verilog and I need help implementing this instantiation method. Basically what happens is in the top module ClockCounter, positive clock edges are counted and passed into module timer using instantiation. Once the counter reaches MaxCount (59), a carry is generated which increments the minute clock. Once the minute clock reaches 59, another carry is generated which increments the hour clock. In module timer() below, I need help figuring out what variables in each...

  • Objective: Creating a register file (memory) using Verilog. The register file is made up of four registers and each...

    Objective: Creating a register file (memory) using Verilog. The register file is made up of four registers and each register holds one nibble (half a byte, i.e., four bits) 3. Create a D flip-flop AD flip-flop holds 1 bit of data, and it only changes its data when the clock changes. We want a positive edge triggered flip-flop. Design your Verilog D flip-flop, so we will create them now. Enter the 2 to 4 line decoder. We will need two...

  • Please read the attached article from the New York Times and write a short paper answering...

    Please read the attached article from the New York Times and write a short paper answering the below questions. There is no length minimum for the essay. I would anticipate approximately 1-2 pages double-spaced, 12pt Times New Roman font to address all required elements. Papers over 2 pages will receive an automatic reduction of 50%. Your task is to accomplish two goals in your paper: Analyze a business problem(s) presented in the article and describe its effect on the business...

  • Please answer all the blanks (volume if H2 and everything in analysis). TIA! Data 5 1...

    Please answer all the blanks (volume if H2 and everything in analysis). TIA! Data 5 1 oong 0.00 10.5ml 2 o.olag 0.00 11.0 Trial 3 o.org 0.00 12.00 o Daag o.albg 0.00 10.0 ml 11.5ml Mass of Mg (g) Initial volume of Syringe (mL) Final volume of Syringe (mL) Volume of H (mL) Barometric pressure (torr) Ambient temperature (°C) Vapor pressure of H2O (torr) 779.314har 23. Oi 21.0 forr TA.314tar 23.0c 179.3 14ton 23.0¢ 779.314 ton 23.0c 779.31472 23.0c 21.0...

  • Please read the article bellow and discuss the shift in the company's approach to genetic analysis....

    Please read the article bellow and discuss the shift in the company's approach to genetic analysis. Please also discuss what you think about personal genomic companies' approaches to research. Feel free to compare 23andMe's polices on research with another company's. Did you think the FDA was right in prohibiting 23andMe from providing health information? These are some sample talking points to get you thinking about the ethics of genetic research in the context of Big Data. You don't have to...

  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

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