1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Maksim231197 [3]
3 years ago
9

Design a Verilog module that takes a high frequency clock input and outputs a clock signal at 1/1000 of the input frequency. The

output clock signals should be 50% duty cycle, which means they should be high in half of the period and low in the other half.

Computers and Technology
1 answer:
JulsSmile [24]3 years ago
8 0

Answer:

// Code your design here

module clk_div

#(

parameter WIDTH = 7,// width of register

parameter N = 100// value of division here 100

)

(clk,reset, clk_out);

input clk;

input reset;

output clk_out;

reg [WIDTH-1:0] r_reg;// counting register

wire [WIDTH-1:0] r_nxt;

reg clk_track;// clock value

always at(posedge clk or posedge reset)

begin

if (reset)// reset

begin

r_reg <= 0;

  clk_track <= 1'b0;

end

else if (r_nxt == N)

   begin

  r_reg <= 0;

  clk_track <= ~clk_track;

  end

else

r_reg <= r_nxt;

end

assign r_nxt = r_reg+1;    

assign clk_out = clk_track;

endmodule

testbench:

// Code your testbench here

// or browse Examples

module clkdiv2n_tb;

reg clk,reset;

wire clk_out;

clk_div t1(clk,reset,clk_out);

initial

clk= 1'b0;

always

#5 clk=~clk;

initial

begin

#5 reset=1'b1;

#10 reset=1'b0;

#5000 $finish;

end

initial

$monitor("clk=%b,reset=%b,clk_out=%b",clk,reset,clk_out);

initial

begin

$dumpfile("dump.vcd");

$dumpvars(2);

end

endmodule

Explanation:

see waveform

You might be interested in
Please
levacccp [35]

Answer:

inspect

Explanation:

7 0
3 years ago
Why is democracy the best form of government
julia-pushkina [17]

Democracy is the best form of government simply because no other form of government is known to work well. Democracy may have its flaws but all in all it .

3 0
3 years ago
The equivalent of the TTL field in an ipv4 header is known as the ___an IPv6 header
OLga [1]
<span>The equivalent of the TTL(Time to Live) field in an IPv4 header is known as the Hop Limit in an IPv6 header.
</span>The IPv6 header is a streamlined version of the IPv4 header. The field Hop Limit has the size of 8 bits and indicates the maximum number of links over which the IPv6 packet can travel before being discarded.
7 0
3 years ago
What are the 5 major components of computer.Give example of each​
notsponge [240]
1-Input unit
2-output unit
3-storage
4-central processing unit
5-arithmetic and logic unit
8 0
3 years ago
Social engineering attacks can be carried out:______.
Alik [6]
The answer most likely B NOT SURE )
3 0
3 years ago
Other questions:
  • Define inheritance. give an example
    11·1 answer
  • A block style business letter is
    14·1 answer
  • A marketing associate wants to use the Validate button to ensure an email is CAN-SPAM compliant. What information does the assoc
    5·2 answers
  • Does the brain play a role in smartphone addiction
    7·2 answers
  • What subsection of the Internet requires specialized browser to access and is frequently used by cyber criminals and underground
    10·1 answer
  • EXCEL 2016:
    8·2 answers
  • X = 10<br> y = 20<br> x &gt; y<br> print("if statement")<br> print("else statement")
    6·1 answer
  • 2. Explain the difference between a JMP instruction and CALL instruction
    6·1 answer
  • Find the total cost of a $125 coat purchased in Los Angeles County where the sales tax is 9%. Use the expression c + 0.09c
    10·1 answer
  • A company is looking for an employee to assign passwords to all of its
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!