DNA2683
Advanced Member level 4
- Joined
- Sep 3, 2012
- Messages
- 106
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,296
- Activity points
- 2,290
library ieee;
use ieee.std_logic_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY Top IS
PORT (
Clock_50_in : In std_logic;
KEY_1 : In std_logic;
KEY_0 : In std_logic;
result_out : out std_logic_vector(3 downto 0));
END Top;
ARCHITECTURE structural OF Top IS
Component counter
port(
clock_50 : in std_logic;
count : out std_logic_vector(31 downto 0)
);
End Component;
Component pll
port (
refclk : in std_logic := '0'; -- refclk.clk
rst : in std_logic := '0'; -- reset.reset
outclk_0 : out std_logic );
end Component;
Component muxl
PORT
(
data0x : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
data1x : IN STD_LOGIC_VECTOR (3 DOWNTO 0);
sel : IN STD_LOGIC ;
result : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)
);
end Component;
Signal S1 : std_logic_vector(31 downto 0);
Signal S2 : std_logic_vector(3 downto 0);
Signal S3 : std_logic_vector(3 downto 0);
Signal S4 : std_logic;
Signal S5 : std_logic;
BEGIN
U1: counter
Port Map (clock_50 => S5 ,
count => S1
);
U2: pll
Port Map (refclk => Clock_50_in,
rst => S4,
outclk_0 => S5
);
U3: muxl
Port Map (data0x => S2,
data1x => S3,
sel => KEY_0,
result => result_out
);
S2 <= S1(24 downto 21);
S3 <= S1(26 downto 23);
S4 <= not(KEY_1);
S5 <= outclk_0;
END structural ;
S5 <= outclk_0;
I presume you get the error for this line
It's useless, because outclk_0 is already conncted to S5 in the PLL instantiation. And yes, outclk_0 is not declared in the top entity.Code:S5 <= outclk_0;
I saw the connection diag above and based on it I want to ask, why are you not connecting directly outclk_0 to clock_50 via portmap?
U2: pll
Port Map (refclk => Clock_50_in,
rst => S4,
outclk_0 => S5
);
Code VHDL - [expand] 1 2 3 4 S2 <= S1(24 downto 21); -- works because signal S1 is declared S3 <= S1(26 downto 23); -- works because signal S1 is declared S4 <= not(KEY_1); -- works because key_1 is declared in top entity S5 <= outclk_0; -- Does not work because outclk_0 is not declared
Code VHDL - [expand] 1 2 3 signal outclk_0 : std_logic; -- instantiate with outclk_0 => outclk_0);
Code VHDL - [expand] 1 S5 <= outclk_0;
Hi,
You are most welcome. Good to hear that your problem is solved.
create_clock -name "clock_50_in" -period 20.000ns [get_port{clock_50_in}]
derive_pll_clocks
derive_clock_uncertainty
It tells the fitter and timing analyser that your clock is 50Mhz, and it derives any clocks that are generated from connected PLLs.
It shouldnt make a difference to the design and mean it wont fit.
That is a relative statement. e.g.- Your design might work in simulation but it may fail in synthesis.so if i wont include this file in my project the design will not work?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?