Line 33... |
Line 33... |
Port ( reset : in STD_LOGIC;
|
Port ( reset : in STD_LOGIC;
|
clk : in STD_LOGIC; --! Main system clock
|
clk : in STD_LOGIC; --! Main system clock
|
FlagsDp : in STD_LOGIC_VECTOR (2 downto 0); --! Flags comming from the Datapath
|
FlagsDp : in STD_LOGIC_VECTOR (2 downto 0); --! Flags comming from the Datapath
|
DataDp : in STD_LOGIC_VECTOR (n downto 0); --! Data comming from the Datapath
|
DataDp : in STD_LOGIC_VECTOR (n downto 0); --! Data comming from the Datapath
|
outEnDp : out typeEnDis; --! Enable/Disable datapath output
|
outEnDp : out typeEnDis; --! Enable/Disable datapath output
|
MuxDp : out STD_LOGIC_VECTOR (2 downto 0); --! Select on datapath data from (Memory, Imediate, RegFileA, RegFileB, AluOut)
|
MuxDp : out dpMuxInputs; --! Select on datapath data from (Memory, Imediate, RegFileA, RegFileB, AluOut)
|
MuxRegDp : out STD_LOGIC_VECTOR(1 downto 0); --! Select Alu InputA (Memory,Imediate,RegFileA)
|
MuxRegDp : out STD_LOGIC_VECTOR(1 downto 0); --! Select Alu InputA (Memory,Imediate,RegFileA)
|
ImmDp : out STD_LOGIC_VECTOR (n downto 0); --! Imediate value passed to the Datapath
|
ImmDp : out STD_LOGIC_VECTOR (n downto 0); --! Imediate value passed to the Datapath
|
DpAluOp : out aluOps; --! Alu operations
|
DpAluOp : out aluOps; --! Alu operations
|
DpRegFileWriteAddr : out generalRegisters; --! General register address to write
|
DpRegFileWriteAddr : out generalRegisters; --! General register address to write
|
DpRegFileWriteEn : out STD_LOGIC; --! Enable register write
|
DpRegFileWriteEn : out STD_LOGIC; --! Enable register write
|
Line 61... |
Line 61... |
signal DataDp : std_logic_vector(n downto 0) := (others => '0'); --! Wire to connect Test signal to component
|
signal DataDp : std_logic_vector(n downto 0) := (others => '0'); --! Wire to connect Test signal to component
|
signal MemoryDataInput : std_logic_vector(n downto 0) := (others => '0'); --! Wire to connect Test signal to component
|
signal MemoryDataInput : std_logic_vector(n downto 0) := (others => '0'); --! Wire to connect Test signal to component
|
|
|
--Outputs
|
--Outputs
|
signal outEnDp : typeEnDis; --! Wire to connect Test signal to component
|
signal outEnDp : typeEnDis; --! Wire to connect Test signal to component
|
signal MuxDp : std_logic_vector(2 downto 0); --! Wire to connect Test signal to component
|
signal MuxDp : dpMuxInputs; --! Wire to connect Test signal to component
|
signal MuxRegDp : std_logic_vector(1 downto 0); --! Wire to connect Test signal to component
|
signal MuxRegDp : std_logic_vector(1 downto 0); --! Wire to connect Test signal to component
|
signal ImmDp : std_logic_vector(n downto 0); --! Wire to connect Test signal to component
|
signal ImmDp : std_logic_vector(n downto 0); --! Wire to connect Test signal to component
|
signal DpAluOp : aluOps; --! Wire to connect Test signal to component
|
signal DpAluOp : aluOps; --! Wire to connect Test signal to component
|
signal DpRegFileWriteAddr : generalRegisters; --! Wire to connect Test signal to component
|
signal DpRegFileWriteAddr : generalRegisters; --! Wire to connect Test signal to component
|
signal DpRegFileWriteEn : std_logic; --! Wire to connect Test signal to component
|
signal DpRegFileWriteEn : std_logic; --! Wire to connect Test signal to component
|
Line 146... |
Line 146... |
|
|
-- Verify if signals for the datapath are valid
|
-- Verify if signals for the datapath are valid
|
assert ImmDp = conv_std_logic_vector(10, nBits) report "Invalid value" severity FAILURE;
|
assert ImmDp = conv_std_logic_vector(10, nBits) report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r0 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r0 report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_pass report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_pass report "Invalid value" severity FAILURE;
|
assert MuxDp = muxPos(fromImediate) report "Invalid value" severity FAILURE;
|
assert MuxDp = fromImediate report "Invalid value" severity FAILURE;
|
|
|
wait for CLK_period; -- Executing ... 1
|
wait for CLK_period; -- Executing ... 1
|
|
|
-- State writing on the registers
|
-- State writing on the registers
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
Line 178... |
Line 178... |
|
|
-- Verify if signals for the datapath are valid
|
-- Verify if signals for the datapath are valid
|
assert ImmDp = conv_std_logic_vector(20, nBits) report "Invalid value" severity FAILURE;
|
assert ImmDp = conv_std_logic_vector(20, nBits) report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r1 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r1 report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_pass report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_pass report "Invalid value" severity FAILURE;
|
assert MuxDp = muxPos(fromImediate) report "Invalid value" severity FAILURE;
|
assert MuxDp = fromImediate report "Invalid value" severity FAILURE;
|
|
|
wait for CLK_period; -- Executing ... 1
|
wait for CLK_period; -- Executing ... 1
|
|
|
-- State writing on the registers
|
-- State writing on the registers
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
Line 209... |
Line 209... |
WRITELINE (cmdfile, line_out);
|
WRITELINE (cmdfile, line_out);
|
|
|
-- Verify if signals for the datapath are valid
|
-- Verify if signals for the datapath are valid
|
assert DpRegFileReadAddrB = r1 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrB = r1 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert MuxDp = muxPos(fromRegFileB) report "Invalid value" severity FAILURE;
|
assert MuxDp = fromRegFileB report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
wait for CLK_period; -- Executing ... 1
|
wait for CLK_period; -- Executing ... 1
|
|
|
-- State writing on the registers
|
-- State writing on the registers
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteEn = '1' report "Invalid value" severity FAILURE;
|
Line 241... |
Line 241... |
|
|
-- Verify if signals for the datapath are valid
|
-- Verify if signals for the datapath are valid
|
assert DpRegFileReadAddrB = r0 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrB = r0 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrA = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrA = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert MuxDp = muxPos(fromAlu) report "Invalid value" severity FAILURE;
|
assert MuxDp = fromAlu report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_sum report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_sum report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnA = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnA = '1' report "Invalid value" severity FAILURE;
|
assert MuxRegDp = muxRegPos(fromRegFileA) report "Invalid value" severity FAILURE;
|
assert MuxRegDp = muxRegPos(fromRegFileA) report "Invalid value" severity FAILURE;
|
wait for CLK_period; -- Executing ... 1
|
wait for CLK_period; -- Executing ... 1
|
Line 276... |
Line 276... |
|
|
-- Verify if signals for the datapath are valid
|
-- Verify if signals for the datapath are valid
|
assert ImmDp = conv_std_logic_vector(2, nBits) report "Invalid value" severity FAILURE;
|
assert ImmDp = conv_std_logic_vector(2, nBits) report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileWriteAddr = r2 report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_sum report "Invalid value" severity FAILURE;
|
assert DpAluOp = alu_sum report "Invalid value" severity FAILURE;
|
assert MuxDp = muxPos(fromAlu) report "Invalid value" severity FAILURE;
|
assert MuxDp = fromAlu report "Invalid value" severity FAILURE;
|
assert MuxRegDp = muxRegPos(fromImediate) report "Invalid value" severity FAILURE;
|
assert MuxRegDp = muxRegPos(fromImediate) report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrB = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadAddrB = r2 report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
assert DpRegFileReadEnB = '1' report "Invalid value" severity FAILURE;
|
|
|
wait for CLK_period; -- Executing ... 1
|
wait for CLK_period; -- Executing ... 1
|