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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_0/] [bench/] [vhdl/] [tb.vhd] - Blame information for rev 294

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

Line No. Rev Author Line
1 8 arniml
-------------------------------------------------------------------------------
2
--
3
-- The testbench for t48_core.
4
--
5 228 arniml
-- $Id: tb.vhd,v 1.14 2006-06-21 01:04:05 arniml Exp $
6 8 arniml
--
7
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
8
--
9
-- All rights reserved
10
--
11
-- Redistribution and use in source and synthezised forms, with or without
12
-- modification, are permitted provided that the following conditions are met:
13
--
14
-- Redistributions of source code must retain the above copyright notice,
15
-- this list of conditions and the following disclaimer.
16
--
17
-- Redistributions in synthesized form must reproduce the above copyright
18
-- notice, this list of conditions and the following disclaimer in the
19
-- documentation and/or other materials provided with the distribution.
20
--
21
-- Neither the name of the author nor the names of other contributors may
22
-- be used to endorse or promote products derived from this software without
23
-- specific prior written permission.
24
--
25
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
29
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
-- POSSIBILITY OF SUCH DAMAGE.
36
--
37
-- Please report bugs to the author, but before you do so, please
38
-- make sure that this is not a derivative work and that
39
-- you have the latest version of this file.
40
--
41
-- The latest version of this file can be found at:
42
--      http://www.opencores.org/cvsweb.shtml/t48/
43
--
44
-------------------------------------------------------------------------------
45
 
46
library ieee;
47
use ieee.std_logic_1164.all;
48
 
49
entity tb is
50
 
51
end tb;
52
 
53
 
54
use work.t48_core_comp_pack.all;
55
 
56
use work.t48_tb_pack.all;
57
 
58
architecture behav of tb is
59
 
60
  -- clock period, 11 MHz
61
  constant period_c : time := 90 ns;
62
 
63 80 arniml
  component if_timing
64
    port(
65
      xtal_i   : in std_logic;
66
      ale_i    : in std_logic;
67
      psen_n_i : in std_logic;
68
      rd_n_i   : in std_logic;
69
      wr_n_i   : in std_logic;
70
      prog_n_i : in std_logic;
71
      db_bus_i : in std_logic_vector(7 downto 0);
72
      p2_i     : in std_logic_vector(7 downto 0)
73
    );
74
  end component;
75
 
76 111 arniml
  component lpm_rom
77
    generic (
78
      LPM_WIDTH           : positive;
79
      LPM_TYPE            : string    := "LPM_ROM";
80
      LPM_WIDTHAD         : positive;
81
      LPM_NUMWORDS        : natural   := 0;
82
      LPM_FILE            : string;
83
      LPM_ADDRESS_CONTROL : string    := "REGISTERED";
84
      LPM_OUTDATA         : string    := "REGISTERED";
85
      LPM_HINT            : string    := "UNUSED"
86
    );
87
    port (
88
      address             : in  std_logic_vector(LPM_WIDTHAD-1 downto 0);
89
      inclock             : in  std_logic;
90 183 arniml
      outclock            : in  std_logic;
91 111 arniml
      memenab             : in  std_logic;
92
      q                   : out std_logic_vector(LPM_WIDTH-1 downto 0)
93
    );
94
  end component;
95
 
96 8 arniml
  signal xtal_s          : std_logic;
97 10 arniml
  signal xtal_n_s        : std_logic;
98 8 arniml
  signal res_n_s         : std_logic;
99
  signal xtal3_s         : std_logic;
100
  signal int_n_s         : std_logic;
101
  signal ale_s           : std_logic;
102
  signal rom_addr_s      : std_logic_vector(11 downto 0);
103
  signal rom_data_s      : std_logic_vector( 7 downto 0);
104
  signal ram_data_to_s   : std_logic_vector( 7 downto 0);
105
  signal ram_data_from_s : std_logic_vector( 7 downto 0);
106
  signal ram_addr_s      : std_logic_vector( 7 downto 0);
107
  signal ram_we_s        : std_logic;
