Lab experiment home work

Lab Assignment #2 – The Stopwatch In this lab, we will turn our simulator into a stopwatch. We have six seven-segment displays, so we will organize them as MM:SS: HH. That is to say, the leftmost two digits display the number of minutes counted, the middle two digits display the number of seconds counted and the rightmost two digits display the count in hundredths of a second. The seven-segment displays have decimal points, but unfortunately, the decimal points have not been wired to the Cyclone V, so we’ll have to imagine it. Part 1 – Lab Assignment The DE-10 has four push-button switches. They are debounced in hardware, so even in hardware, you don’t have to worry about debouncing them. (In the simulation, of course, you don’t.) They are mapped into the ARM’s memory at address 0xFF200050 (called KEY_BASE in address_map_arm.h) For the purposes of this lab, we will identify them as follows: Switch Bit Position Function PB1 Bit 0 Start PB2 Bit 1 Stop PB3 Bit 2 Lap PB4 Bit 3 Clear The operation of a stopwatch is as follows: • Clear returns the stopwatch to its default status. The clock time, the lap time and the output should all clear to 00:00.00 • Start starts the timer counting up. • Stop stops the timer counting but does not reset it. The clock can be restarted and will pick up from the same point. • Lap captures the time currently stored. The lap time DOES NOT appear on the display unless selected (see below). Only one lap time can be stored. A second click on Lap overwrites the previous time. The stopwatch also has one mode switch. Bit 0 of the slide switch bank (our old friend from Lab 1) toggles between displaying the current time OR the lap time. Useful Information For the purposes of this lab, we will use the Interval Timer. There are two Interval Timers on the board. The first Interval Timer is mapped into the ARM’s memory space at TIMER_BASE, while the second one is mapped at TIMER_2_BASE. The simulator implements both of them. The timer has the following register map: Address Register Function TIMER_BASE+0 Status TIMER_BASE+1 Control TIMER_BASE+2 Load Value Low TIMER_BASE+3 Load Value High The function of the timer is documented in the user manual DE10-Standard_Computer_ARM (available at OWL) on page 12 (Interval Timers). The timer runs at 100MHz. For the purposes of creating the stopwatch, you will probably want to program it to count 0.01-second intervals. Note that since we are stuck in the simulator, the actual performance of the timer element could be unpredictable and slower than real-time, although on my computer I get very close to accurate results. Evaluation The TAs will assess the code based on the results of the simulation. Part 2 – Discussion Finally, I like to invite you to think about the experience of the lab. Was it worthwhile? Did you learn anything? Can you see ways to apply what you have learned? Did you have problems with the development environment? Was the lab too easy? Too difficult? Too long? You do not have to submit anything at this time. However, I will be asking you to submit a document towards the end of the semester summarizing your reaction to the labs as a whole, so making some notes now while it is fresh in your memory is a good idea.

 

Lab Assignment #2 – The Stopwatch
In this lab, we will turn our simulator into a stopwatch. We have six seven-segment displays, so we will organize them as: MM:SS:HH. That is to say, the leftmost two digits display the number of minutes counted, the middle two digits display the number of seconds counted and the rightmost two digits display the count in hundredths of a second.
The seven segment displays have decimal points, but unfortunately the decimal points have not been wired to the Cyclone V, so we’ll have to imagine it.
Part 1 – Lab Assignment
The DE-10 has four push-button switches. They are debounced in hardware, so even in hardware you don’t have to worry about debouncing them. (In simulation, of course you don’t.) They are mapped into the ARM’s memory at address 0xFF200050 (called KEY_BASE in address_map_arm.h) For the purposes of this lab, we will identify them as follows:
Switch
Bit Position
Function
PB1
Bit 0
Start
PB2
Bit 1
Stop
PB3
Bit 2
Lap
PB4
Bit 3
Clear
The operation of a stopwatch is as follows:
• Clear returns the stopwatch to its default status. The clock time, the lap time and the output should all clear to 00:00.00
• Start starts the timer counting up.
• Stop stops the timer counting but does not reset it. The clock can be restarted and will pick up from the same point.
• Lap captures the time currently stored. The lap time DOES NOT appear on the display unless selected (see below). Only one lap time can be stored. A second click on Lap overwrites the previous time.
The stopwatch also has one mode switch. Bit 0 of the slide switch bank (our old friend from Lab 1) toggles between displaying the current time OR the lap time.
Useful Information
For the purposes of this lab, we will use the Interval Timer. There are two Interval Timers on the board. The first Interval Timer is mapped into the ARM’s memory space at TIMER_BASE, while the second one is mapped at TIMER_2_BASE. The simulator implements both of them. The timer has the following register map:
Address
Register Function
TIMER_BASE+0
Status
TIMER_BASE+1
Control
TIMER_BASE+2 Load Value Low
TIMER_BASE+3 Load Value High
The function of the timer is documented in the user manual DE10-Standard_Computer_ARM (available
at OWL) on page 12 (Interval Timers). The timer runs at 100MHz. For the purposes of creating the
stopwatch, you will probably want to program it to count 0.01 second intervals. Note that since we are
stuck in the simulator, the actual performance of the timer element could be unpredictable and slower
than real time, although on my computer I get very close to accurate results.
Evaluation
The TAs will assess the code based on the results of simulation.
Part 2 – Discussion
Finally, I like to invite you to think about the experience of the lab. Was it worthwhile? Did you learn
anything? Can you see ways to apply what you have learned? Did you have problems with the
development environment? Was the lab too easy? Too difficult? Too long?
You do not have to submit anything at this time. However, I will be asking you to submit a document
towards the end of the semester summarizing your reaction to the labs as a whole, so making some
notes now while it is fresh in your memory is a good idea.

 

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 (929) 473-0077

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code SCORE