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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [soc/] [prj/] [altera/] [or1k_soc_top_tb.v] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 xianfeng
// Copyright (C) 1991-2009 Altera Corporation
2
// Your use of Altera Corporation's design tools, logic functions 
3
// and other software and tools, and its AMPP partner logic 
4
// functions, and any output files from any of the foregoing 
5
// (including device programming or simulation files), and any 
6
// associated documentation or information are expressly subject 
7
// to the terms and conditions of the Altera Program License 
8
// Subscription Agreement, Altera MegaCore Function License 
9
// Agreement, or other applicable license agreement, including, 
10
// without limitation, that your use is for the sole purpose of 
11
// programming logic devices manufactured by Altera and sold by 
12
// Altera or its authorized distributors.  Please refer to the 
13
// applicable agreement for further details.
14
 
15
// *****************************************************************************
16
// This file contains a Verilog test bench with test vectors .The test vectors  
17
// are exported from a vector file in the Quartus Waveform Editor and apply to  
18
// the top level entity of the current Quartus project .The user can use this   
19
// testbench to simulate his design using a third-party simulation tool .       
20
// *****************************************************************************
21
// Generated on "10/07/2009 23:14:09"
22
 
23
// Verilog Self-Checking Test Bench (with test vectors) for design :    or1k_soc_top
24
// 
25
// Simulation tool : 3rd Party
26
// 
27
 
