Skip to content

Commit

Permalink
external clks
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoqun-liang committed May 18, 2024
1 parent 3b60f7a commit 6a47f10
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ packages:
- register_interface
- tech_cells_generic
pulp-ethernet:
revision: bf5fc0055a4d3258361e38ee977566fa312570f0
revision: 28fd13f7887c9bf0e9548b56a8706378c9cc01cd
version: null
source:
Git: https://github.com/pulp-platform/pulp-ethernet.git
Expand Down
4 changes: 2 additions & 2 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ dependencies:
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.33.0 }
common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.0 }
cva6: { git: "https://github.com/pulp-platform/cva6.git", rev: pulp-v1.0.0 }
iDMA: { git: "https://github.com/pulp-platform/iDMA.git", version: 0.6.2 }
iDMA: { git: "https://github.com/pulp-platform/iDMA.git", version: 0.6.0 }
irq_router: { git: "https://github.com/pulp-platform/irq_router.git", version: 0.0.1-beta.1 }
opentitan_peripherals: { git: "https://github.com/pulp-platform/opentitan_peripherals.git", version: 0.4.0 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.4.3 }
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git", version: 0.8.1 }
serial_link: { git: "https://github.com/pulp-platform/serial_link.git", version: 1.1.1 }
unbent: { git: "https://github.com/pulp-platform/unbent.git", version: 0.1.6 }
pulp-ethernet: { git: "https://github.com/pulp-platform/pulp-ethernet.git", rev: "bf5fc00" } # branch: cl/eth_idma
pulp-ethernet: { git: "https://github.com/pulp-platform/pulp-ethernet.git", rev: "28fd13f" } # branch: cl/eth_idma

export_include_dirs:
- hw/include
Expand Down
4 changes: 3 additions & 1 deletion hw/cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module cheshire_soc import cheshire_pkg::*; #(
input logic [1:0] boot_mode_i,
input logic rtc_i,
input logic eth_clk125_i,
input logic eth_clk125q_i,
input logic eth_clk200_i,
// External AXI LLC (DRAM) port
output axi_ext_llc_req_t axi_llc_mst_req_o,
Expand Down Expand Up @@ -1312,7 +1313,8 @@ module cheshire_soc import cheshire_pkg::*; #(
) i_tx_eth_idma_wrap (
.clk_i,
.rst_ni,

Check warning on line 1315 in hw/cheshire_soc.sv

View workflow job for this annotation

GitHub Actions / verible-verilog-lint

[verible-verilog-lint] hw/cheshire_soc.sv#L1315

Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]
Raw output
message:"Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]"  location:{path:"hw/cheshire_soc.sv"  range:{start:{line:1315  column:15}}}  severity:WARNING  source:{name:"verible-verilog-lint"  url:"https://github.com/chipsalliance/verible"}  suggestions:{range:{start:{line:1315  column:15}  end:{line:1316}}  text:"      .rst_ni,\n"}
.eth_clk_i ( eth_clk125_i ),
.eth_clk125_i ( eth_clk125_i ),
.eth_clk125q_i ( eth_clk125q_i),
.eth_clk200_i ( eth_clk200_i ),
.phy_rx_clk_i ( eth_rxck_i ),
.phy_rxd_i ( eth_rxd_i ),
Expand Down
6 changes: 4 additions & 2 deletions target/sim/src/fixture_cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ module fixture_cheshire_soc #(
logic i2c_scl_i;
logic i2c_scl_en;

logic eth_clk_125;
logic eth_clk125;
logic eth_clk125q;
logic eth_rxck;
logic [3:0] eth_rxd;
logic eth_rxctl;
Expand Down Expand Up @@ -128,7 +129,8 @@ module fixture_cheshire_soc #(
.i2c_scl_o ( i2c_scl_o ),
.i2c_scl_i ( i2c_scl_i ),
.i2c_scl_en_o ( i2c_scl_en ),
.eth_clk125_i ( eth_clk_125 ),
.eth_clk125_i ( eth_clk125 ),
.eth_clk125q_i ( eth_clk125q ),
.eth_rxck_i ( eth_rxck ),
.eth_rxd_i ( eth_rxd ),
.eth_rxctl_i ( eth_rxctl ),
Expand Down
27 changes: 20 additions & 7 deletions target/sim/src/vip_cheshire_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module vip_cheshire_soc import cheshire_pkg::*; #(
parameter time ClkPeriodSys = 5ns,
parameter time ClkPeriodJtag = 20ns,
parameter time ClkPeriodRtc = 30518ns,
parameter time ClkPeriodEth125 = 8ns,
parameter time ClkPeriodEth = 8ns,
parameter int unsigned RstCycles = 5,
parameter real TAppl = 0.1,
parameter real TTest = 0.9,
Expand Down Expand Up @@ -70,7 +70,8 @@ module vip_cheshire_soc import cheshire_pkg::*; #(
inout wire [SpihNumCs-1:0] spih_csb,
inout wire [ 3:0] spih_sd,
// Ethernet interface
output logic eth_clk_125,
output logic eth_clk125,
output logic eth_clk125q,
input logic [ 3:0] eth_txd,
output logic [ 3:0] eth_rxd,
input logic eth_txck,
Expand Down Expand Up @@ -653,7 +654,8 @@ module vip_cheshire_soc import cheshire_pkg::*; #(
) i_rx_eth_idma_wrap (
.clk_i ( clk ),
.rst_ni ( rst_n ),
.eth_clk_i ( eth_clk_125 ),
.eth_clk125_i ( eth_clk125 ),
.eth_clk125q_i ( eth_clk125q ),
.phy_rx_clk_i ( eth_txck ),
.phy_rxd_i ( eth_txd ),
.phy_rx_ctl_i ( eth_txctl ),
Expand Down Expand Up @@ -709,10 +711,21 @@ module vip_cheshire_soc import cheshire_pkg::*; #(

initial begin
forever begin
eth_clk_125 <= 0;
#(ClkPeriodEth125/2);
eth_clk_125 <= 1;
#(ClkPeriodEth125/2);
eth_clk125 <= 1;
#(ClkPeriodEth/2);
eth_clk125 <= 0;
#(ClkPeriodEth/2);
end
end

initial begin
forever begin
eth_clk125q <= 0;
#(ClkPeriodEth/4);
eth_clk125q <= 1;
#(ClkPeriodEth/2);
eth_clk125q <= 0;
#(ClkPeriodEth/4);
end
end

Expand Down

0 comments on commit 6a47f10

Please sign in to comment.