CONTINUED ( NEW PROBLEM)
I will continue from here instead of opening a new topic. If I am wrong doing so, please correct my mistake.
All my code compiled successfully, but I think there is an inconsistency with what I wrote and what schematic shows.
This is my top level module:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.mypackage2.all;
entity TopModule is
generic ( REGSIZE : integer := 16);
Port (Clk : in STD_LOGIC;
Reset : in std_logic; -- System Reset
PS2_Clk : in std_logic; -- Keyboard Clock Line
PS2_Data : in std_logic; -- Keyboard Data Line
ANODES : out STD_LOGIC_VECTOR(3 downto 0);
SEGMENTS : out STD_LOGIC_VECTOR(6 downto 0));
end TopModule;
architecture Top_arch of TopModule is
component clkdivide is
Port (clkin: in std_logic;
clkout:out std_logic );
end component;
component SevenSegmentController is
Port ( CLK: in std_logic;
DEC1, DEC2, DEC3, DEC4: in std_logic_vector(7 downto 0);
SEGMENTS: out std_logic_vector(6 downto 0);
ANODES: out std_logic_vector(3 downto 0));
end component;
component KeyboardController is
port (Clk : in std_logic; -- System Clock
Reset : in std_logic; -- System Reset
PS2_Clk : in std_logic; -- Keyboard Clock Line
PS2_Data : in std_logic; -- Keyboard Data Line
DoRead : in std_logic; -- From outside when reading the scan code
Scan_Err : out std_logic; -- To outside : Parity or Overflow error
Scan_DAV : out std_logic; -- To outside when a scan code has arrived
Scan_Out : out std_logic_vector(7 downto 0));
end component;
component shifter is
port (clk : in std_logic;
Scan_Dav : in std_logic;
Data_in : in std_logic_vector(7 downto 0);
Data_out : out reg_array );
end component;
signal clk2, scandav, scanerr, doread: std_logic;
signal sarray: reg_array;
signal datain: std_logic_vector(7 downto 0);
begin
L1: SevenSegmentController
port map (SEGMENTS=> SEGMENTS, CLK=> clk2, ANODES=> ANODES,
DEC1=> sarray(15), DEC2=> sarray(14),
DEC3=> sarray(13),DEC4=> sarray(12));
L2: clkdivide
port map (clkin=>Clk , clkout=>clk2);
L3: KeyboardController
port map (Clk=> clk2, Reset=> Reset, PS2_Clk=> PS2_Clk,
PS2_Data=> PS2_Data, DoRead=> doread, Scan_Err=> scanerr,
Scan_DAV=> scandav, Scan_Out=>datain);
L4: shifter
port map (clk=>clk2, Scan_Dav=>scandav, Data_in=> datain,
Data_out=>sarray);
end Top_arch;
This is the RTL schematic:
The components are not linked with each other, keyboard interface's output should be directed to shifter, and then shifter to seven segment controller, but shifter is all by itself. What is the problem here?