28
`timescale 1 ps/ 1 ps
29
 
30
module or1k_soc_top_vlg_vec_tst();
31
// constants                                           
32
// general purpose registers
33
reg eth_col_pad_i;
34
reg eth_crs_pad_i;
35
//reg eth_fds_mdint_pad_i;
36
reg treg_eth_mdio_pad_io;
37
reg eth_rx_clk_pad_i;
38
reg eth_rx_dv_pad_i;
39
reg eth_rx_er_pad_i;
40
reg [3:0] eth_rxd_pad_i;
41
reg eth_tx_clk_pad_i;
42
reg [31:0] treg_gpio_a_pad_io;
43
reg rst_n_pad_i;
44
reg uart_srx_pad_i;
45
reg wb_clk_pad_i;
46
// wires                                               
47
//wire clk_cpu_o;
48
wire eth_mdc_pad_o;
49
wire eth_mdio_pad_io;
50
//wire eth_trste_pad_o;
51
wire eth_tx_en_pad_o;
52
wire eth_tx_er_pad_o;
53
wire [3:0] eth_txd_pad_o;
54
wire [31:0] gpio_a_pad_io;
55
wire uart_stx_pad_o;
56
wire wb_rst_pad_o;
57
 
58
wire sampler;
59
 
60
//ddr sdram
61
wire             ddr_global_reset_n;
62
wire    [ 15: 0] ddr_mem_dq;
63
wire    [  1: 0] ddr_mem_dqs;
64
wire    [ 12: 0] ddr_mem_addr;
65
wire    [  1: 0] ddr_mem_ba;
66
wire             ddr_mem_cas_n;
67
wire             ddr_mem_cke;
68
wire             ddr_mem_clk;
69
wire             ddr_mem_clk_n;
70
wire             ddr_mem_cs_n;
71
wire    [  1: 0] ddr_mem_dm;
72
wire             ddr_mem_ras_n;
73
wire             ddr_mem_we_n;
74
 
75
// assign statements (if any)                          
76
assign eth_mdio_pad_io = treg_eth_mdio_pad_io;
77
assign gpio_a_pad_io = treg_gpio_a_pad_io;
78
or1k_soc_top i1 (
79
// port map - connection between master ports and signals/registers   
80
//      .clk_cpu_o(clk_cpu_o),
81
        .eth_col_pad_i(eth_col_pad_i),
82
        .eth_crs_pad_i(eth_crs_pad_i),
83
//      .eth_fds_mdint_pad_i(eth_fds_mdint_pad_i),
84
        .eth_mdc_pad_o(eth_mdc_pad_o),
85
        .eth_mdio_pad_io(eth_mdio_pad_io),
86
        .eth_rx_clk_pad_i(eth_rx_clk_pad_i),
87
        .eth_rx_dv_pad_i(eth_rx_dv_pad_i),
88
        .eth_rx_er_pad_i(eth_rx_er_pad_i),
89
        .eth_rxd_pad_i(eth_rxd_pad_i),
90
//      .eth_trste_pad_o(eth_trste_pad_o),
91
        .eth_tx_clk_pad_i(eth_tx_clk_pad_i),
92
        .eth_tx_en_pad_o(eth_tx_en_pad_o),
93
        .eth_tx_er_pad_o(eth_tx_er_pad_o),
94
        .eth_txd_pad_o(eth_txd_pad_o),
95
        .gpio_a_pad_io(gpio_a_pad_io),
96
        .rst_n_pad_i(rst_n_pad_i),
97
        .uart_srx_pad_i(uart_srx_pad_i),
98
        .uart_stx_pad_o(uart_stx_pad_o),
99
        .wb_clk_pad_i(wb_clk_pad_i),
100
//      .wb_rst_pad_o(wb_rst_pad_o),
101
 
102
        //ddr sdram
103
        .ddr_pll_clk_pad_i      (wb_clk_pad_i),
104
        .ddr_mem_cs_n_o         (ddr_mem_cs_n),
105
        .ddr_mem_cke_o          (ddr_mem_cke),
106
        .ddr_mem_addr_o         (ddr_mem_addr),
107
        .ddr_mem_ba_o           (ddr_mem_ba),
108
        .ddr_mem_ras_n_o        (ddr_mem_ras_n),
109
        .ddr_mem_cas_n_o        (ddr_mem_cas_n),
110
        .ddr_mem_we_n_o         (ddr_mem_we_n),
111
        .ddr_mem_dm_o           (ddr_mem_dm),
112
        .ddr_mem_clk_io         (ddr_mem_clk),
113
        .ddr_mem_clk_n_io       (ddr_mem_clk_n),
114
        .ddr_mem_dq_io          (ddr_mem_dq),
115
        .ddr_mem_dqs_io         (ddr_mem_dqs)
116
);
117
 
118
// wb_clk_pad_i
119
always
120
begin
121
        wb_clk_pad_i = 1'b0;
122
        wb_clk_pad_i = #10000 1'b1;
123
        #10000;
124
end
125
 
126
// rst_n_pad_i
127
initial
128
begin
129
        rst_n_pad_i = 1'b0;
130
        rst_n_pad_i = #200000 1'b1;
131
end
132
// gpio_a_pad_io
133
initial
134
begin
135
        treg_gpio_a_pad_io = {32{1'bZ}};
136
end
137
 
138
// uart_srx_pad_i
139
initial
140
begin
141
        uart_srx_pad_i = 1'b1;
142
end
143
 
144
altera_ddr_mem_model ddr_inst(
145
                              // inputs:
146
                               .mem_addr        (ddr_mem_addr),
147
                               .mem_ba          (ddr_mem_ba),
148
                               .mem_cas_n       (ddr_mem_cas_n),
149
                               .mem_cke         (ddr_mem_cke),
150
                               .mem_clk         (ddr_mem_clk),
151
                               .mem_clk_n       (ddr_mem_clk_n),
152
                               .mem_cs_n        (ddr_mem_cs_n),
153
                               .mem_dm          (ddr_mem_dm),
154
                               .mem_ras_n       (ddr_mem_ras_n),
155
                               .mem_we_n        (ddr_mem_we_n),
156
 
157
                              // outputs:
158
                               .global_reset_n  (ddr_global_reset_n),
159
                               .mem_dq          (ddr_mem_dq),
160
                               .mem_dqs         (ddr_mem_dqs)
161
                            )
162
;
163
endmodule
164
 

powered by: WebSVN 2.1.0

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