OpenCores
URL https://opencores.org/ocsvn/core1990_interlaken/core1990_interlaken/trunk

Subversion Repositories core1990_interlaken

[/] [core1990_interlaken/] [trunk/] [gateware/] [simulation/] [deframing_meta_tb.vhd] - Blame information for rev 8

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 N.Boukadid
library ieee;
2
use ieee.std_logic_1164.all;
3
 
4
entity testbench_deframer is
5
end entity testbench_deframer;
6
 
7
architecture tb_deframer of testbench_deframer is
8
 
9
    signal Clk          : std_logic;                     -- Clock input
10
        signal Reset            : std_logic;                                     -- Reset decoder
11
        signal Data_In      : std_logic_vector(63 downto 0); -- Data input
12
        signal Deframer_En   : std_logic;                     -- Enables the decoder
13
        signal Data_Out     : std_logic_vector(63 downto 0); -- Decoded 64-bit output
14
 
15
    signal Data_Control_In  : std_logic;                     -- Indicates whether the word is data or control
16
    signal Data_Control_Out : std_logic;                    --    Indicates whether the word is data or control
17
 
18
    signal Data_Valid_Out   : std_logic;
19
 
20
    constant CLK_PERIOD : time := 10 ns;
21
 
22
begin
23
  uut : entity work.Meta_Deframer
24
  port map (
25
    clk => clk,
26
    reset => reset,
27
    Deframer_En => Deframer_En,
28
 
29
    Data_in => Data_in,
30
    Data_out => Data_out,
31
    Data_control_in => Data_control_in,
32
    Data_control_out => Data_control_out,
33
    Data_valid_out => Data_valid_out
34
  );
35
 
36
   Clk_process :process
37
     begin
38
          clk <= '1';
39
          wait for CLK_PERIOD/2;  --for half of clock period clk stays at '0'.
40
          clk <= '0';
41
          wait for CLK_PERIOD/2;  --for next half of clock period clk stays at '1'.
42
     end process;
43
 
44
    simulation : process
45
    begin
46
        wait for 1 ps;
47
        Data_control_in <= '0';
48
        deframer_en <= '1';
49
        reset <= '1';
50
        data_in <= (others=>'0');
51
 
52
        wait for CLK_PERIOD;
53
 
54
        wait for CLK_PERIOD;
55
 
56
        reset <= '0';
57
        Data_control_in <= '1';
58
        Data_in <= X"78f6_78f6_78f6_78f6";
59
        wait for CLK_PERIOD;
60
 
61
 
62
        Data_in <= X"2800_0000_0000_0000";
63
        wait for CLK_PERIOD;
64
 
65
 
66
        data_in <= X"1e1e_1e1e_1e1e_1e1e";
67
        wait for CLK_PERIOD;
68
 
69
        Data_control_in <= '0';
70
        Data_in <= X"4f21a2a3a4a5a6a7";
71
        wait for CLK_PERIOD;
72
 
73
 
74
        data_in <= X"5f5e5a5c5b60f2a0";
75
        wait for CLK_PERIOD;
76
 
77
        data_in  <= X"635e22a3a4a5a7a7";
78
        wait for CLK_PERIOD;
79
 
80
        data_in  <= X"70000FFF000000F0";
81
        wait for CLK_PERIOD*2;
82
 
83
 
84
        Data_in  <= X"2f5e5d5c5b5a5958";
85
        wait for CLK_PERIOD;
86
 
87
        wait for CLK_PERIOD;
88
 
89
        Data_Control_In <= '1';
90
        data_in  <= X"E000_0001_0000_0000";
91
        wait for CLK_PERIOD*3;
92
        Data_Control_In <= '0';
93
        data_in  <= X"9486576758050505";
94
        wait for CLK_PERIOD;
95
 
96
 
97
        data_in <= X"60b35d5dc4a582a7";
98
        wait for CLK_PERIOD;
99
 
100
        data_in <= X"2f5e5d5c5b5a5958";
101
        wait for CLK_PERIOD*5;
102
 
103
        Data_in <= X"1f5e5d5c5b5a5958";
104
        wait for CLK_PERIOD*3;
105
 
106
        Data_Control_In <= '1';
107
        Data_in <= X"6400_0000_6222_431a";
108
        wait for clk_period;
109
 
110
        Data_control_in <= '1';
