Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Modelsim Simulation Problem

Status
Not open for further replies.

Zhane

Member level 5
Joined
Feb 2, 2008
Messages
89
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,876
why is it that there is a difference with the outputs when I simulate with the component itself and when with the component in a top layer?

this is my code...

entity packfinder is
Port ( pfind_bus : in STD_LOGIC_VECTOR (6 downto 0);
pfind_clk: in STD_LOGIC;
-- pfind_mode : in STD_LOGIC;
pfind_rst : in STD_LOGIC;
pfind_start: out STD_LOGIC;
pfind_dataout: out STD_LOGIC_VECTOR(6 downto 0)
);
end packfinder;

architecture Behavioral of packfinder is
signal databuffer: STD_LOGIC_VECTOR(6 downto 0);
signal startPack: STD_LOGIC;
begin

process(pfind_clk, pfind_rst)
begin
if pfind_rst='1' then
startPack <= '0';
databuffer <= (others=>'0');
pfind_dataout<=databuffer;
pfind_start <='0';

else
if rising_edge(pfind_clk) then

databuffer<=pfind_bus;

if(startPack ='1') then
pfind_dataout <=databuffer;
pfind_start <='1';
else
pfind_start <='0';

if( (databuffer(6)='0') and
(databuffer(3)='0') and
(databuffer(2)='1') and
(databuffer(1)='0') and
(databuffer(0)='1') ) then

pfind_start <='1'; -- make it start the next clock
pfind_dataout <=databuffer;
startPack<='1';

end if;
end if;


end if; -- if rising

end if; -- if rst
end process;

end Behavioral;

I placed it as
Inst_packfinder: packfinder PORT MAP(
pfind_bus => top_bus,
pfind_clk => clk0X, -- sampling clock
pfind_rst => top_rst,
pfind_start => pfindsam,
pfind_dataout => datacon2
);
test<= pfindsam;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top