Skip to content

Commit 52be158

Browse files
Merge branch 'openhwgroup:master' into agilex_hps
2 parents 8ef71c5 + a667f48 commit 52be158

153 files changed

Lines changed: 9873 additions & 623 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/verible.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
- uses: chipsalliance/verible-formatter-action@main
2121
with:
2222
github_token: ${{ secrets.GITHUB_TOKEN }}
23-
files: '$(find core -regex ".*\.\(v\|sv\)$" | grep -v "^core/include/.*_config_pkg.sv$")'
23+
files: '$(find core -regex ".*\.\(v\|sv\)$" | grep -v "^core/include/.*_config_pkg\.sv$")'
2424
fail_on_formatting_suggestions: true

.gitlab-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,20 @@ hello-pk:
238238
- when: manual
239239
allow_failure: true
240240

241-
iti-test:
241+
it-test:
242242
extends:
243243
- .synthesis_test
244244
variables:
245-
DASHBOARD_JOB_TITLE: "ITI test"
246-
DASHBOARD_JOB_DESCRIPTION: "Short test to challenge the Instruction Trace Interface"
245+
DASHBOARD_JOB_TITLE: "Instruction Trace test"
246+
DASHBOARD_JOB_DESCRIPTION: "Test to Challenge the Hardware flow of the Instruction Tracer"
247247
DASHBOARD_SORT_INDEX: 0
248248
DASHBOARD_JOB_CATEGORY: "Basic"
249249
DV_SIMULATORS: "vcs-testharness"
250250
script:
251-
- bash verif/regress/iti_test.sh
252-
- diff .gitlab-ci/iti_reference.trace .gitlab-ci/iti.trace
251+
- python3 .gitlab-ci/scripts/report_fail.py
252+
- bash verif/regress/Instr_tracing_test.sh ../tests/custom/ITI/test_iti_asm.o
253253
- python3 .gitlab-ci/scripts/report_pass.py
254+
- cp -r verif/sim/Instr_tracing_artifact artifacts/
254255

255256
spyglass:
256257
extends:

.gitlab-ci/expected_synth.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
cv32a65x:
2-
gates: 185067
2+
gates: 185067

.gitlab-ci/iti_reference.trace

Lines changed: 0 additions & 159 deletions
This file was deleted.

Bender.yml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ dependencies:
1010
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.31.0 }
1111
common_cells:
1212
{ git: "https://github.com/pulp-platform/common_cells", version: 1.23.0 }
13-
fpnew: { git: "https://github.com/openhwgroup/cvfpu.git", rev: 2c79477 } # branch: develop
13+
fpnew: { git: "https://github.com/openhwgroup/cvfpu.git", rev: 58ca3c3 } # branch: develop
1414
tech_cells_generic:
1515
{ git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.13 }
1616

1717
export_include_dirs:
1818
- core/include
19+
- core/cache_subsystem/hpdcache/rtl/include
1920

2021
sources:
2122
- include_dirs:
@@ -35,6 +36,14 @@ sources:
3536
files:
3637
- core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv
3738

39+
- target: cv64a6_imafdc_sv39_hpdcache
40+
files:
41+
- core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv
42+
43+
- target: cv64a6_imafdc_sv39_hpdcache_wb
44+
files:
45+
- core/include/cv64a6_imafdc_sv39_hpdcache_wb_config_pkg.sv
46+
3847
- target: cv64a6_imafdch_sv39
3948
files:
4049
- core/include/cv64a6_imafdch_sv39_config_pkg.sv
@@ -55,6 +64,14 @@ sources:
5564
files:
5665
- core/include/cv32a6_imafc_sv32_config_pkg.sv
5766

67+
- target: cv32a60x
68+
files:
69+
- core/include/cv32a60x_config_pkg.sv
70+
71+
- target: cv32a65x
72+
files:
73+
- core/include/cv32a65x_config_pkg.sv
74+
5875
# General config infrastructure
5976
- core/include/riscv_pkg.sv
6077
- core/include/ariane_pkg.sv
@@ -65,7 +82,7 @@ sources:
6582
- core/cva6_accel_first_pass_decoder_stub.sv
6683

6784
# MMU
68-
- target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdch_sv39_wb, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32)
85+
- target: any(cv64a6_imafdcv_sv39, cv64a6_imafdc_sv39, cv64a6_imafdc_sv39_wb, cv64a6_imafdch_sv39, cv64a6_imafdc_sv39_hpdcache, cv64a6_imafdc_sv39_hpdcache_wb, cv64a6_imafdch_sv39_wb, cv32a6_imac_sv0, cv32a6_imac_sv32, cv32a6_imafc_sv32)
6986
files:
7087
- core/cva6_mmu/cva6_tlb.sv
7188
- core/cva6_mmu/cva6_shared_tlb.sv
@@ -75,6 +92,7 @@ sources:
7592
# Packages
7693
- core/include/wt_cache_pkg.sv
7794
- core/include/std_cache_pkg.sv
95+
- core/include/aes_pkg.sv
7896

