summaryrefslogtreecommitdiff
path: root/2004/n/fpga/src/pwm/convert_pwm.vhd
blob: 974b52083d209fe68a533e5b5521ea54e6e85d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- convert_pwm.vhd 
-- Eurobot 2004 : APB Team
-- Auteur : Fid�le GAFAN et Pierre-Andr� Galmes
-- Module g�n�rateur de signaux PWM.
-- Module convertisseur [0-255] vers [PWM_MIN_VALUE - PWM_MAX_VALUE].


--LIBRARY
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;

use	work.nono_const.all;
use	work.pwm_const.all;

--ENTITY
entity convert_pwm is
port (
	data_in		: in T_OCTET;
	data_out	: out T_DOUBLE_OCTET --duree pdt laql la sortie
	);
end entity;


architecture RTL of convert_pwm is 
begin
        data_out <= (PWM_VALUE_MIN + (data_in * PWM_INC_INT));
            
end RTL;