Skip to content

Commit 0465402

Browse files
committed
cleanup
1 parent a4bb502 commit 0465402

File tree

9 files changed

+155
-142
lines changed

9 files changed

+155
-142
lines changed

Bender.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ packages:
1515
- apb
1616
- register_interface
1717
axi:
18-
revision: fccffb5953ec8564218ba05e20adbedec845e014
19-
version: 0.39.1
18+
revision: ac5deb3ff086aa34b168f392c051e92603d6c0e2
19+
version: 0.39.2
2020
source:
2121
Git: https://github.com/pulp-platform/axi.git
2222
dependencies:
@@ -67,8 +67,8 @@ packages:
6767
dependencies:
6868
- common_cells
6969
axi_vga:
70-
revision: 07be187d1e954d8090031b32d236ad76dc62ce45
71-
version: 0.1.1
70+
revision: 3718b9930f94a9eaad8ee50b4bccc71df0403084
71+
version: 0.1.3
7272
source:
7373
Git: https://github.com/pulp-platform/axi_vga.git
7474
dependencies:
@@ -92,8 +92,8 @@ packages:
9292
- common_cells
9393
- register_interface
9494
common_cells:
95-
revision: 2bd027cb87eaa9bf7d17196ec5f69864b35b630f
96-
version: 1.32.0
95+
revision: 7773d971b9d7bef7f5f6a2ef36ee1e4d02cefcd3
96+
version: 1.34.0
9797
source:
9898
Git: https://github.com/pulp-platform/common_cells.git
9999
dependencies:
@@ -116,7 +116,7 @@ packages:
116116
- fpnew
117117
- tech_cells_generic
118118
ethernet:
119-
revision: ab333c946fbfea18132904f8de0dc6702d67e741
119+
revision: d7d14161b8f129bccfcf9717f33760cb0a027856
120120
version: null
121121
source:
122122
Git: [email protected]:pulp-platform/pulp-ethernet.git
@@ -179,8 +179,8 @@ packages:
179179
- register_interface
180180
- tech_cells_generic
181181
register_interface:
182-
revision: d7693be4aef1fc7e7eb2b00b41c42e87d959866c
183-
version: 0.4.2
182+
revision: ae616e5a1ec2b41e72d200e5ab09c65e94aebd3d
183+
version: 0.4.4
184184
source:
185185
Git: https://github.com/pulp-platform/register_interface.git
186186
dependencies:

Bender.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies:
3030
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git", version: 0.8.0 }
3131
serial_link: { git: "https://github.com/pulp-platform/serial_link.git", version: 1.1.0 }
3232
unbent: { git: "https://github.com/pulp-platform/unbent.git", version: 0.1.6 }
33-
ethernet: { git: "[email protected]:pulp-platform/pulp-ethernet.git", rev: "ab333c9" }
33+
ethernet: { git: "[email protected]:pulp-platform/pulp-ethernet.git", rev: "d7d1416" }
3434

3535
export_include_dirs:
3636
- hw/include

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include cheshire.mk
1313

1414
# Inside the repo, forward (prefixed) all, nonfree, and clean targets
1515
all:
16-
@$(MAKE) chs-all
16+
@$(MAKE) chs-all
1717

1818
%-all:
1919
@$(MAKE) chs-$*-all

cheshire.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ CLINTROOT := $(shell $(BENDER) path clint)
2323
AXIRTROOT := $(shell $(BENDER) path axi_rt)
2424
AXI_VGA_ROOT := $(shell $(BENDER) path axi_vga)
2525
IDMA_ROOT := $(shell $(BENDER) path idma)
26+
ETH_ROOT := $(shell $(BENDER) path ethernet)
2627

2728
REGTOOL ?= $(CHS_REG_DIR)/vendor/lowrisc_opentitan/util/regtool.py
2829

@@ -43,6 +44,11 @@ ifeq ($(shell test -f $(BENDER_ROOT)/.chs_deps && echo 1),)
4344
-include $(BENDER_ROOT)/.chs_deps
4445
endif
4546

47+
idma-gen:
48+
make -C $(IDMA_ROOT) idma_hw_all
49+
make -C $(IDMA_ROOT) target/rtl/idma_reg64_2d.hjson
50+
make -C $(ETH_ROOT) eth-gen
51+
4652
# Running this target will reset dependencies (without updating the checked-in Bender.lock)
4753
chs-clean-deps:
4854
rm -rf .bender
@@ -171,7 +177,7 @@ CHS_XILINX_ALL += $(CHS_ROOT)/target/xilinx/scripts/add_sources.tcl
171177

172178
CHS_ALL += $(CHS_SW_ALL) $(CHS_HW_ALL) $(CHS_SIM_ALL) $(CHS_XILINX_ALL)
173179

174-
chs-all: $(CHS_ALL)
180+
chs-all: $(CHS_ALL) idma-gen
175181
chs-sw-all: $(CHS_SW_ALL)
176182
chs-hw-all: $(CHS_HW_ALL)
177183
chs-bootrom-all: $(CHS_BOOTROM_ALL)

hw/cheshire_soc.sv

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ module cheshire_soc import cheshire_pkg::*; #(
2828
input logic test_mode_i,
2929
input logic [1:0] boot_mode_i,
3030
input logic rtc_i,
31+
input logic eth_clk_125,
32+
input logic eth_clk_90,
3133
// External AXI LLC (DRAM) port
3234
output axi_ext_llc_req_t axi_llc_mst_req_o,
3335
input axi_ext_llc_rsp_t axi_llc_mst_rsp_i,
@@ -81,9 +83,7 @@ module cheshire_soc import cheshire_pkg::*; #(
8183
output logic eth_txck_o,
8284
output logic [3:0] eth_txd_o,
8385
output logic eth_txctl_o,
84-
output logic eth_rstn_o,
85-
input logic eth_intn_i,
86-
input logic eth_pme_i,
86+
output logic eth_rstn_o,
8787
input logic eth_mdio_i,
8888
output logic eth_mdio_o,
8989
output logic eth_mdio_oe,
@@ -1313,7 +1313,9 @@ module cheshire_soc import cheshire_pkg::*; #(
13131313
.reg_rsp_t ( reg_rsp_t )
13141314
) i_tx_eth_idma_wrap (
13151315
.clk_i,
1316-
.rst_ni,
1316+
.rst_ni,
1317+
.eth_clk_i ( eth_clk_125 ),
1318+
.eth_clk90_i ( eth_clk_90 ),
13171319
.phy_rx_clk_i ( eth_rxck_i ),
13181320
.phy_rxd_i ( eth_rxd_i ),
13191321
.phy_rx_ctl_i ( eth_rxctl_i ),
@@ -1323,7 +1325,7 @@ module cheshire_soc import cheshire_pkg::*; #(
13231325
.phy_resetn_o ( eth_rstn_o ),
13241326
.phy_intn_i ( 1'b1 ),
13251327
.phy_pme_i ( 1'b1 ),
1326-
.phy_mdio_i ( 1'b0 ),
1328+
.phy_mdio_i ( eth_mdio_i ),
13271329
.phy_mdio_o ( eth_mdio_o ),
13281330
.phy_mdio_oe ( eth_mdio_oe ),
13291331
.phy_mdc_o ( eth_mdc_o ),

sw/tests/ethernet.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ int main(void) {
3838
*tx_addr = data_to_write[i];
3939
}
4040

41-
4241
*reg32(ETH_BASE, MACLO_OFFSET) = 0x98001032;
4342
*reg32(ETH_BASE, MACHI_OFFSET) = 0x00012070;
4443

@@ -52,21 +51,8 @@ int main(void) {
5251
*reg32(ETH_BASE, IDMA_REQ_VALID_OFFSET) = 0x1;
5352
*reg32(ETH_BASE, IDMA_REQ_VALID_OFFSET) = 0x0;
5453
*reg32(ETH_BASE, IDMA_RSP_READY_OFFSET) = 0x1;
55-
56-
// pulp_write32( ETH_BASE + IDMA_REQ_VALID_OFFSET , 0x1);
57-
58-
// pulp_write32( ETH_BASE + IDMA_REQ_VALID_OFFSET , 0x0);
59-
60-
61-
// // data
62-
// pulp_write32( ETH_BASE + IDMA_RSP_READY_OFFSET , 0x1);
6354

64-
// to-do deassert rsp_ready when rx transaction is complete
65-
66-
67-
68-
while(1);
69-
70-
//return 0;
55+
// can leave rsp_ready high
56+
return 0;
7157

7258
}

target/sim/src/fixture_cheshire_soc.sv

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ module fixture_cheshire_soc #(
4949
logic i2c_scl_i;
5050
logic i2c_scl_en;
5151

52-
logic eth_rxck_i;
53-
logic [3:0] eth_rxd_i;
54-
logic eth_rxctl_i;
55-
logic eth_txck_o;
56-
logic [3:0] eth_txd_o;
57-
logic eth_txctl_o;
58-
logic eth_rstn_o;
59-
logic eth_intn_i;
60-
logic eth_pme_i;
52+
logic eth_clk_125;
53+
logic eth_clk_90;
54+
logic eth_rxck;
55+
logic [3:0] eth_rxd;
56+
logic eth_rxctl;
57+
logic eth_txck;
58+
logic [3:0] eth_txd;
59+
logic eth_txctl;
60+
logic eth_rstn;
6161
logic eth_mdio_i;
6262
logic eth_mdio_o;
6363
logic eth_mdio_en;
64-
logic eth_mdc_o;
64+
logic eth_mdc;
6565

6666
logic spih_sck_o;
6767
logic spih_sck_en;
@@ -129,19 +129,19 @@ module fixture_cheshire_soc #(
129129
.i2c_scl_o ( i2c_scl_o ),
130130
.i2c_scl_i ( i2c_scl_i ),
131131
.i2c_scl_en_o ( i2c_scl_en ),
132-
.eth_rxck_i ( eth_rxck_i ),
133-
.eth_rxd_i ( eth_rxd_i ),
134-
.eth_rxctl_i ( eth_rxctl_i ),
135-
.eth_txck_o ( eth_txck_o ),
136-
.eth_txd_o ( eth_txd_o ),
137-
.eth_txctl_o ( eth_txctl_o ),
138-
.eth_rstn_o ( eth_rstn_o ),
139-
.eth_intn_i ( eth_intn_i ),
140-
.eth_pme_i ( eth_pme_i ),
132+
.eth_clk_125 ( eth_clk_125 ),
133+
.eth_clk_90 ( eth_clk_90 ),
134+
.eth_rxck_i ( eth_rxck ),
135+
.eth_rxd_i ( eth_rxd ),
136+
.eth_rxctl_i ( eth_rxctl ),
137+
.eth_txck_o ( eth_txck ),
138+
.eth_txd_o ( eth_txd ),
139+
.eth_txctl_o ( eth_txctl ),
140+
.eth_rstn_o ( eth_rstn ),
141141
.eth_mdio_i ( eth_mdio_i ),
142142
.eth_mdio_o ( eth_mdio_o ),
143143
.eth_mdio_oe ( eth_mdio_en ),
144-
.eth_mdc_o ( eth_mdc_o ),
144+
.eth_mdc_o ( eth_mdc ),
145145
.spih_sck_o ( spih_sck_o ),
146146
.spih_sck_en_o ( spih_sck_en ),
147147
.spih_csb_o ( spih_csb_o ),
@@ -174,15 +174,7 @@ module fixture_cheshire_soc #(
174174
wire [SpihNumCs-1:0] spih_csb;
175175
wire [ 3:0] spih_sd;
176176

177-
wire [ 3:0] eth_txd;
178-
wire [ 3:0] eth_rxd;
179-
wire eth_txck;
180-
wire eth_rxck;
181-
wire eth_txctl;
182-
wire eth_rxctl;
183-
wire eth_rstn;
184177
wire eth_mdio;
185-
wire eth_mdc;
186178

187179
vip_cheshire_soc_tristate vip_tristate (.*);
188180

0 commit comments

Comments
 (0)