108
 
109
  signal p1_s            : std_logic_vector( 7 downto 0);
110
  signal t48_p1_s        : std_logic_vector( 7 downto 0);
111 33 arniml
  signal p1_low_imp_s    : std_logic;
112 8 arniml
  signal p2_s            : std_logic_vector( 7 downto 0);
113
  signal t48_p2_s        : std_logic_vector( 7 downto 0);
114 201 arniml
  signal p2l_low_imp_s   : std_logic;
115
  signal p2h_low_imp_s   : std_logic;
116 80 arniml
  signal psen_n_s        : std_logic;
117 30 arniml
  signal prog_n_s        : std_logic;
118 8 arniml
 
119
  signal bus_s           : std_logic_vector( 7 downto 0);
120
  signal t48_bus_s       : std_logic_vector( 7 downto 0);
121
  signal bus_dir_s       : std_logic;
122
 
123 111 arniml
  signal ext_mem_addr_q      : std_logic_vector( 7 downto 0);
124 8 arniml
  signal ext_ram_data_from_s : std_logic_vector( 7 downto 0);
125 111 arniml
  signal ext_ram_we_q        : std_logic;
126 8 arniml
  signal rd_n_s              : std_logic;
127
  signal wr_n_s              : std_logic;
128
 
129 111 arniml
  signal ext_rom_data_s  : std_logic_vector( 7 downto 0);
130
  signal ext_rom_addr_s  : std_logic_vector(11 downto 0);
131
 
132 103 arniml
  signal tb_p1_q : std_logic_vector( 7 downto 0);
133
  signal tb_p2_q : std_logic_vector( 7 downto 0);
134
 
135 111 arniml
  signal ext_mem_sel_we_q : boolean;
136
  signal ena_ext_ram_q    : boolean;
137
  signal ena_tb_periph_q  : boolean;
138 103 arniml
 
139 8 arniml
  signal zero_s          : std_logic;
140
  signal one_s           : std_logic;
141
  signal zero_byte_s     : std_logic_vector( 7 downto 0);
142
 
143
begin
144
 
145
  zero_s      <= '0';
146
  one_s       <= '1';
147
  zero_byte_s <= (others => '0');
148
 
149 111 arniml
  -----------------------------------------------------------------------------
150
  -- Internal ROM, 2k bytes
151 228 arniml
  -- Initialized by file rom_t49.hex.
152 111 arniml
  -----------------------------------------------------------------------------
153
  rom_internal_2k : lpm_rom
154 8 arniml
    generic map (
155 111 arniml
      LPM_WIDTH           => 8,
156
      LPM_TYPE            => "LPM_ROM",
157
      LPM_WIDTHAD         => 11,
158
      LPM_NUMWORDS        => 2 ** 11,
159 228 arniml
      LPM_FILE            => "rom_t49.hex",
160 111 arniml
      LPM_ADDRESS_CONTROL => "REGISTERED",
161
      LPM_OUTDATA         => "UNREGISTERED",
162
      LPM_HINT            => "UNUSED"
163 8 arniml
    )
164
    port map (
165 111 arniml
      address  => rom_addr_s(10 downto 0),
166
      inclock  => xtal_s,
167 183 arniml
      outclock => zero_s,               -- unused
168 111 arniml
      memenab  => one_s,
169
      q        => rom_data_s
170 8 arniml
    );
171
 
172 111 arniml
  -----------------------------------------------------------------------------
173
  -- External ROM, 2k bytes
174 228 arniml
  -- Initialized by file rom_t49_ext.hex.
175 111 arniml
  -----------------------------------------------------------------------------
176
  ext_rom_addr_s(11 downto 8) <= t48_p2_s(3 downto 0);
177
  ext_rom_addr_s( 7 downto 0) <= ext_mem_addr_q;
178
  rom_external_2k : lpm_rom
