2023-09-26 11:35:03 +02:00

161 lines
3.1 KiB
VHDL

LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
ENTITY receptionTrame IS
PORT(
H: IN std_logic;
nCLR: IN std_logic;
Lin: IN std_logic;
AdrSel: IN std_logic_vector;
RecByte: OUT std_logic_vector(7 downto 0);
RecByte_WR: OUT std_logic;
RecBytes_RST: OUT std_logic;
Err_SET: OUT std_logic_vector(2 downto 0);
NbByteInc: OUT std_logic;
MsgReceived_SET: OUT std_logic;
NbRecByte_RST: OUT std_logic
);
END receptionTrame;
ARCHITECTURE arch OF receptionTrame IS
SIGNAL octetRecu_EN : std_logic;
SIGNAL n_SELECT: std_logic;
SIGNAL n_LOAD: std_logic;
SIGNAL n_EN: std_logic;
SIGNAL nbBit_SELECT: std_logic;
SIGNAL nbBit_LOAD: std_logic;
SIGNAL nbBit_EN: std_logic;
SIGNAL identifier_EN: std_logic;
SIGNAL nbData_LOAD: std_logic;
SIGNAL nbData_EN: std_logic;
SIGNAL LinSynchro: std_logic;
SIGNAL n_0: std_logic;
SIGNAL nbBit_0: std_logic;
SIGNAL nbData_0: std_logic;
COMPONENT receptionTrame_op
GENERIC(
N: integer := 1200;
N_WIDTH : integer := 11
);
PORT(
H: IN std_logic;
nCLR: IN std_logic;
Lin: IN std_logic;
octetRecu_EN : IN std_logic;
n_SELECT: IN std_logic;
n_LOAD: IN std_logic;
n_EN: IN std_logic;
nbBit_SELECT: IN std_logic;
nbBit_LOAD: IN std_logic;
nbBit_EN: IN std_logic;
identifier_EN: IN std_logic;
nbData_LOAD: IN std_logic;
nbData_EN: IN std_logic;
LinSynchro: OUT std_logic;
n_0: OUT std_logic;
nbBit_0: OUT std_logic;
nbData_0: OUT std_logic;
identifier: OUT std_logic_vector(5 downto 0);
octetRecu: OUT std_logic_vector(7 downto 0)
);
END COMPONENT;
COMPONENT receptionTrame_com
PORT(
H: IN std_logic;
nRST: IN std_logic;
LinSynchro: IN std_logic;
octetRecu_EN: OUT std_logic;
n_SELECT: OUT std_logic;
n_LOAD: OUT std_logic;
n_EN: OUT std_logic;
nbBit_SELECT: OUT std_logic;
nbBit_LOAD: OUT std_logic;
nbBit_EN: OUT std_logic;
identifier_EN: OUT std_logic;
nbData_LOAD: OUT std_logic;
nbData_EN: OUT std_logic;
n_0: IN std_logic;
nbBit_0: IN std_logic;
nbData_0: IN std_logic
);
END COMPONENT receptionTrame_com;
BEGIN
U0 : receptionTrame_op
GENERIC MAP(
N => 1200,
N_WIDTH => 11
)
PORT MAP(
H => H,
nCLR => '1',
Lin => Lin,
octetRecu_EN => octetRecu_EN,
n_SELECT => n_SELECT,
n_LOAD => n_LOAD,
n_EN => n_EN,
nbBit_SELECT => nbBit_SELECT,
nbBit_LOAD => nbBit_LOAD,
nbBit_EN => nbBit_EN,
identifier_EN => identifier_EN,
nbData_LOAD => nbData_LOAD,
nbData_EN => nbData_EN,
LinSynchro => LinSynchro,
n_0 => n_0,
nbBit_0 => nbBit_0,
nbData_0 => nbData_0
);
U1 : receptionTrame_com
PORT MAP(
H => H,
nRST => '1',
LinSynchro => LinSynchro,
octetRecu_EN => octetRecu_EN,
n_SELECT => n_SELECT,
n_LOAD => n_LOAD,
n_EN => n_EN,
nbBit_SELECT => nbBit_SELECT,
nbBit_LOAD => nbBit_LOAD,
nbBit_EN => nbBit_EN,
identifier_EN => identifier_EN,
nbData_LOAD => nbData_LOAD,
nbData_EN => nbData_EN,
n_0 => n_0,
nbBit_0 => nbBit_0,
nbData_0 => nbData_0
);
END ARCHITECTURE arch;