111
        Data_in <= X"78f6_78f6_78f6_78f6";
112
        wait for CLK_PERIOD;
113
 
114
 
115
        Data_in <= X"2800_0000_0000_0000";
116
        wait for CLK_PERIOD;
117
 
118
 
119
        data_in <= X"1e1e_1e1e_1e1e_1e1e";
120
        wait for CLK_PERIOD;
121
 
122
        Data_control_in <= '0';
123
        Data_in <= X"4f21a2a3a4a5a6a7";
124
        wait for CLK_PERIOD;
125
 
126
 
127
        data_in <= X"5f5e5a5c5b60f2a0";
128
        wait for CLK_PERIOD;
129
 
130
        data_in <= X"2f5e5d5c5b5a5958";
131
        wait for CLK_PERIOD*12;
132
 
133
        data_in <= X"2f5e5d5c5b5a5958";
134
        wait for CLK_PERIOD;
135
 
136
        Data_in <= X"1f5e5d5c5b5a5958";
137
        wait for CLK_PERIOD;
138
 
139
 
140
        Data_in <= X"2f5e5d5c5b5a5958";
141
        wait for CLK_PERIOD;
142
 
143
        Data_in <= X"78f6_78f6_78f6_78f6";
144
        wait for CLK_PERIOD;
145
 
146
 
147
        Data_in <= X"2800_0000_0000_0000";
148
        wait for CLK_PERIOD;
149
 
150
 
151
        data_in <= X"1e1e_1e1e_1e1e_1e1e";
152
        wait for CLK_PERIOD;
153
 
154
        Data_Control_In <= '1';
155
        data_in <= X"645e5d5c5b5a5958";
156
        wait for CLK_PERIOD;
157
 
158
        Data_in <= X"78f6_78f6_78f6_78f6";
159
        wait for CLK_PERIOD;
160
 
161
 
162
        Data_in <= X"2800_0000_0000_0000";
163
        wait for CLK_PERIOD;
164
 
165
        Data_Control_In <= '0';
166
        data_in <= X"1e1e_1e1e_1e1e_1e1e";
167
        wait for CLK_PERIOD;
168
 
169
        Data_in <= X"4f21a2a3a4a5a6a7";
170
        wait for CLK_PERIOD;
171
 
172
 
173
        data_in <= X"5f5e5a5c5b60f2a0";
174
        wait for CLK_PERIOD;
175
 
176
        data_in  <= X"635e22a3a4a5a7a7";
177
        wait for CLK_PERIOD;
178
 
179
        data_in <= X"5f5e5a5c5b60f2a0";
180
        wait for CLK_PERIOD;
181
 
182
        data_in  <= X"635e22a3a4a5a7a7";
183
        wait for CLK_PERIOD;
184
 
185
        data_in  <= X"70000FFF000000F0";
186
        wait for CLK_PERIOD*2;
187
 
188
 
189
        Data_in <= X"2f5e5d5c5b5a5958";
190
        wait for CLK_PERIOD;
191
 
192
        data_in  <= X"8050505050050505";
193
        wait for CLK_PERIOD*3;
194
 
195
        data_in  <= X"9486576758050505";
196
        wait for CLK_PERIOD;
197
 
198
        data_in <= X"60b35d5dc4a582a7";
199
        wait for CLK_PERIOD*60;
200
 
201
        data_in  <= X"8050505050050505";
202
        wait for CLK_PERIOD*3;
203
 
204
        data_in  <= X"9486576758050505";
205
        wait for CLK_PERIOD;
206
 
207
 
208
        data_in <= X"60b35d5dc4a582a7";
209
        wait for CLK_PERIOD;
210
 
211
 
212
        data_in <= X"2f5e5d5c5b5a5958";
213
        wait for CLK_PERIOD*12;
214
 
215
        data_in <= X"2c8e5d5c5b5a5958";
216
        wait for CLK_PERIOD;
217
 
218
        Data_in <= X"1f5e5d5c5b5a5958";
219
        wait for CLK_PERIOD*26;
220
 
221
        data_in <= X"2c8e5d5c5b5a5958";
222
        wait for CLK_PERIOD*18;
223
 
224
        data_in <= X"1f5e5d5c5b5a5958";
225
        wait for CLK_PERIOD;
226
        wait;
227
    end process;
228
 
229
end architecture tb_deframer;
230
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.