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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [tb/] [open_drain/] [tb.v-template] - Blame information for rev 7

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

Line No. Rev Author Line
1 2 sinclairrf
/*******************************************************************************
2
 *
3
 * Copyright 2012, Sinclair R.F., Inc.
4
 *
5
 * Test bench for the open_drain peripheral.
6
 *
7
 ******************************************************************************/
8
 
9
`timescale 1ns/1ps
10
 
11
module tb;
12
 
13
//
14
// 100 MHz clock and synchronous reset.
15
//
16
 
17
reg s_clk = 1'b1;
18
always @ (s_clk)
19
  s_clk <= #5 ~s_clk;
20
 
21
reg s_rst = 1'b1;
22
initial begin
23
  repeat (5) @ (posedge s_clk);
24
  s_rst = 1'b0;
25
end
26
 
27
wire s_env;
28
tri1 [@WIDTH@-1:0] s_od;
29
tb_open_drain uut(
30
  // synchronous reset and processor clock
31
  .i_rst        (s_rst),
32
  .i_clk        (s_clk),
33
  .o_env        (s_env),
34
  .io_od        (s_od)
35
);
36
 
37
initial begin
38
  repeat (100) @ (posedge s_clk);
39
  $finish;
40
end
41
 
42
always @ (posedge s_clk)
43
  $display("%12d : %b %b", $time, s_env, s_od);
44
 
45
endmodule

powered by: WebSVN 2.1.0

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