start Task 5
This commit is contained in:
98
05-Morse/Morse/hdl/chartomorse_struct.vhg
Normal file
98
05-Morse/Morse/hdl/chartomorse_struct.vhg
Normal file
@@ -0,0 +1,98 @@
|
||||
--
|
||||
-- VHDL Architecture Morse.charToMorse.struct
|
||||
--
|
||||
-- Created:
|
||||
-- by - axel.amand.UNKNOWN (WE7860)
|
||||
-- at - 14:49:52 28.04.2023
|
||||
--
|
||||
-- Generated by Mentor Graphics' HDL Designer(TM) 2019.2 (Build 5)
|
||||
--
|
||||
LIBRARY ieee;
|
||||
USE ieee.std_logic_1164.all;
|
||||
USE ieee.numeric_std.all;
|
||||
|
||||
LIBRARY Morse;
|
||||
|
||||
ARCHITECTURE struct OF charToMorse IS
|
||||
|
||||
-- Architecture declarations
|
||||
constant unitCountBitNb: positive := 3;
|
||||
|
||||
-- Internal signal declarations
|
||||
SIGNAL startCounter : std_ulogic;
|
||||
SIGNAL done : std_ulogic;
|
||||
SIGNAL unitNb : unsigned(unitCountBitNb-1 DOWNTO 0);
|
||||
|
||||
|
||||
-- Component Declarations
|
||||
COMPONENT charToMorseController
|
||||
GENERIC (
|
||||
characterBitNb : positive := 8;
|
||||
unitCountBitNb : positive := 3
|
||||
);
|
||||
PORT (
|
||||
morseOut : OUT std_ulogic ;
|
||||
clock : IN std_ulogic ;
|
||||
reset : IN std_ulogic ;
|
||||
charNotReady : IN std_ulogic ;
|
||||
char : IN std_ulogic_vector (characterBitNb-1 DOWNTO 0);
|
||||
startCounter : OUT std_ulogic ;
|
||||
unitNb : OUT unsigned (unitCountBitNb-1 DOWNTO 0);
|
||||
counterDone : IN std_ulogic ;
|
||||
readChar : OUT std_ulogic
|
||||
);
|
||||
END COMPONENT;
|
||||
COMPONENT unitCounter
|
||||
GENERIC (
|
||||
unitCountDivide : positive := 10E3;
|
||||
unitCountBitNb : positive := 3
|
||||
);
|
||||
PORT (
|
||||
clock : IN std_ulogic ;
|
||||
reset : IN std_ulogic ;
|
||||
startCounter : IN std_ulogic ;
|
||||
unitNb : IN unsigned (unitCountBitNb-1 DOWNTO 0);
|
||||
done : OUT std_ulogic
|
||||
);
|
||||
END COMPONENT;
|
||||
|
||||
-- Optional embedded configurations
|
||||
-- pragma synthesis_off
|
||||
FOR ALL : charToMorseController USE ENTITY Morse.charToMorseController;
|
||||
FOR ALL : unitCounter USE ENTITY Morse.unitCounter;
|
||||
-- pragma synthesis_on
|
||||
|
||||
|
||||
BEGIN
|
||||
|
||||
-- Instance port mappings.
|
||||
I_ctl : charToMorseController
|
||||
GENERIC MAP (
|
||||
characterBitNb => characterBitNb,
|
||||
unitCountBitNb => unitCountBitNb
|
||||
)
|
||||
PORT MAP (
|
||||
morseOut => morseOut,
|
||||
clock => clock,
|
||||
reset => reset,
|
||||
charNotReady => charNotReady,
|
||||
char => charIn,
|
||||
startCounter => startCounter,
|
||||
unitNb => unitNb,
|
||||
counterDone => done,
|
||||
readChar => readChar
|
||||
);
|
||||
I_cnt : unitCounter
|
||||
GENERIC MAP (
|
||||
unitCountDivide => unitCountDivide,
|
||||
unitCountBitNb => unitCountBitNb
|
||||
)
|
||||
PORT MAP (
|
||||
clock => clock,
|
||||
reset => reset,
|
||||
startCounter => startCounter,
|
||||
unitNb => unitNb,
|
||||
done => done
|
||||
);
|
||||
|
||||
END struct;
|
||||
Reference in New Issue
Block a user