blob: 2139d4471982e42dbcfa2040dcdb060a506b3ad8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
--------------------------------------------------------------------------------
-- Company: Dossmatik GmbH
-- Create Date: 21:08:31 05/17/2011
-- Target Device:
-- Tool versions:
-- Description:
--
-- VHDL Test Bench
-- test for VHPI
--------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.sim_pkg.all;
entity tb_cosim is
end tb_cosim;
architecture behavior of tb_cosim is
function crc (crc_value : std_logic_vector(31 downto 0)
) return std_logic_vector is
variable crc_out : std_logic_vector(31 downto 0);
begin
crc_out := (crc(3 downto 0)& crc_out(31 downto 4)) xor crc;
return crc_out;
end crc;
signal random : std_logic_vector ( 31 downto 0):=X"00000000";
-- Clock period definitions
constant board_clk_period : time := 20 ns;
signal board_clk: std_logic;
begin
process (board_clk)
begin
if rising_edge(board_clk) then
street(to_integer(unsigned(random)));
random<=crc(random);
end if;
end process;
-- Clock process definitions
board_clk_process : process
begin
board_clk <= '0';
wait for board_clk_period/2;
board_clk <= '1';
wait for board_clk_period/2;
end process;
end;
|