Altera_Forum
Honored Contributor
14 years agowhy does ModelSim capture at the same edge
Hi All!
Currently I'm seeking for understanding why ModelSim 6.6d is capturing my data partly at the following (as expected) and the same edge of the clock: I'm trying to simulate the behaviour of a source synchronous interface (in VHDL) and generated some data in a testbench which I feed into the UUT. The unit is only expected to capture the data:process (ep_clk, nreset)
begin
if nreset = '0' then
local_data <= (others => '0');
local_de <= '0';
local_hsync <= '0';
local_vsync <= '0';
elsif rising_edge(ep_clk) then
local_data <= ep_data;
local_de <= ep_de;
local_hsync <= ep_hsync;
local_vsync <= ep_vsync;
end if;
end process;All signals are std_logic(_vector), ep_* are inputs, local_* are outputs. Running the simulation using a 166MHz clock shows that de, hsync and vsync are captured at the same clock edge (which i did not expected). The 48bit ep_data is split: the upper 24 are captured at the next edge while the lower 24 bits are at the same. (If I delay the ep_* signals at the generator the capture is all at the following edge.) Can anymore please explain this behaviour to me? I would have expected that all data is captured always at the following edge in behaviour simulations. What can I do to force capture at the following edge? Thank You! Pauliman