Skip to content

Commit cd7ac1f

Browse files
committed
Merge master and resolve conflicts
2 parents 1e41ac3 + 120e5cb commit cd7ac1f

20 files changed

Lines changed: 87 additions & 63 deletions

.gitlab/ci/dsp.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ cic_simple_s_test:
5252
extends: .build-matrix
5353
image: $IMAGE
5454
before_script:
55-
- pip install cocotb
5655
- cd dsp
5756
stage: test
5857
script:

.gitlab/ci/serial_io.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ serial_io_test:
22
extends: .build-matrix
33
image: $IMAGE
44
before_script:
5-
- pip install numpy scipy cocotb==1.9.2 pytest cocotb-bus
65
- cd serial_io
76
stage: test
87
script:

Dockerfile.bedrock_testing_base_bookworm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ RUN apt-get update && \
3232
libftdi1-dev \
3333
libusb-dev \
3434
openocd \
35+
meson \
3536
pkg-config && \
3637
rm -rf /var/lib/apt/lists/* && \
3738
python3 -c "import numpy; print('LRD Test %f' % numpy.pi)" && \
@@ -121,9 +122,7 @@ RUN apt-get update && \
121122
ninja-build \
122123
gcc-aarch64-linux-gnu \
123124
ghdl && \
124-
rm -rf /var/lib/apt/lists/* && \
125-
pip3 install \
126-
meson
125+
rm -rf /var/lib/apt/lists/*
127126

128127
COPY build-tools/litex_meta.sh /
129128

@@ -137,6 +136,11 @@ RUN mkdir ${LITEX_INSTALL_PATH} && \
137136
RUN pip3 install \
138137
leep==1.0.2
139138

139+
# Install cocotb and related packages
140+
RUN pip3 install \
141+
cocotb==2.0.1 \
142+
cocotb-bus==0.3.0
143+
140144
# Install sv2v
141145
RUN apt-get update && \
142146
apt-get install -y \

Dockerfile.bedrock_testing_base_trixie

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ RUN apt-get update && \
3232
libftdi1-dev \
3333
libusb-dev \
3434
openocd \
35+
meson \
3536
pkg-config && \
3637
rm -rf /var/lib/apt/lists/* && \
3738
python3 -c "import numpy; print('LRD Test %f' % numpy.pi)" && \
@@ -121,9 +122,7 @@ RUN apt-get update && \
121122
ninja-build \
122123
gcc-aarch64-linux-gnu \
123124
ghdl && \
124-
rm -rf /var/lib/apt/lists/* && \
125-
pip3 install \
126-
meson
125+
rm -rf /var/lib/apt/lists/*
127126

128127
COPY build-tools/litex_meta.sh /
129128

@@ -137,6 +136,11 @@ RUN mkdir ${LITEX_INSTALL_PATH} && \
137136
RUN pip3 install \
138137
leep==1.0.2
139138

139+
# Install cocotb and related packages
140+
RUN pip3 install \
141+
cocotb==2.0.1 \
142+
cocotb-bus==0.3.0
143+
140144
# Install sv2v
141145
RUN apt-get update && \
142146
apt-get install -y \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Recommended:
9393
* Verilator
9494
* YoSys
9595

96-
Full list: see [dependencies.txt](dependencies.txt) and [Dockerfile](Dockerfile).
96+
Full list: see [dependencies.txt](dependencies.txt) and [Dockerfile](Dockerfile.bedrock_testing_base_trixie).
9797

9898
On contributing
9999
===============

board_support/zest/llspi_ad9653.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def spi_readn(self, obj_list, addr):
9292
if leep_addr is None:
9393
leep_addr = "leep://" + str(ip_addr)
9494

95-
leep = leep.open(leep_addr, timeout=2.0, instance=[])
95+
leep = leep.open(leep_addr, timeout=5.0, instance=[])
9696
leepll = leep_llspi(leep) # temporary(?) stand-in for c_zest
9797
U2_adc_spi = c_llspi_ad9653(2)
9898

board_support/zest/zest_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ def amc7823_print(self, check_channels=[]):
10421042
help='Run MMCM scan')
10431043
parser.add_argument('--strict', action='store_true', dest='strict', default=False,
10441044
help='Strict checks on test results')
1045-
parser.add_argument('-t', '--timeout', type=float, default=0.1,
1045+
parser.add_argument('-t', '--timeout', type=float, default=5.0,
10461046
help='LEEP network timeout')
10471047
parser.add_argument('-f', '--ref_freq', dest='ref_freq', default=50., type=float,
10481048
help='Reference oscillator (in MHz)')

dependencies.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ python3-scipy
1717
python3-matplotlib
1818

1919
=====
20-
Summary, well tested on Debian Buster and Bullseye:
20+
Summary, well tested on Debian Bookworm and Trixie:
2121

2222
apt-get install -y build-essential git iverilog gtkwave verilator python3-pip
2323
apt-get install -y python3-numpy python3-flake8 python3-scipy python3-matplotlib
24-
pip3 install cocotb
24+
pip3 install cocotb cocotb-bus
2525

2626
=====
2727
The setup instructions for bedrock on Fedora should be:
2828

2929
yum install iverilog gtkwave make g++ python3-numpy python3-scipy python3-pip
30-
pip3 install cocotb
30+
pip3 install cocotb cocotb-bus
3131

3232
but then we hit a iverilog-vpi configuration bug seemingly caused by RedHat.
3333
The evasive action I suggest is to build iverilog from source:

projects/common/get_raw_adcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def usage():
270270
help='Number of acquisitions')
271271
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
272272
help='Verbose mode')
273-
parser.add_argument('-t', '--timeout', type=float, default=0.1,
273+
parser.add_argument('-t', '--timeout', type=float, default=5.0,
274274
help='LEEP network timeout')
275275

276276
args = parser.parse_args()

projects/test_marble_family/Makefile

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,18 @@ UNISIMS_DIR = broken
77
APP_NAME = marble
88
GTX_TCL :=
99
# Select between marblemini, marble, and marble_fiber
10+
# XXX needs support for marble_fiber
1011
CONFIG ?= marblemini
1112
ifeq ($(CONFIG),marblemini)
12-
CARRIER := marble1
1313
BOARD_DIR := marblemini
1414
BOARD_TOP_CSV := marble_mini_top.csv
15-
XDC_FILTER :=
1615
IP_ADDR := 192.168.19.31
17-
HWLOAD_CMD = openocd -f serial.cfg -f marble.cfg -c "transport select jtag; init; xc7_program xc7.tap; pld load 0 $(CONFIG).bit; exit"
18-
HWTEST_EXTRA = $(PYTHON) testcase.py -a $(IP_ADDR) --trx --marble 0
1916
else ifneq (,$(filter marble marble_fiber,$(CONFIG)))
20-
CARRIER := marble2
2117
BOARD_DIR := marble
2218
BOARD_TOP_CSV := marble_top.csv
23-
XDC_FILTER := | sed -e '/FMC._.[AK]_/s/IOSTANDARD LVCMOS25/IOSTANDARD LVCMOS25 PULLTYPE PULLUP/'
2419
SERIAL ?= ""
2520
IP_ADDR := 192.168.19.$(SERIAL)
2621
ZEST_SN ?= "LBNL DIGITIZER V1.0 SN 024"
27-
HWLOAD_CMD = openocd -c "adapter driver ftdi; ftdi_serial 0000$(SERIAL);" -f marble.cfg -c "transport select jtag; init; xc7_program xc7.tap; pld load 0 $(CONFIG).bit; exit"
28-
HWTEST_EXTRA = $(PYTHON) testcase.py -a $(IP_ADDR) --trx --si570 && sn="$$($(PYTHON) zest_sn.py -a $(IP_ADDR) -p 803)" && echo "$$sn" && test "$$sn" = $(ZEST_SN)
2922
ifeq ($(CONFIG),marble_fiber)
3023
# XXX missing QSFP tcl
3124
GTX_TCL :=
@@ -91,7 +84,7 @@ scalar_marble_regmap.json: lb_marble_slave.v
9184
marble_regmap.json: static_regmap.json scalar_marble_regmap.json
9285
$(PYTHON) $(BUILD_DIR)/merge_json.py -o $@ -i $(filter %.json, $^)
9386
config_romx.v: marble_regmap.json $(filter-out config_romx.v, $(MARBLE_SYNTH_SOURCE))
94-
$(PYTHON) -m leep.build_rom --placeholder_rev -v $@ -j $< -d "Marble Testing"
87+
$(PYTHON) -m leep.build_rom --placeholder_rev -v $@ -j $< -d "$(CONFIG) testing"
9588

9689
# gen_features.py rules utilizing $(CONFIG)
9790
$(APP_NAME)_features: $(BUILD_DIR)/gen_features.py marble_features.yaml
@@ -160,8 +153,12 @@ marble_base_yosys.json: marble_base_shell.v $(MARBLE_BASE_V0)
160153
pin_map_fmc.csv: pin_map_fmc.py
161154
$(PYTHON) $< > $@
162155

163-
$(APP_NAME)_$(CARRIER).xdc: $(BADGER_DIR)/tests/meta-xdc.py $(patsubst %,$(BOARD_SUPPORT_DIR)/$(BOARD_DIR)/%, Marble.xdc pin_map.csv) pin_map_fmc.csv $(BOARD_TOP_CSV)
164-
$(PYTHON) $^ $(XDC_FILTER) > $@
156+
$(CONFIG).xdc: $(BADGER_DIR)/tests/meta-xdc.py $(patsubst %,$(BOARD_SUPPORT_DIR)/$(BOARD_DIR)/%, Marble.xdc pin_map.csv) pin_map_fmc.csv $(BOARD_TOP_CSV)
157+
ifeq ($(CONFIG),marblemini)
158+
$(PYTHON) $^ > $@
159+
else
160+
$(PYTHON) $^ | sed -e '/FMC._.[AK]_/s/IOSTANDARD LVCMOS25/IOSTANDARD LVCMOS25 PULLTYPE PULLUP/' > $@
161+
endif
165162

166163
# =====
167164
# Initialization file for i2cbridge
@@ -185,11 +182,11 @@ Vmarble_base: $(MARBLE_BASE_V) fake_xadc.v marble_base_sim.cpp ethernet_model.c
185182
# bitfile
186183
MARBLE_SYNTH_SOURCE = marble_top.v tmds_test.v marble/gmii_clock_handle.v $(FPGA_FAMILY_DIR)/xilinx/xilinx7_clocks.v gmii_to_rgmii.v $(MARBLE_BASE_V) read_trx.dat ../../fpga_family/ds_clk_buf.v
187184

188-
$(APP_NAME)_$(CARRIER).d: $(MARBLE_SYNTH_SOURCE) $(APP_NAME)_$(CARRIER).xdc
185+
$(CONFIG).d: $(MARBLE_SYNTH_SOURCE) $(CONFIG).xdc
189186
echo $^ | tr ' ' '\n' > $@
190187

191-
# Target is now $(CONFIG).bit (e.g. marblemini.bit or marble_fiber.bit)
192-
$(CONFIG).bit: marble.tcl $(APP_NAME)_$(CARRIER).d $(APP_NAME)_features bit_stamp_mod
188+
# Target is now $(CONFIG).bit (e.g. marblemini.bit or marble.bit)
189+
$(CONFIG).bit: marble.tcl $(CONFIG).d $(APP_NAME)_features bit_stamp_mod
193190
$(SYNTH_VIVADO) $< -tclargs $(filter %.d, $^) $(CONFIG) $(APP_NAME) $(BUILD_DIR)/vivado_tcl/swap_gitid.tcl $(GTX_TCL)
194191

195192
.PHONY: bit
@@ -200,14 +197,23 @@ bit: $(CONFIG).bit
200197

201198
.PHONY: hwload hwtest
202199
hwload:
203-
@echo "Loading $(APP_NAME).bit onto $(CONFIG)..."
204-
$(HWLOAD_CMD)
200+
@echo "Loading $(CONFIG).bit onto $(CONFIG)..."
201+
ifeq ($(CONFIG),marblemini)
202+
openocd -f serial.cfg -f marble.cfg -c "transport select jtag; init; xc7_program xc7.tap; pld load 0 $(CONFIG).bit; exit"
203+
else
204+
openocd -c "adapter driver ftdi; ftdi_serial 0000$(SERIAL);" -f marble.cfg -c "transport select jtag; init; xc7_program xc7.tap; pld load 0 $(CONFIG).bit; exit"
205+
endif
205206

206207
hwtest: udprtx
207208
ping -c 2 $(IP_ADDR)
208209
test $$(PYTHONPATH=../common $(PYTHON) -m leep.cli leep://$(IP_ADDR):803 gitid) = $$(git rev-parse HEAD) && echo "gitid OK"
209210
./udprtx $(IP_ADDR) 100000 8 # should take under 3 seconds
210-
$(HWTEST_EXTRA)
211+
ifeq ($(CONFIG),marblemini)
212+
$(PYTHON) testcase.py -a $(IP_ADDR) --trx --marble 0
213+
else
214+
$(PYTHON) testcase.py -a $(IP_ADDR) --trx --si570
215+
sn="$$($(PYTHON) zest_sn.py -a $(IP_ADDR) -p 803)" && echo "$$sn" && test "$$sn" = $(ZEST_SN)
216+
endif
211217

212218
dna_tb: dna_tb.v dna.v
213219

0 commit comments

Comments
 (0)