Hello,
The following code comes from the Altera web site. It indicates the implementation is incorrect. It seems to simulate OK. Can anyone tell me what's wrong with it?
ENTITY dff IS
PORT(
enable : IN BIT;
d, clk : IN BIT;
q : OUT BIT
);
END dff;
ARCHITECTURE maxpld OF dff IS
BEGIN
-- The following implementation is incorrect.
PROCESS(clk)
BEGIN
IF (clk'event AND clk = '1') THEN
IF (enable = '1' ) THEN
q <= d;
END IF;
END IF;
END PROCESS;
END maxpld;
Howard123
The following code comes from the Altera web site. It indicates the implementation is incorrect. It seems to simulate OK. Can anyone tell me what's wrong with it?
ENTITY dff IS
PORT(
enable : IN BIT;
d, clk : IN BIT;
q : OUT BIT
);
END dff;
ARCHITECTURE maxpld OF dff IS
BEGIN
-- The following implementation is incorrect.
PROCESS(clk)
BEGIN
IF (clk'event AND clk = '1') THEN
IF (enable = '1' ) THEN
q <= d;
END IF;
END IF;
END PROCESS;
END maxpld;
Howard123