7997
# Extension Interface
8098
- core/cvxif_example/include/cvxif_instr_pkg.sv
@@ -89,6 +107,7 @@ sources:
89107
- core/cva6_fifo_v3.sv
90108
# Top-level source files (not necessarily instantiated at the top of the cva6).
91109
- core/cva6.sv
110+
- core/aes.sv
92111
- core/alu.sv
93112
- core/alu_wrapper.sv
94113
- core/fpu_wrap.sv # depends on fpnew_pkg, above
@@ -145,6 +164,61 @@ sources:
145164
- core/cache_subsystem/cache_ctrl.sv
146165
- core/cache_subsystem/std_nbdcache.sv
147166
- core/cache_subsystem/std_cache_subsystem.sv
167+
# HPDCache sources
168+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_pkg.sv
169+
- core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_resp_demux.sv
170+
- core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_read.sv
171+
- core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_to_axi_write.sv
172+
- core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_read_arbiter.sv
173+
- core/cache_subsystem/hpdcache/rtl/src/utils/hpdcache_mem_req_write_arbiter.sv
174+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_demux.sv
175+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_lfsr.sv
176+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sync_buffer.sv
177+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fifo_reg.sv
178+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fifo_reg_initialized.sv
179+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_fxarb.sv
180+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_rrarb.sv
181+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_mux.sv
182+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_decoder.sv
183+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_1hot_to_binary.sv
184+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_prio_1hot_encoder.sv
185+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram.sv
186+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wbyteenable.sv
187+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_sram_wmask.sv
188+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_regbank_wbyteenable_1rw.sv
189+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_regbank_wmask_1rw.sv
190+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_downsize.sv
191+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_upsize.sv
192+
- core/cache_subsystem/hpdcache/rtl/src/common/hpdcache_data_resize.sv
193+
- core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_pkg.sv
194+
- core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride.sv
195+
- core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_arb.sv
196+
- core/cache_subsystem/hpdcache/rtl/src/hwpf_stride/hwpf_stride_wrapper.sv
197+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache.sv
198+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_amo.sv
199+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_cmo.sv
200+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_core_arbiter.sv
201+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_ctrl.sv
202+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_ctrl_pe.sv
203+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_memctrl.sv
204+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_miss_handler.sv
205+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_mshr.sv
206+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_rtab.sv
207+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_uncached.sv
208+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_plru.sv
209+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_random.sv
210+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_victim_sel.sv
211+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_wbuf.sv
212+
- core/cache_subsystem/hpdcache/rtl/src/hpdcache_flush.sv
213+
# HPDCache integration
214+
- core/cache_subsystem/cva6_hpdcache_if_adapter.sv
215+
- core/cache_subsystem/cva6_hpdcache_subsystem_axi_arbiter.sv
216+
- core/cache_subsystem/cva6_hpdcache_subsystem.sv
217+
- core/cache_subsystem/cva6_hpdcache_wrapper.sv
218+
# HPDCache SRAM models
219+
- core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_1rw.sv
220+
- core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wbyteenable_1rw.sv
221+
- core/cache_subsystem/hpdcache/rtl/src/common/macros/behav/hpdcache_sram_wmask_1rw.sv
148222

149223
# Physical Memory Protection
150224
- core/pmp/src/pmp.sv
@@ -162,6 +236,7 @@ sources:
162236
files:
163237
- common/local/util/tc_sram_wrapper.sv
164238
- common/local/util/sram_cache.sv
239+
- common/local/util/tc_sram_wrapper_cache_techno.sv
165240

166241
- target: all(fpga, xilinx)
167242
include_dirs:

Makefile

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,34 @@ src := $(if $(spike-tandem),verif/tb/core/uvma_core_cntrl_pkg.sv)
201201
vendor/pulp-platform/tech_cells_generic/src/deprecated/cluster_clk_cells.sv \
202202
vendor/pulp-platform/tech_cells_generic/src/deprecated/pulp_clk_cells.sv \
203203
vendor/pulp-platform/tech_cells_generic/src/rtl/tc_clk.sv \
204-
core/include/iti_pkg.sv \
204+
corev_apu/instr_tracing/ITI/include/iti_pkg.sv \
205+
corev_apu/instr_tracing/rv_tracer-main/include/te_pkg.sv \
206+
corev_apu/instr_tracing/rv_encapsulator-main/src/include/encap_pkg.sv \
205207
corev_apu/tb/ariane_testharness.sv \
206208
corev_apu/tb/ariane_peripherals.sv \
207209
corev_apu/tb/rvfi_tracer.sv \
208210
corev_apu/tb/common/uart.sv \
209211
corev_apu/tb/common/SimDTM.sv \
210212
corev_apu/tb/common/SimJTAG.sv \
211-
core/cva6_iti/instr_to_trace.sv \
212-
core/cva6_iti/iti.sv \
213-
core/cva6_iti/itype_detector.sv
214-
213+
corev_apu/instr_tracing/ITI/cva6_iti/iti.sv \
214+
corev_apu/instr_tracing/ITI/cva6_iti/block_retirement.sv \
215+
corev_apu/instr_tracing/ITI/cva6_iti/single_retirement.sv \
216+
corev_apu/instr_tracing/ITI/cva6_iti/itype_detector.sv \
217+
vendor/pulp-platform/common_cells/src/counter.sv \
218+
vendor/pulp-platform/common_cells/src/sync.sv \
219+
vendor/pulp-platform/common_cells/src/sync_wedge.sv \
220+
vendor/pulp-platform/common_cells/src/edge_detect.sv \
221+
corev_apu/instr_tracing/rv_tracer-main/rtl/lzc.sv \
222+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_branch_map.sv \
223+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_filter.sv \
224+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_packet_emitter.sv \
225+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_priority.sv \
226+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_reg.sv \
227+
corev_apu/instr_tracing/rv_tracer-main/rtl/te_resync_counter.sv \
228+
corev_apu/instr_tracing/rv_tracer-main/rtl/rv_tracer.sv \
229+
vendor/pulp-platform/common_cells/src/fifo_v3.sv \
230+
corev_apu/instr_tracing/DPTI/slicer_DPTI.sv \
231+
corev_apu/instr_tracing/rv_encapsulator-main/src/rtl/encapsulator.sv
215232
src := $(addprefix $(root-dir), $(src))
216233

217234
copro_src := core/cvxif_example/include/cvxif_instr_pkg.sv \
@@ -221,6 +238,9 @@ copro_src := $(addprefix $(root-dir), $(copro_src))
221238
uart_src := $(wildcard corev_apu/fpga/src/apb_uart/src/vhdl_orig/*.vhd)
222239
uart_src := $(addprefix $(root-dir), $(uart_src))
223240

241+
dpti_src := $(wildcard corev_apu/instr_tracing/DPTI/*.vhd)
242+
dpti_src := $(addprefix $(root-dir), $(dpti_src))
243+
224244
uart_src_sv:= corev_apu/fpga/src/apb_uart/src/slib_clock_div.sv \
225245
corev_apu/fpga/src/apb_uart/src/slib_counter.sv \
226246
corev_apu/fpga/src/apb_uart/src/slib_edge_detect.sv \
@@ -316,6 +336,7 @@ incdir := $(CVA6_REPO_DIR)/vendor/pulp-platform/common_cells/include/ $(CVA6_REP
316336
$(CVA6_REPO_DIR)/verif/core-v-verif/lib/uvm_agents/uvma_core_cntrl/ \
317337
$(CVA6_REPO_DIR)/verif/tb/core/ \
318338
$(CVA6_REPO_DIR)/core/include/ \
339+
$(CVA6_REPO_DIR)/corev_apu/instr_tracing/ITI/include \
319340
$(SPIKE_INSTALL_DIR)/include/disasm/
320341

321342
# Compile and sim flags
@@ -788,9 +809,10 @@ fpga_filter += $(addprefix $(root-dir), core/cache_subsystem/hpdcache/rtl/src/co
788809
$(addprefix $(root-dir), corev_apu/fpga/src/bootrom/bootrom_$(XLEN).sv):
789810
$(MAKE) -C corev_apu/fpga/src/bootrom BOARD=$(BOARD) XLEN=$(XLEN) PLATFORM=$(PLATFORM) bootrom_$(XLEN).sv
790811

791-
fpga: $(ariane_pkg) $(src) $(fpga_src) $(uart_src) $(src_flist)
812+
fpga: $(ariane_pkg) $(src) $(fpga_src) $(uart_src) $(dpti_src) $(src_flist)
792813
@echo "[FPGA] Generate sources"
793814
@echo read_vhdl {$(uart_src)} > corev_apu/fpga/scripts/add_sources.tcl
815+
@echo read_vhdl {$(dpti_src)} >> corev_apu/fpga/scripts/add_sources.tcl
794816
@echo read_verilog -sv {$(ariane_pkg)} >> corev_apu/fpga/scripts/add_sources.tcl
795817
@echo read_verilog -sv {$(filter-out $(fpga_filter), $(src_flist))} >> corev_apu/fpga/scripts/add_sources.tcl
796818
@echo read_verilog -sv {$(filter-out $(fpga_filter), $(src))} >> corev_apu/fpga/scripts/add_sources.tcl

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bash verif/regress/smoke-tests.sh
6767
* **[Running Simulations](tutorials/running_sim.md)**
6868
* **[ASIC Implementation](tutorials/asic.md)**
6969
* **[FPGA Implementation and running an OS](tutorials/fpga.md)**
70-
70+
* **[Instruction Tracing](corev_apu/instr_tracing/README.md)**
7171

7272
# Directory Structure
7373

0 commit comments

Comments
 (0)