179
    generic map (
180
      LPM_WIDTH           => 8,
181
      LPM_TYPE            => "LPM_ROM",
182
      LPM_WIDTHAD         => 11,
183
      LPM_NUMWORDS        => 2 ** 11,
184 228 arniml
      LPM_FILE            => "rom_t49_ext.hex",
185 111 arniml
      LPM_ADDRESS_CONTROL => "REGISTERED",
186
      LPM_OUTDATA         => "UNREGISTERED",
187
      LPM_HINT            => "UNUSED"
188
    )
189
    port map (
190
      address  => ext_rom_addr_s(10 downto 0),
191
      inclock  => xtal_s,
192 183 arniml
      outclock => zero_s,               -- unused
193 111 arniml
      memenab  => one_s,
194
      q        => ext_rom_data_s
195
    );
196
 
197
  -----------------------------------------------------------------------------
198
  -- Internal RAM, 256 bytes
199
  -----------------------------------------------------------------------------
200 228 arniml
  ram_256 : generic_ram_ena
201 8 arniml
    generic map (
202 228 arniml
      addr_width_g => 8,
203
      data_width_g => 8
204 8 arniml
    )
205
    port map (
206 228 arniml
      clk_i => xtal_s,
207
      a_i   => ram_addr_s,
208
      we_i  => ram_we_s,
209
      ena_i => one_s,
210
      d_i   => ram_data_to_s,
211
      d_o   => ram_data_from_s
212 8 arniml
    );
213
 
214 111 arniml
  -----------------------------------------------------------------------------
215
  -- External RAM, 256 bytes
216
  -----------------------------------------------------------------------------
217 228 arniml
  ext_ram_b : generic_ram_ena
218 8 arniml
    generic map (
219 228 arniml
      addr_width_g => 8,
220
      data_width_g => 8
221 8 arniml
    )
222
    port map (
223 228 arniml
      clk_i => xtal_s,
224
      a_i   => ext_mem_addr_q,
225
      we_i  => ext_ram_we_q,
226
      ena_i => one_s,
227
      d_i   => bus_s,
228
      d_o   => ext_ram_data_from_s
229 8 arniml
    );
230
 
231
  t48_core_b : t48_core
232
    generic map (
233
      xtal_div_3_g        => 1,
234
      register_mnemonic_g => 1,
235
      include_port1_g     => 1,
236
      include_port2_g     => 1,
237
      include_bus_g       => 1,
238
      include_timer_g     => 1,
239
      sample_t1_state_g   => 4
240
    )
241
    port map (
242 201 arniml
      xtal_i        => xtal_s,
243 220 arniml
      xtal_en_i     => one_s,
244 201 arniml
      reset_i       => res_n_s,
245
      t0_i          => p1_s(0),
246
      t0_o          => open,
247
      t0_dir_o      => open,
248
      int_n_i       => int_n_s,
249
      ea_i          => rom_addr_s(11),
250
      rd_n_o        => rd_n_s,
251
      psen_n_o      => psen_n_s,
252
      wr_n_o        => wr_n_s,
253
      ale_o         => ale_s,
254
      db_i          => bus_s,
255
      db_o          => t48_bus_s,
256
      db_dir_o      => bus_dir_s,
257
      t1_i          => p1_s(1),
258
      p2_i          => p2_s,
259
      p2_o          => t48_p2_s,
260
      p2l_low_imp_o => p2l_low_imp_s,
261
      p2h_low_imp_o => p2h_low_imp_s,
262
      p1_i          => p1_s,
263
      p1_o          => t48_p1_s,
264
      p1_low_imp_o  => p1_low_imp_s,
265
      prog_n_o      => prog_n_s,
266
      clk_i         => xtal_s,
267
      en_clk_i      => xtal3_s,
268
      xtal3_o       => xtal3_s,
269
      dmem_addr_o   => ram_addr_s,
270
      dmem_we_o     => ram_we_s,
271
      dmem_data_i   => ram_data_from_s,
272
      dmem_data_o   => ram_data_to_s,
273
      pmem_addr_o   => rom_addr_s,
274
      pmem_data_i   => rom_data_s
275 8 arniml
    );
