Stepper-Motor-Control  v3.0.0
System on a Chip 2014 - Group 04
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
counter_tb Entity Reference

Testbench entity. More...

Collaboration diagram for counter_tb:
Collaboration graph

Libraries

ieee 
 Use Standard Library.

Use Clauses

std_logic_1164 
 Use Logic Elements.

Generics

divider  INTEGER := 125
 Prescaler for PWM-signal.

Detailed Description

Testbench entity.

Definition at line 25 of file counter_tb.vhd.

Member Data Documentation

divider INTEGER := 125
Generic

Prescaler for PWM-signal.

For this purpose 2,5 ms are used as minimal pulse-width.

The prescaler is calculated with the given and desired frequency via the following formula:

\begin{equation*} \text{prescaler} = \frac{f_{\text{clock}} \text{Hz}}{f_{\text{prescaler}} \text{Hz}} \end{equation*}

e.g.:

\begin{equation*} \left.\begin{aligned} f_{\text{prescaler}} &= \frac{5}{2}\,\text{ms} \newline &= 400\,\text{Hz} \newline\newline \text{prescaler} &= \frac{50\,\text{Mhz}}{400\,\text{Hz}} \newline &= 125000 \newline \end{aligned} \right\} \qquad \text{pulse-width: 2.5 ms} \end{equation*}

For simulation-purpose the divider was set to 125 for faster wave generation.

Definition at line 48 of file counter_tb.vhd.


The documentation for this class was generated from the following file: