Page History
...
Code Block | ||
---|---|---|
| ||
--/*****************************************************************************/
--/* G E N E R A T E D V H D L C O D E */
--/*****************************************************************************/
--/* KIELER - Kiel Integrated Environment for Layout Eclipse RichClient */
--/* */
--/* http://www.informatik.uni-kiel.de/rtsys/kieler/ */
--/* Copyright 2013 by */
--/* + Christian-Albrechts-University of Kiel */
--/* + Department of Computer Science */
--/* + Real-Time and Embedded Systems Group */
--/* */
--/* This code is provided under the terms of the Eclipse Public License (EPL).*/
--/*****************************************************************************/
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY abo_tb IS
END abo_tb;
ARCHITECTURE behavior OF abo_tb IS
COMPONENT abo
PORT(
tick : IN std_logic;
reset : IN std_logic;
--inputs
A: IN boolean;
B: IN boolean;
--outputs
O1 : OUT boolean;
O2 : OUT boolean;
A_out : OUT boolean;
B_out : OUT boolean
);
END COMPONENT;
--Inputs
signal A : boolean := false;
signal B : boolean := false;
--Outputs
signal O1 : boolean := false;
signal O2 : boolean := false;
signal A_out : boolean := false;
signal B_out : boolean := false;
--Control
signal reset : std_logic := '0';
signal tick : std_logic := '0';
constant tick_period : time := 100 ns;
BEGIN
uut: abo PORT MAP(
tick => tick,
reset => reset,
--Inputs
A => A,
B => B,
--Outputs
O1 => O1,
O2 => O2,
A_out => A_out,
B_out => B_out
);
tick_process: process
begin
tick <= '0';
wait for tick_period/2;
tick <= '1';
wait for tick_period/2;
end process;
-- Stimulus process
stim_proc: process
begin
wait for 1 ps;
--sim Process
--NEW TRACE
reset <= '1';
wait for tick_period;
reset <= '0';
-- tick 1
A <= true;
B <= false;
wait for tick_period;
assert( O1 = true )
report "1st trace: 1st tick: O1 should have been true"
severity ERROR;
assert( O2 = false )
report "1st trace: 1st tick: O2 should have been false"
severity ERROR;
assert( A_out = true )
report "1st trace: 1st tick: A_out should have been true"
severity ERROR;
assert( B_out = true )
report "1st trace: 1st tick: B_out should have been true"
severity ERROR;
-- tick 2
A <= false;
B <= false;
wait for tick_period;
assert( O1 = true )
report "1st trace: 2nd tick: O1 should have been true"
severity ERROR;
assert( O2 = false )
report "1st trace: 2nd tick: O2 should have been false"
severity ERROR;
assert( A_out = false )
report "1st trace: 2nd tick: A_out should have been false"
severity ERROR;
assert( B_out = false )
report "1st trace: 2nd tick: B_out should have been false"
severity ERROR;
-- tick 3
A <= false;
B <= true;
wait for tick_period;
assert( O1 = false )
report "1st trace: 3rd tick: O1 should have been false"
severity ERROR;
assert( O2 = true )
report "1st trace: 3rd tick: O2 should have been true"
severity ERROR;
assert( A_out = false )
report "1st trace: 3rd tick: A_out should have been false"
severity ERROR;
assert( B_out = true )
report "1st trace: 3rd tick: B_out should have been true"
severity ERROR;
--NEW TRACE
reset <= '1';
wait for tick_period;
reset <= '0';
-- tick 1
A <= false;
B <= false;
wait for tick_period;
assert( O1 = false )
report "2nd trace: 1st tick: O1 should have been false"
severity ERROR;
assert( O2 = false )
report "2nd trace: 1st tick: O2 should have been false"
severity ERROR;
assert( A_out = false )
report "2nd trace: 1st tick: A_out should have been false"
severity ERROR;
assert( B_out = false )
report "2nd trace: 1st tick: B_out should have been false"
severity ERROR;
-- tick 2
A <= true;
B <= false;
wait for tick_period;
assert( O1 = false )
report "2nd trace: 2nd tick: O1 should have been false"
severity ERROR;
assert( O2 = true )
report "2nd trace: 2nd tick: O2 should have been true"
severity ERROR;
assert( A_out = true )
report "2nd trace: 2nd tick: A_out should have been true"
severity ERROR;
assert( B_out = true )
report "2nd trace: 2nd tick: B_out should have been true"
severity ERROR;
wait;
end process;
END;
|
...
The variable declaration must fit to the used variables in the ESO file, logically.
SCL Model | Core ESO fileFile | ESO File | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Note |
---|
SCL file is not realy correct, will be corrected as soon as possible |
The lines 23 to 66 (testbench file) are generated from SCL model file. The model tells the transformation which input and output the abo component must have and the type of these variables (signals in VHDL). So the SCl file is loaded and the needed code is generated.
...
|
Note |
---|
SCL file is not realy correct, will be corrected as soon as possible |
The lines 23 to 66 (testbench file) are generated from SCL model file. The model tells the transformation which input and output the abo component must have and the type of these variables (signals in VHDL). So the SCl file is loaded and the needed code is generated.
The simulation process (starts at line 79) is generated using the core ESO file. How the simulation process is generated will be schown at the follwing example:
ESO trace | Testbench | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
for better unterstanding we use the normal ESO trace
|
|
Line 2 and 3 in the testbench are setting the inpute. All (!) inputs must be set! Signal which are present are set to the according value