276
 
277 80 arniml
  if_timing_b : if_timing
278
    port map (
279
      xtal_i   => xtal_s,
280
      ale_i    => ale_s,
281
      psen_n_i => psen_n_s,
282
      rd_n_i   => rd_n_s,
283
      wr_n_i   => wr_n_s,
284
      prog_n_i => prog_n_s,
285
      db_bus_i => bus_s,
286 83 arniml
      p2_i     => t48_p2_s
287 80 arniml
    );
288 8 arniml
 
289 80 arniml
 
290 8 arniml
  -----------------------------------------------------------------------------
291
  -- Port logic
292
  --
293
  ports: process (t48_p1_s,
294 33 arniml
                  p1_low_imp_s,
295 8 arniml
                  t48_p2_s,
296 201 arniml
                  p2l_low_imp_s,
297
                  p2h_low_imp_s)
298
    function t48_port_f(t48_p   : std_logic_vector;
299 33 arniml
                        low_imp : std_logic) return std_logic_vector is
300 201 arniml
      variable p_v : std_logic_vector(t48_p'range);
301 8 arniml
    begin
302 33 arniml
      if low_imp = '1' then
303 8 arniml
        p_v := t48_p;
304
 
305
      else
306
        for i in p_v'range loop
307
          if t48_p(i) = '1' then
308
            p_v(i) := 'H';
309
          else
310
            p_v(i) := t48_p(i);
311
          end if;
312
        end loop;
313
 
314
      end if;
315
 
316
      return p_v;
317
    end;
318
 
319
  begin
320
 
321 33 arniml
    p1_s <= t48_port_f(t48_p   => t48_p1_s,
322
                       low_imp => p1_low_imp_s);
323 8 arniml
 
324 201 arniml
    p2_s(3 downto 0) <= t48_port_f(t48_p   => t48_p2_s(3 downto 0),
325
                                   low_imp => p2l_low_imp_s);
326
    p2_s(7 downto 4) <= t48_port_f(t48_p   => t48_p2_s(7 downto 4),
327
                                   low_imp => p2h_low_imp_s);
328 8 arniml
 
329
  end process ports;
330
  --
331
  -----------------------------------------------------------------------------
332
 
333
  bus_s <=   t48_bus_s
334
           when bus_dir_s = '1' else
335
             (others => 'Z');
336
 
337
  bus_s <=   ext_ram_data_from_s
338 111 arniml
           when rd_n_s = '0' and ena_ext_ram_q else
339 8 arniml
             (others => 'Z');
340
 
341 111 arniml
  bus_s <=   ext_rom_data_s
342
           when psen_n_s = '0' else
343
             (others => 'Z');
344 8 arniml
 
345 111 arniml
 
346 8 arniml
  -----------------------------------------------------------------------------
347 103 arniml
  -- External memory access signals
348 8 arniml
  --
349 103 arniml
  ext_mem: process (wr_n_s,
350 111 arniml
                    ext_mem_addr_q,
351
                    ena_ext_ram_q,
352 8 arniml
                    ale_s,
353
                    bus_s,
354
                    xtal_s)
355
  begin
356
    if ale_s'event and ale_s = '0' then
357
      if not is_X(bus_s) then
358 111 arniml
        ext_mem_addr_q <= bus_s;
359 8 arniml
      else
360 111 arniml
        ext_mem_addr_q <= (others => '0');
361 8 arniml
      end if;
362
    end if;
363
 
364
    if wr_n_s'event and wr_n_s = '1' then
365 103 arniml
      -- write enable for external RAM
366 111 arniml
      if ena_ext_ram_q then
367
        ext_ram_we_q <= '1';
368 103 arniml
      end if;
369
 
370
      -- process external memory selector
371 111 arniml
      if ext_mem_addr_q = "11111111" then
372
        ext_mem_sel_we_q <= true;
373 103 arniml
      end if;
374
 
375 8 arniml
    end if;
376
 
377 10 arniml
    if xtal_s'event and xtal_s = '1' then
378 111 arniml
      ext_ram_we_q     <= '0';
379
      ext_mem_sel_we_q <= false;
380 8 arniml
    end if;
381
 
382 103 arniml
  end process ext_mem;
383 8 arniml
  --
384
  -----------------------------------------------------------------------------
385
 
386 103 arniml
 
387
  -----------------------------------------------------------------------------
388
  -- Process ext_mem_sel
389
  --
390
  -- Purpose:
391
  --   Select external memory address space.
392
  --   This is either
393
  --     + external RAM
394
  --     + testbench peripherals
395
  --
396
  ext_mem_sel: process (res_n_s, xtal_s)
397
  begin
398
    if res_n_s = '0' then
399 111 arniml
      ena_ext_ram_q       <= true;
400
      ena_tb_periph_q     <= false;
401 103 arniml
 
402
    elsif xtal_s'event and xtal_s = '1' then
403 111 arniml
      if ext_mem_sel_we_q then
404 103 arniml
        if bus_s(0) = '1' then
405 111 arniml
          ena_ext_ram_q   <= true;
406 103 arniml
        else
407 111 arniml
          ena_ext_ram_q   <= false;
408 103 arniml
        end if;
409
 
410
        if bus_s(1) = '1' then
411 111 arniml
          ena_tb_periph_q <= true;
412 103 arniml
        else
413 111 arniml
          ena_tb_periph_q <= false;
414 103 arniml
        end if;
415
      end if;
416
 
417
    end if;
418
 
419
  end process ext_mem_sel;
420
  --
421
  -----------------------------------------------------------------------------
422
 
423
 
424
  -----------------------------------------------------------------------------
425
  -- Process tb_periph
426
  --
427
  -- Purpose:
428
  --   Implements the testbenc peripherals driving P1 and P2.
429
  --
430
  tb_periph: process (res_n_s, wr_n_s)
431
 
432
    function oc_f (pX : std_logic_vector) return std_logic_vector is
433
      variable r_v : std_logic_vector(pX'range);
434
    begin
435
      for i in pX'range loop
436
        if pX(i) = '0' then
437
          r_v(i) := '0';
438
        else
439
          r_v(i) := 'H';
440
        end if;
441
      end loop;
442
 
443
      return r_v;
444
    end;
445
 
446
  begin
447
    if res_n_s = '0' then
448
      tb_p1_q <= (others => 'H');
449
      tb_p2_q <= (others => 'H');
450
 
451
    elsif wr_n_s'event and wr_n_s = '1' then
452 111 arniml
      if ena_tb_periph_q then
453
        case ext_mem_addr_q is
454 103 arniml
          -- P1
455
          when "00000000" =>
456
            tb_p1_q <= oc_f(t48_bus_s);
457
 
458
          -- P2
459
          when "00000001" =>
460
            tb_p2_q <= oc_f(t48_bus_s);
461
 
462
          when others =>
463
            null;
464
 
465
        end case;
466
 
467
      end if;
468
 
469
    end if;
470
 
471
  end process tb_periph;
472
  --
473
  -----------------------------------------------------------------------------
474
 
475
  p1_s <= tb_p1_q;
476
  p2_s <= tb_p2_q;
477
 
478
 
479 10 arniml
  xtal_n_s <= not xtal_s;
480
 
481 8 arniml
  -----------------------------------------------------------------------------
482
  -- The clock generator
483
  --
484
  clk_gen: process
485
  begin
486
    xtal_s <= '0';
487
    wait for period_c/2;
488
    xtal_s <= '1';
489
    wait for period_c/2;
490
  end process clk_gen;
491
  --
492
  -----------------------------------------------------------------------------
493
 
494
 
495
  -----------------------------------------------------------------------------
496
  -- The reset generator
497
  --
498
  res_gen: process
499
  begin
500
    res_n_s <= '0';
501
    wait for 5 * period_c;
502
    res_n_s <= '1';
503
    wait;
504
  end process res_gen;
505
  --
506
  -----------------------------------------------------------------------------
507
 
508
 
509
  -----------------------------------------------------------------------------
510
  -- The interrupt generator
511
  --
512
  int_gen: process
513
  begin
514
    int_n_s <= '1';
515
    wait for 750 * period_c;
516
    int_n_s <= '0';
517
    wait for  45 * period_c;
518
  end process int_gen;
519
  --
520
  -----------------------------------------------------------------------------
521
 
522
 
523
  -----------------------------------------------------------------------------
524
  -- End of simulation detection
525
  --
526
  eos: process
527
  begin
528
 
529
    outer: loop
530
      wait on tb_accu_s;
531
      if tb_accu_s = "10101010" then
532
        wait on tb_accu_s;
533
        if tb_accu_s = "01010101" then
534
          wait on tb_accu_s;
535
          if tb_accu_s = "00000001" then
536 56 arniml
            -- wait for instruction strobe of this move
537
            wait until tb_istrobe_s'event and tb_istrobe_s = '1';
538
            -- wait for next strobe
539
            wait until tb_istrobe_s'event and tb_istrobe_s = '1';
540 8 arniml
            assert false
541 19 arniml
              report "Simulation Result: PASS."
542 8 arniml
              severity note;
543
          else
544
            assert false
545 19 arniml
              report "Simulation Result: FAIL."
546 8 arniml
              severity note;
547
          end if;
548
 
549
          assert false
550
            report "End of simulation reached."
551
            severity failure;
552
 
553
        end if;
554
      end if;
555
    end loop;
556
 
557
  end process eos;
558
  --
559
  -----------------------------------------------------------------------------
560
 
561
end behav;
562
 
563
 
564
-------------------------------------------------------------------------------
565
-- File History:
566
--
567
-- $Log: not supported by cvs2svn $
568 228 arniml
-- Revision 1.13  2006/06/20 00:45:26  arniml
569
-- new input xtal_en_i
570
--
571 220 arniml
-- Revision 1.12  2005/11/01 21:21:48  arniml
572
-- split low impedance markers for P2
573
--
574 201 arniml
-- Revision 1.11  2005/09/07 17:39:40  arniml
575
-- fix missing assignment to outclock
576
--
577 183 arniml
-- Revision 1.10  2004/05/21 11:24:47  arniml
578
-- split 4k internal ROM into
579
--   + 2k internal ROM
580
--   + 2k external ROM
581
-- EA of t48_core is driven by MSB of internal ROM address
582
-- if upper 2k block is selected, the system switches to EA mode on the fly
583
--
584 111 arniml
-- Revision 1.9  2004/05/17 14:43:33  arniml
585
-- add testbench peripherals for P1 and P2
586
-- this became necessary to observe a difference between externally applied
587
-- port data and internally applied port data
588
--
589 103 arniml
-- Revision 1.8  2004/04/25 20:41:48  arniml
590
-- connect if_timing to P2 output of T48
591
--
592 83 arniml
-- Revision 1.7  2004/04/25 16:23:21  arniml
593
-- added if_timing
594
--
595 80 arniml
-- Revision 1.6  2004/04/14 20:57:44  arniml
596
-- wait for instruction strobe after final end-of-simulation detection
597
-- this ensures that the last mov instruction is part of the dump and
598
-- enables 100% matching with i8039 simulator
599
--
600 56 arniml
-- Revision 1.5  2004/03/29 19:45:15  arniml
601
-- rename pX_limp to pX_low_imp
602
--
603 33 arniml
-- Revision 1.4  2004/03/28 21:30:25  arniml
604
-- connect prog_n_o
605
--
606 30 arniml
-- Revision 1.3  2004/03/26 22:39:28  arniml
607
-- enhance simulation result string
608
--
609 19 arniml
-- Revision 1.2  2004/03/24 23:22:35  arniml
610
-- put ext_ram on falling clock edge to sample the write enable properly
611
--
612 10 arniml
-- Revision 1.1  2004/03/24 21:42:10  arniml
613
-- initial check-in
614
--
615 8 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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