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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [rtl/] [bus/] [wishbone/] [ha1588_wb.v] - Blame information for rev 67

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 67 ash_riple
/*
2
 * ha1588_wb.v
3
 *
4
 * Copyright (c) 2012, BABY&HW. All rights reserved.
5
 *
6
 * This library is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11
 * This library is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA 02110-1301  USA
20
 */
21
 
22
`timescale 1ns/1ns
23
 
24
module ha1588_wb (
25
  // reg_interface
26
  input         rst_i,clk_i,
27
  input         stb_i,we_i,
28
  output        ack_o,
29
  input  [31:0] adr_i,  // in byte
30
  input  [31:0] dat_i,
31
  output [31:0] dat_o,
32
  // rtc_interface
33
  input         rtc_clk,
34
  output [31:0] rtc_time_ptp_ns,
35
  output [47:0] rtc_time_ptp_sec,
36
  output        rtc_time_one_pps,
37
  // tsu_interface
38
  input       rx_gmii_clk,
39
  input       rx_gmii_ctrl,
40
  input [7:0] rx_gmii_data,
41
  input       rx_giga_mode,
42
  input       tx_gmii_clk,
43
  input       tx_gmii_ctrl,
44
  input [7:0] tx_gmii_data,
45
  input       tx_giga_mode
46
);
47
 
48
wire rst, up_clk;
49
wire up_wr, up_rd;
50
wire [ 7:0] up_addr;
51
wire [31:0] up_data_wr, up_data_rd;
52
 
53
wb_slv_wrapper wb_slv(
54
  // wishbone side
55
  .rst_i(rst_i),
56
  .clk_i(clk_i),
57
  .stb_i(stb_i),
58
  .we_i(we_i),
59
  .ack_o(ack_o),
60
  .adr_i(adr_i),  // in byte
61
  .dat_i(dat_i),
62
  .dat_o(dat_o),
63
  // localbus side
64
  .rst(rst),
65
  .clk(up_clk),
66
  .wr_out(up_wr),
67
  .rd_out(up_rd),
68
  .addr_out(up_addr),  // in byte
69
  .data_out(up_data_wr),
70
  .data_in(up_data_rd)
71
);
72
 
73
ha1588 ha1588_inst (
74
  .rst(rst),
75
  .clk(up_clk),
76
  .wr_in(up_wr),
77
  .rd_in(up_rd),
78
  .addr_in(up_addr),
79
  .data_in(up_data_wr),
80
  .data_out(up_data_rd),
81
 
82
  .rtc_clk(rtc_clk),
83
  .rtc_time_ptp_ns(rtc_time_ptp_ns),
84
  .rtc_time_ptp_sec(rtc_time_ptp_sec),
85
  .rtc_time_one_pps(rtc_time_one_pps),
86
 
87
  .rx_gmii_clk(rx_gmii_clk),
88
  .rx_gmii_ctrl(rx_gmii_ctrl),
89
  .rx_gmii_data(rx_gmii_data),
90
  .rx_giga_mode(giga_mode),
91
  .tx_gmii_clk(tx_gmii_clk),
92
  .tx_gmii_ctrl(tx_gmii_ctrl),
93
  .tx_gmii_data(tx_gmii_data),
94
  .tx_giga_mode(giga_mode)
95
);
96
 
97
endmodule
98
 

powered by: WebSVN 2.1.0

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