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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [tb/] [big_inport/] [tb.v] - Blame information for rev 4

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

Line No. Rev Author Line
1 2 sinclairrf
/*******************************************************************************
2
 *
3
 * Copyright 2013, Sinclair R.F., Inc.
4
 *
5
 * Test bench for big_inport peripheral.
6
 *
7
 ******************************************************************************/
8
 
9
`timescale 1ns/1ps
10
 
11
module tb;
12
 
13
// 100 MHz clock
14
reg s_clk = 1'b1;
15
always @ (s_clk)
16
  s_clk <= #5 ~s_clk;
17
 
18
reg s_rst = 1'b1;
19
initial begin
20
  repeat (5) @ (posedge s_clk);
21
  s_rst = 1'b0;
22
end
23
 
24
wire     [25:0] s_vb            = 26'h1234567;
25
wire      [8:0] s_min           =  9'h19A;
26
wire      [7:0] s_diag;
27
wire            s_diag_wr;
28
wire            s_done;
29
tb_big_inport uut(
30
  // synchronous reset and processor clock
31
  .i_rst        (s_rst),
32
  .i_clk        (s_clk),
33
  // very big inport signal
34
  .i_vb         (s_vb),
35
  // minimal big inport signal
36
  .i_min        (s_min),
37
  // diagnostic echo of received value
38
  .o_diag       (s_diag),
39
  .o_diag_wr    (s_diag_wr),
40
  // termination signal
41
  .o_done       (s_done)
42
);
43
 
44
always @ (posedge s_clk)
45
  if (s_diag_wr)
46
    $display("%12d : %h", $time, s_diag);
47
 
48
always @ (posedge s_clk)
49
  if (s_done)
50
    $finish;
51
 
52
endmodule

powered by: WebSVN 2.1.0

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