AAlmo3
New Contributor
6 years agoRTL Simulation of Simple AND Gate Error?
I am using Quartus II Web Edition ver. 13. I am just starting out. I am trying to simulate the following VHDL code:
-- Copyright (C) 1991-2013 Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions
-- and other software and tools, and its AMPP partner logic
-- functions, and any output files from any of the foregoing
-- (including device programming or simulation files), and any
-- associated documentation or information are expressly subject
-- to the terms and conditions of the Altera Program License
-- Subscription Agreement, Altera MegaCore Function License
-- Agreement, or other applicable license agreement, including,
-- without limitation, that your use is for the sole purpose of
-- programming logic devices manufactured by Altera and sold by
-- Altera or its authorized distributors. Please refer to the
-- applicable agreement for further details.
-- PROGRAM "Quartus II 64-Bit"
-- VERSION "Version 13.0.0 Build 156 04/24/2013 SJ Web Edition"
-- CREATED "Fri Feb 08 14:19:36 2019"
LIBRARY ieee;
USE ieee.std_logic_1164.all;
LIBRARY work;
ENTITY test IS
PORT
(
b : IN STD_LOGIC;
a : IN STD_LOGIC;
f : OUT STD_LOGIC
);
END test;
ARCHITECTURE bdf_type OF test IS
BEGIN
f <= a AND b;
END bdf_type;When I run an RTL simulation, I get the following output:
As a close-up of the waveform,
You can see that when b = 1 and a = 0, f = 1. What??
This has also been a problem in my course lab with a slightly more complex circuit. The code seems fine but the RTL simulation is not matching up.