Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the question from Lab4, CSC258 Winter 2016, UTSG. Computer Organization I am trying to design a 8-bit counter in verilog(using a strange t-flipflop)

This is the question from Lab4, CSC258 Winter 2016, UTSG. Computer Organization

I am trying to design a 8-bit counter in verilog(using a strange t-flipflop) and I am asked "Your code should use a module that is instantiated eight times to create the counter".

So I think it should be something like this:

always@(posedge clock, posedge reset) begin

(repeat 8 times) tFlipFlop(.T(inputT), .in(element_stored_last_time), .out(new_element));

end

Clearly, I cannot use module in always block. But if I put tFlipFlop outside the always block(with loop), how to do it?

Maybe my idea is not correct. Is there a better idea?

In this function ,my input value and output value are the same, as I just want to change the value stored in the register. Can i input and output a same value?

PLEASE DO NOT give me a function like this:

reg [7:0]out;

assign out = 2'b00000000;

always@(posedge clock, posedge reset) out = out +1;

I DON'T think it instantiates t flip-flop 8 times or you can persuade me and the tutor who will check my prelab.

Thank you very much!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Identify the risks associated with not planning.

Answered: 1 week ago

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago