Guest
hello,
please i am looking for someone who can help me to solve my pb.
this is my code :
Bonjour a tous,
je cherche de l'aide pour mon projet sur VHDL:
mon testBench ne fonctionne pas correctement je voudrais de l'aide s'il vous plait.
voici mes codes:
---------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
entity Lane is
port (
FPP_CLK_IN : IN std_logic;
FPP_FROM_CORE : IN std_logic;
DATA_IN : IN std_logic;
FPP_SEC_EN : IN std_logic;
FPP_TURN_SEL : IN std_logic;
FPP_CORE_SEL : IN std_logic;
FPP_REGP_BYP : IN std_logic;
FPP_SOURCE_SEL : IN std_logic;
FPP_REGN_BYP : IN std_logic;
FPP_PRI_EN : IN std_logic;
Primary_Port : INOUT std_logic;
Secondary_Port : INOUT std_logic;
FPP_TO_CORE : OUT std_logic;
DATA_OUT : OUT std_logic
);
end Lane;
architecture archLane of Lane is
component Buf
port (
A : IN std_logic;
Y : OUT std_logic
);
end component;
component BufX
port (
A : IN std_logic;
en : in std_logic;
Y : OUT std_logic
);
end component;
component Mux
port (
Sel : IN std_logic;
E : IN std_logic;
F : IN std_logic;
Z : OUT std_logic
);
end component;
component FlipFlopP
port (
CLK : IN std_logic;
D : IN std_logic;
Q : OUT std_logic
);
end component;
component FlipFlopN
port (
CLK : IN std_logic;
D : IN std_logic;
Q : OUT std_logic
);
end component;
signal Sec_buf_in_to_Mux6 : std_logic;
signal Sel_BufX_in_to_Mux3 : std_logic;
signal Sec_Pri_Buf_IN_TO_MUX6 :std_logic;
signal Sec_Pri_BufY_IN_TO_MUX1 : std_logic;
signal sig_from_Mux1_ff1_to_Mux3_ff3 : std_logic;
signal sig_from_Mux1_to_FF1 : std_logic;
signal sig_from_Mux5_to_FF2_Mux2 :std_logic;
signal sig_from_FF2_to_Mux2 : std_logic;
signal sig_from_Mux3_to_FF3 : std_logic;
signal sig_from_Mux4_to_Mux5 : std_logic;
signal FPP_TO_CORE_INT : std_logic;
begin
FPP_TO_CORE <= FPP_TO_CORE_INT; -- The Variable FPP_TO_CORE_INT is affected into FPP_TO_CORE
Sec_Buf_In : Buf
port map ( A => Secondary_Port,
Y => Sec_buf_in_to_Mux6);
Sec_BufX_Out : BufX
port map ( A => Sel_BufX_in_to_Mux3,
en => FPP_SEC_EN ,
Y => Secondary_Port);
Pri_Buf_In : Buf
port map ( A => Primary_Port,
Y => Sec_Pri_Buf_IN_TO_MUX6);
Pri_BufX_Out : BufX
port map ( A => Sec_Pri_BufY_IN_TO_MUX1,
en => FPP_PRI_EN,
Y => Primary_Port);
MUX1 : Mux
port map ( E => Sig_from_Mux1_ff1_to_Mux3_ff3,
F => sig_from_Mux1_to_FF1,
Z => Sec_Pri_BufY_IN_TO_MUX1,
Sel => FPP_REGN_BYP);
MUX2 : Mux
port map ( E => sig_from_Mux5_to_FF2_Mux2,
F => sig_from_FF2_to_Mux2,
Z => DATA_OUT,
Sel => FPP_REGP_BYP
);
MUX3 : Mux
port map ( E => sig_from_Mux1_ff1_to_Mux3_ff3,
F => sig_from_Mux3_to_FF3,
Z => Sel_BufX_in_to_Mux3,
Sel => FPP_REGN_BYP
);
MUX4 : Mux
port map ( E => DATA_IN,
F => FPP_FROM_CORE,
Z => sig_from_Mux4_to_Mux5,
Sel => FPP_TURN_SEL
);
MUX5 : Mux
port map ( E => sig_from_Mux4_to_Mux5,
F => FPP_TO_CORE_INT,
Z => sig_from_Mux5_to_FF2_Mux2,
Sel => FPP_CORE_SEL
);
MUX6 : Mux
port map ( E => Sec_buf_in_to_Mux6,
F => Sec_pri_buf_in_to_Mux6,
Z => FPP_TO_CORE_INT,
Sel => FPP_SOURCE_SEL
);
Flipflop1 : FlipFlopN
port map ( Q => sig_from_Mux1_ff1_to_Mux3_ff3,
D => sig_from_Mux1_to_FF1,
CLK => FPP_CLK_IN
);
Flipflop2 : FlipFlopP
port map ( Q => sig_from_Mux5_to_FF2_Mux2,
D => sig_from_FF2_to_Mux2,
CLK => FPP_CLK_IN
);
Flipflop3 : FlipFlopN
port map ( Q => sig_from_Mux1_ff1_to_Mux3_ff3,
D => sig_from_Mux3_to_FF3,
CLK => FPP_CLK_IN
);
end archLane;
et mon testbench
library ieee;
use ieee.std_logic_1164.all;
entity testPrimToSecCase1 is
end testPrimToSecCase1;
architecture archPrimToSecTest of testPrimToSecCase1 is
component Lane
Port (
FPP_CLK_IN : IN std_logic;
FPP_FROM_CORE : IN std_logic;
DATA_IN : IN std_logic;
FPP_SEC_EN : IN std_logic;
FPP_TURN_SEL : IN std_logic;
FPP_CORE_SEL : IN std_logic;
FPP_REGP_BYP : IN std_logic;
FPP_SOURCE_SEL : IN std_logic;
FPP_REGN_BYP : IN std_logic;
FPP_PRI_EN : IN std_logic;
Primary_Port : INOUT std_logic;
Secondary_Port : INOUT std_logic;
DATA_OUT : OUT std_logic;
FPP_TO_CORE : OUT std_logic
);
end component;
signal S_FPP_CLK_IN : std_logic;
signal S_FPP_FROM_CORE : std_logic;
signal S_DATA_IN : std_logic;
signal S_FPP_SEC_EN : std_logic;
signal S_FPP_TURN_SEL : std_logic;
signal S_FPP_CORE_SEL : std_logic;
signal S_FPP_REGP_BYP : std_logic;
signal S_FPP_SOURCE_SEL : std_logic;
signal S_FPP_REGN_BYP : std_logic;
signal S_FPP_PRI_EN : std_logic;
signal S_Primary_Port : std_logic;
signal S_Secondary_Port : std_logic;
signal s_FPP_TO_CORE_INT : std_logic;
FPP_TO_CORE <= FPP_TO_CORE_INT; -- The Variable FPP_TO_CORE_INT is affected into FPP_TO_CORE
begin
U : Lane
port map (
S_FPP_CLK_IN,
S_FPP_FROM_CORE,
S_DATA_IN,
S_FPP_SEC_EN,
S_FPP_TURN_SEL,
S_FPP_CORE_SEL,
S_FPP_REGP_BYP,
S_FPP_SOURCE_SEL,
S_FPP_REGN_BYP,
S_FPP_PRI_EN,
S_Primary_Port,
S_Secondary_Port
);
processClock : process
begin
S_FPP_CLK_IN <= '0';
wait for 10 ns;
S_FPP_CLK_IN <= '1';
wait for 10 ns;
end process processClock;
Stimuli : process
begin
S_FPP_FROM_CORE <= '0';
S_DATA_IN <= '0';
S_FPP_SEC_EN <= '0';
S_FPP_TURN_SEL <= '0';
S_FPP_CORE_SEL <= '0';
S_FPP_REGP_BYP <= '0';
S_FPP_SOURCE_SEL <= '0';
S_FPP_REGN_BYP <= '0';
S_FPP_PRI_EN <= '0';
S_Primary_Port <= '0';
S_Secondary_Port <= '0';
wait until S_FPP_CLK_IN <= '1';
S_FPP_FROM_CORE <= '-';
S_DATA_IN <= '-';
S_FPP_SEC_EN <= '1';
S_FPP_TURN_SEL <= '-';
S_FPP_CORE_SEL <= '1';
S_FPP_REGP_BYP <= '0';
S_FPP_SOURCE_SEL <= '0';
S_FPP_REGN_BYP <= '0';
S_FPP_PRI_EN <= '0';
wait until S_FPP_CLK_IN <= '1';
S_Primary_Port <= '0';
wait until S_FPP_CLK_IN <= '1';
S_Secondary_Port <= '1';
wait until S_FPP_CLK_IN <= '1';
end process Stimuli;
end archPrimToSecTest;
i am looking for sombody to correct my testbench.
thanks you for your help.
Franck
please i am looking for someone who can help me to solve my pb.
this is my code :
Bonjour a tous,
je cherche de l'aide pour mon projet sur VHDL:
mon testBench ne fonctionne pas correctement je voudrais de l'aide s'il vous plait.
voici mes codes:
---------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
entity Lane is
port (
FPP_CLK_IN : IN std_logic;
FPP_FROM_CORE : IN std_logic;
DATA_IN : IN std_logic;
FPP_SEC_EN : IN std_logic;
FPP_TURN_SEL : IN std_logic;
FPP_CORE_SEL : IN std_logic;
FPP_REGP_BYP : IN std_logic;
FPP_SOURCE_SEL : IN std_logic;
FPP_REGN_BYP : IN std_logic;
FPP_PRI_EN : IN std_logic;
Primary_Port : INOUT std_logic;
Secondary_Port : INOUT std_logic;
FPP_TO_CORE : OUT std_logic;
DATA_OUT : OUT std_logic
);
end Lane;
architecture archLane of Lane is
component Buf
port (
A : IN std_logic;
Y : OUT std_logic
);
end component;
component BufX
port (
A : IN std_logic;
en : in std_logic;
Y : OUT std_logic
);
end component;
component Mux
port (
Sel : IN std_logic;
E : IN std_logic;
F : IN std_logic;
Z : OUT std_logic
);
end component;
component FlipFlopP
port (
CLK : IN std_logic;
D : IN std_logic;
Q : OUT std_logic
);
end component;
component FlipFlopN
port (
CLK : IN std_logic;
D : IN std_logic;
Q : OUT std_logic
);
end component;
signal Sec_buf_in_to_Mux6 : std_logic;
signal Sel_BufX_in_to_Mux3 : std_logic;
signal Sec_Pri_Buf_IN_TO_MUX6 :std_logic;
signal Sec_Pri_BufY_IN_TO_MUX1 : std_logic;
signal sig_from_Mux1_ff1_to_Mux3_ff3 : std_logic;
signal sig_from_Mux1_to_FF1 : std_logic;
signal sig_from_Mux5_to_FF2_Mux2 :std_logic;
signal sig_from_FF2_to_Mux2 : std_logic;
signal sig_from_Mux3_to_FF3 : std_logic;
signal sig_from_Mux4_to_Mux5 : std_logic;
signal FPP_TO_CORE_INT : std_logic;
begin
FPP_TO_CORE <= FPP_TO_CORE_INT; -- The Variable FPP_TO_CORE_INT is affected into FPP_TO_CORE
Sec_Buf_In : Buf
port map ( A => Secondary_Port,
Y => Sec_buf_in_to_Mux6);
Sec_BufX_Out : BufX
port map ( A => Sel_BufX_in_to_Mux3,
en => FPP_SEC_EN ,
Y => Secondary_Port);
Pri_Buf_In : Buf
port map ( A => Primary_Port,
Y => Sec_Pri_Buf_IN_TO_MUX6);
Pri_BufX_Out : BufX
port map ( A => Sec_Pri_BufY_IN_TO_MUX1,
en => FPP_PRI_EN,
Y => Primary_Port);
MUX1 : Mux
port map ( E => Sig_from_Mux1_ff1_to_Mux3_ff3,
F => sig_from_Mux1_to_FF1,
Z => Sec_Pri_BufY_IN_TO_MUX1,
Sel => FPP_REGN_BYP);
MUX2 : Mux
port map ( E => sig_from_Mux5_to_FF2_Mux2,
F => sig_from_FF2_to_Mux2,
Z => DATA_OUT,
Sel => FPP_REGP_BYP
);
MUX3 : Mux
port map ( E => sig_from_Mux1_ff1_to_Mux3_ff3,
F => sig_from_Mux3_to_FF3,
Z => Sel_BufX_in_to_Mux3,
Sel => FPP_REGN_BYP
);
MUX4 : Mux
port map ( E => DATA_IN,
F => FPP_FROM_CORE,
Z => sig_from_Mux4_to_Mux5,
Sel => FPP_TURN_SEL
);
MUX5 : Mux
port map ( E => sig_from_Mux4_to_Mux5,
F => FPP_TO_CORE_INT,
Z => sig_from_Mux5_to_FF2_Mux2,
Sel => FPP_CORE_SEL
);
MUX6 : Mux
port map ( E => Sec_buf_in_to_Mux6,
F => Sec_pri_buf_in_to_Mux6,
Z => FPP_TO_CORE_INT,
Sel => FPP_SOURCE_SEL
);
Flipflop1 : FlipFlopN
port map ( Q => sig_from_Mux1_ff1_to_Mux3_ff3,
D => sig_from_Mux1_to_FF1,
CLK => FPP_CLK_IN
);
Flipflop2 : FlipFlopP
port map ( Q => sig_from_Mux5_to_FF2_Mux2,
D => sig_from_FF2_to_Mux2,
CLK => FPP_CLK_IN
);
Flipflop3 : FlipFlopN
port map ( Q => sig_from_Mux1_ff1_to_Mux3_ff3,
D => sig_from_Mux3_to_FF3,
CLK => FPP_CLK_IN
);
end archLane;
et mon testbench
library ieee;
use ieee.std_logic_1164.all;
entity testPrimToSecCase1 is
end testPrimToSecCase1;
architecture archPrimToSecTest of testPrimToSecCase1 is
component Lane
Port (
FPP_CLK_IN : IN std_logic;
FPP_FROM_CORE : IN std_logic;
DATA_IN : IN std_logic;
FPP_SEC_EN : IN std_logic;
FPP_TURN_SEL : IN std_logic;
FPP_CORE_SEL : IN std_logic;
FPP_REGP_BYP : IN std_logic;
FPP_SOURCE_SEL : IN std_logic;
FPP_REGN_BYP : IN std_logic;
FPP_PRI_EN : IN std_logic;
Primary_Port : INOUT std_logic;
Secondary_Port : INOUT std_logic;
DATA_OUT : OUT std_logic;
FPP_TO_CORE : OUT std_logic
);
end component;
signal S_FPP_CLK_IN : std_logic;
signal S_FPP_FROM_CORE : std_logic;
signal S_DATA_IN : std_logic;
signal S_FPP_SEC_EN : std_logic;
signal S_FPP_TURN_SEL : std_logic;
signal S_FPP_CORE_SEL : std_logic;
signal S_FPP_REGP_BYP : std_logic;
signal S_FPP_SOURCE_SEL : std_logic;
signal S_FPP_REGN_BYP : std_logic;
signal S_FPP_PRI_EN : std_logic;
signal S_Primary_Port : std_logic;
signal S_Secondary_Port : std_logic;
signal s_FPP_TO_CORE_INT : std_logic;
FPP_TO_CORE <= FPP_TO_CORE_INT; -- The Variable FPP_TO_CORE_INT is affected into FPP_TO_CORE
begin
U : Lane
port map (
S_FPP_CLK_IN,
S_FPP_FROM_CORE,
S_DATA_IN,
S_FPP_SEC_EN,
S_FPP_TURN_SEL,
S_FPP_CORE_SEL,
S_FPP_REGP_BYP,
S_FPP_SOURCE_SEL,
S_FPP_REGN_BYP,
S_FPP_PRI_EN,
S_Primary_Port,
S_Secondary_Port
);
processClock : process
begin
S_FPP_CLK_IN <= '0';
wait for 10 ns;
S_FPP_CLK_IN <= '1';
wait for 10 ns;
end process processClock;
Stimuli : process
begin
S_FPP_FROM_CORE <= '0';
S_DATA_IN <= '0';
S_FPP_SEC_EN <= '0';
S_FPP_TURN_SEL <= '0';
S_FPP_CORE_SEL <= '0';
S_FPP_REGP_BYP <= '0';
S_FPP_SOURCE_SEL <= '0';
S_FPP_REGN_BYP <= '0';
S_FPP_PRI_EN <= '0';
S_Primary_Port <= '0';
S_Secondary_Port <= '0';
wait until S_FPP_CLK_IN <= '1';
S_FPP_FROM_CORE <= '-';
S_DATA_IN <= '-';
S_FPP_SEC_EN <= '1';
S_FPP_TURN_SEL <= '-';
S_FPP_CORE_SEL <= '1';
S_FPP_REGP_BYP <= '0';
S_FPP_SOURCE_SEL <= '0';
S_FPP_REGN_BYP <= '0';
S_FPP_PRI_EN <= '0';
wait until S_FPP_CLK_IN <= '1';
S_Primary_Port <= '0';
wait until S_FPP_CLK_IN <= '1';
S_Secondary_Port <= '1';
wait until S_FPP_CLK_IN <= '1';
end process Stimuli;
end archPrimToSecTest;
i am looking for sombody to correct my testbench.
thanks you for your help.
Franck