Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Bender.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
overrides:
axi2mem: { git: "https://github.com/pulp-platform/axi2mem.git", version: =1.0.2 }
axi2per: { git: "https://github.com/pulp-platform/axi2per.git", version: =1.0.2 }
per2axi: { git: "https://github.com/pulp-platform/per2axi.git", version: =1.0.5 }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", version: =1.3.0 }
mchan: { git: "https://github.com/pulp-platform/mchan.git", version: =1.2.4 }
obi: { git: "https://github.com/pulp-platform/obi.git", version: =0.1.7 }
cluster_peripherals: { git: "https://github.com/pulp-platform/cluster_peripherals.git", version: =2.2.0 }
axi: { git: "https://github.com/pulp-platform/axi.git", version: =0.39.8 }
timer_unit: { git: "https://github.com/pulp-platform/timer_unit.git", version: =1.0.2 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: =0.2.13 }
scm: { git: "https://github.com/pulp-platform/scm.git", version: =1.2.0 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: =0.4.7 }
redmule: { git: "https://github.com/pulp-platform/redmule.git", version: =2.0.4 }
common_cells: { git: "https://github.com/FondazioneChipsIT/common_cells.git", rev: 286ffd49d9ed3409ceaef7c7fe98516e2611a1a9 } # gl/fix_define
hci: { git: "https://github.com/FondazioneChipsIT/hci.git", rev: 3e63936991569d0b1e315d6914478937b37bb338 }
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: astral-v1.0 }
redundancy_cells: { git: "https://github.com/pulp-platform/redundancy_cells.git", rev: 6ba6f41 } # yt/redmule-v2
fpnew: { git: "https://github.com/pulp-platform/cvfpu.git", rev: pulp-v0.1.3 }
hwpe-stream: { git: "https://github.com/pulp-platform/hwpe-stream.git", version: =1.9.0 }
hwpe-ctrl: { git: "https://github.com/pulp-platform/hwpe-ctrl.git", rev: 3690a3c }
53 changes: 27 additions & 26 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ packages:
dependencies:
- common_cells
cluster_icache:
revision: 64e21ae455bbdde850c4df13bef86ea55ac42537
version: 0.2.0
revision: 57ffb22066171d89974bdec240bad13f5efac9de
version: null
source:
Git: https://github.com/pulp-platform/cluster_icache.git
Git: https://github.com/FondazioneChipsIT/cluster_icache.git
dependencies:
- axi
- common_cells
- register_interface
- scm
- tech_cells_generic
cluster_interconnect:
Expand All @@ -62,17 +63,17 @@ packages:
dependencies:
- common_cells
cluster_peripherals:
revision: e464eb9ddcc39e5a50009819601c4f213b1d4ba3
version: 2.2.0
revision: 630159c9d81c41a9638163de292fbfc0682bf0e5
version: null
source:
Git: https://github.com/pulp-platform/cluster_peripherals.git
Git: https://github.com/FondazioneChipsIT/cluster_peripherals.git
dependencies:
- hci
common_cells:
revision: 9afda9abb565971649c2aa0985639c096f351171
version: 1.38.0
revision: 286ffd49d9ed3409ceaef7c7fe98516e2611a1a9
version: null
source:
Git: https://github.com/pulp-platform/common_cells.git
Git: https://github.com/FondazioneChipsIT/common_cells.git
dependencies:
- common_verification
- tech_cells_generic
Expand Down Expand Up @@ -105,15 +106,15 @@ packages:
dependencies:
- common_cells
flex-v:
revision: e9355c2f6ec4c105abdff39489e5d1be93bc4374
revision: f22937733fd058550ef847ddbf1381e821f0f9d2
version: null
source:
Git: https://github.com/pulp-platform/flex-v.git
Git: https://github.com/FondazioneChipsIT/flex-v.git
dependencies:
- fpnew
- tech_cells_generic
fpnew:
revision: e5aa6a01b5bbe1675c3aa8872e1203413ded83d1
revision: a8e0cba6dd50f357ece73c2c955d96efc3c6c315
version: null
source:
Git: https://github.com/pulp-platform/cvfpu.git
Expand All @@ -128,10 +129,10 @@ packages:
dependencies:
- common_cells
hci:
revision: 2a5a5081a2b32f1a04e7e28c00d3762d92602b84
revision: 3e63936991569d0b1e315d6914478937b37bb338
version: null
source:
Git: https://github.com/pulp-platform/hci.git
Git: https://github.com/FondazioneChipsIT/hci.git
dependencies:
- cluster_interconnect
- common_cells
Expand All @@ -140,10 +141,10 @@ packages:
- redundancy_cells
- register_interface
hier-icache:
revision: 7243834d2407ca23cff583d57641c84b982bd9bc
version: 1.3.0
revision: 416c5cbc7b9b8724a40da6ac6d0b19a9c6b864bc
version: null
source:
Git: https://github.com/pulp-platform/hier-icache.git
Git: https://github.com/FondazioneChipsIT/hier-icache.git
dependencies:
- axi
- axi_slice
Expand Down Expand Up @@ -179,10 +180,10 @@ packages:
Git: https://github.com/pulp-platform/icache-intc.git
dependencies: []
idma:
revision: c12caf59bb482fe44b27361f6924ad346b2d22fe
version: 0.6.3
revision: 2e637216e0455d77706a50d0639b86891e2a83aa
version: null
source:
Git: https://github.com/pulp-platform/iDMA.git
Git: https://github.com/FondazioneChipsIT/iDMA.git
dependencies:
- axi
- axi_stream
Expand Down Expand Up @@ -257,8 +258,8 @@ packages:
- register_interface
- tech_cells_generic
register_interface:
revision: 5daa85d164cf6b54ad061ea1e4c6f3624556e467
version: 0.4.5
revision: d6e1d4cdaab7870f4faf3f88a1c788eaf5ac129d
version: 0.4.7
source:
Git: https://github.com/pulp-platform/register_interface.git
dependencies:
Expand All @@ -274,10 +275,10 @@ packages:
dependencies:
- tech_cells_generic
softex:
revision: 11dd29e85d40e29fea0481b471f1c0cc967df1a4
revision: a622550d91dd55bf30bc359e10b2c70cae3042d6
version: null
source:
Git: https://github.com/belanoa/softex.git
Git: https://github.com/FondazioneChipsIT/softex.git
dependencies:
- common_cells
- fpnew
Expand All @@ -293,8 +294,8 @@ packages:
dependencies:
- common_verification
timer_unit:
revision: 4c69615c89db9397a9747d6f6d6a36727854f0bc
version: 1.0.3
revision: 3f4ee3e5b3875a473242de5d0c3ebb5a0fe4b8db
version: 1.0.2
source:
Git: https://github.com/pulp-platform/timer_unit.git
dependencies: []
Expand Down
43 changes: 22 additions & 21 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ package:
- "Michael Rogenmoser <michaero@student.ethz.ch>"

dependencies:
axi2mem: { git: "https://github.com/pulp-platform/axi2mem.git", rev: v1.0.2 }
axi2per: { git: "https://github.com/pulp-platform/axi2per.git", rev: v1.0.2 }
per2axi: { git: "https://github.com/pulp-platform/per2axi.git", rev: v1.0.5 }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: v1.3.0 }
axi2mem: { git: "https://github.com/pulp-platform/axi2mem.git", version: =1.0.2 }
axi2per: { git: "https://github.com/pulp-platform/axi2per.git", version: =1.0.2 }
per2axi: { git: "https://github.com/pulp-platform/per2axi.git", version: =1.0.5 }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", version: =1.3.0 }
event_unit_flex: { git: "https://github.com/pulp-platform/event_unit_flex.git", rev: astral-v1.0 }
mchan: { git: "https://github.com/pulp-platform/mchan.git", rev: v1.2.4 }
idma: { git: "https://github.com/pulp-platform/iDMA.git", rev: v0.6.3 }
hier-icache: { git: "https://github.com/pulp-platform/hier-icache.git", rev: v1.3.0 }
cluster_icache: { git: "https://github.com/pulp-platform/cluster_icache.git", rev: v0.2.0 }
cluster_peripherals: { git: "https://github.com/pulp-platform/cluster_peripherals.git", rev: v2.2.0 }
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.39.3 }
timer_unit: { git: "https://github.com/pulp-platform/timer_unit.git", version: 1.0.2 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.35.0 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.3 }
flex-v: { git: "https://github.com/pulp-platform/flex-v.git", rev: astral-v1.1 }
mchan: { git: "https://github.com/pulp-platform/mchan.git", version: =1.2.4 }
idma: { git: "https://github.com/FondazioneChipsIT/iDMA.git", rev: ChipsIt-v0.0.0 }
obi: { git: "https://github.com/pulp-platform/obi.git", version: =0.1.7 }
hier-icache: { git: "https://github.com/FondazioneChipsIT/hier-icache.git", rev: 416c5cbc7b9b8724a40da6ac6d0b19a9c6b864bc } # gl/fix_define
cluster_icache: { git: "https://github.com/FondazioneChipsIT/cluster_icache.git", rev: 57ffb22066171d89974bdec240bad13f5efac9de } # gl/fix_define
cluster_peripherals: { git: "https://github.com/FondazioneChipsIT/cluster_peripherals.git", rev: "630159c9d81c41a9638163de292fbfc0682bf0e5" } # chips-it
axi: { git: "https://github.com/pulp-platform/axi.git", version: =0.39.8 }
timer_unit: { git: "https://github.com/pulp-platform/timer_unit.git", version: =1.0.2 }
common_cells: { git: "https://github.com/FondazioneChipsIT/common_cells.git", rev: 286ffd49d9ed3409ceaef7c7fe98516e2611a1a9 } # gl/fix_define
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: =0.2.3 }
flex-v: { git: "https://github.com/FondazioneChipsIT/flex-v.git", rev: f22937733fd058550ef847ddbf1381e821f0f9d2 } # gl/fix_pkg_import
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: astral-v1.0 }
ibex: { git: "https://github.com/pulp-platform/ibex.git", rev: "pulpissimo-v6.1.2" }
scm: { git: "https://github.com/pulp-platform/scm.git", rev: v1.2.0 }
hci: { git: "https://github.com/pulp-platform/hci.git", rev: 2a5a508 } # yt/wen-filter
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.4.4 }
scm: { git: "https://github.com/pulp-platform/scm.git", version: =1.2.0 }
hci: { git: "https://github.com/FondazioneChipsIT/hci.git", rev: 3e63936991569d0b1e315d6914478937b37bb338 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: =0.4.7 }
redundancy_cells: { git: "https://github.com/pulp-platform/redundancy_cells.git", rev: 6ba6f41 } # yt/redmule-v2
redmule: { git: "https://github.com/pulp-platform/redmule.git", version: =2.0.4 }
neureka: { git: "https://github.com/pulp-platform/neureka.git", rev: f4e131c } # branch: lg/astral-v1.1
softex: { git: "https://github.com/belanoa/softex.git" , rev: astral-v1.0 }
softex: { git: "https://github.com/FondazioneChipsIT/softex.git", rev: a622550d91dd55bf30bc359e10b2c70cae3042d6 } # gl/fix_pkg_import

export_include_dirs:
- include
Expand All @@ -56,7 +57,7 @@ sources:
- target: mchan
files:
- rtl/mchan_wrap.sv
- target: not(mchan)
- target: idma
files:
- rtl/idma_wrap.sv
- rtl/hwpe_subsystem.sv
Expand Down Expand Up @@ -93,6 +94,6 @@ sources:

- target: pulp_standalone_synth
files:
- nonfree/gf12/sourcecode/tc_sram.sv
- nonfree/gf12/sourcecode/tc_clk.sv
- gf22/sourcecode/tc_sram.sv
- gf22/sourcecode/tc_clk.sv

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.0.0
### Added
* iDMA: integrated iDMA wrap supporting up to 3D transfers with 2 physical channels and parametric burst length

### Fixed
* Testbench: fixed timeunit to ns and change clock to 500 MHz

## [Unreleased]
### Added
- Added `CHANGELOG.md`
Expand Down
70 changes: 59 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ BENDER ?= bender
VSIM ?= $(QUESTA) vsim
VOPT ?= $(QUESTA) vopt
VLIB ?= $(QUESTA) vlib
top_level ?= pulp_cluster_tb

QSIM ?= $(QUESTA) qsim
QOPT ?= $(QUESTA) qopt
Q1VE ?= q1ve --qverify

VENV := venv

top_level ?= pulp_cluster
library ?= work
elf-bin ?= stimuli.riscv
bwruntest = $(ROOT_DIR)/pulp-runtime/scripts/bwruntests.py

REGRESSIONS := $(ROOT_DIR)/regression_tests

VLOG_ARGS += -suppress vlog-2583 -suppress vlog-13314 -suppress vlog-13233 -timescale \"1 ns / 1 ps\" \"+incdir+$(shell pwd)/include\"
VLOG_ARGS_LINT += -suppress vlog-2583 -suppress vlog-13314 -suppress vlog-13233 \"+incdir+$(shell pwd)/include\"
VLOG_ARGS += -suppress vlog-2583 -suppress vlog-13314 -suppress vlog-13233 -timescale \"1ns / 1ps\" \"+incdir+$(shell pwd)/include\"

define generate_vsim
echo 'set ROOT [file normalize [file dirname [info script]]/$3]' > $1
Expand All @@ -49,7 +57,7 @@ nonfree-init:

.PHONY: init

init: checkout
init: checkout generate_idma_rtl

.PHONY: checkout
## Checkout/update dependencies using Bender
Expand All @@ -74,8 +82,8 @@ sw-clean:
@rm -rf pulp-runtime fault_injection_sim regression_tests

## Clone pulp-runtime as SW stack
PULP_RUNTIME_REMOTE ?= https://github.com/pulp-platform/pulp-runtime.git
PULP_RUNTIME_COMMIT ?= f10670b # branch: lg/upstream
PULP_RUNTIME_REMOTE ?= https://github.com/FondazioneChipsIT/pulp-runtime.git
PULP_RUNTIME_COMMIT ?= 9bd23d2b2b6b6c74fc26a3ab3402fbebc589dace # branch: chips-it

pulp-runtime:
git clone $(PULP_RUNTIME_REMOTE) $@
Expand All @@ -90,8 +98,8 @@ fault_injection_sim:
cd $@ && git checkout $(FAULT_SIM_COMMIT)

## Clone regression tests
REGRESSION_TESTS_REMOTE ?= https://github.com/pulp-platform/regression_tests.git
REGRESSION_TESTS_COMMIT ?= 7fa307d # branch: lg/upstream
REGRESSION_TESTS_REMOTE ?= https://github.com/FondazioneChipsIT/regression_tests.git
REGRESSION_TESTS_COMMIT ?= dd41d893ee371df7407ce2c0128d2d3a45c4ec71 # branch: chips-it

regression_tests:
git clone $(REGRESSION_TESTS_REMOTE) $@
Expand All @@ -111,27 +119,67 @@ sim-clean:
include bender-common.mk
include bender-sim.mk
scripts/compile.tcl: | Bender.lock
$(call generate_vsim, $@, $(common_defs) $(common_targs) $(sim_defs) $(sim_targs),..)
$(call generate_vsim, $@, $(common_defs) $(common_targs) -t idma $(sim_defs) $(sim_targs),..)
echo 'vlog "$(realpath $(ROOT_DIR))/tb/dpi/elfloader.cpp" -ccflags "-std=c++11"' >> $@

scripts/compile.tcl-mchan: | Bender.lock
$(call generate_vsim, scripts/compile.tcl, $(common_defs) $(common_targs) -t mchan $(sim_defs) $(sim_targs),..)
echo 'vlog "$(realpath $(ROOT_DIR))/tb/dpi/elfloader.cpp" -ccflags "-std=c++11"' >> scripts/compile.tcl

include bender-synth.mk
scripts/synth-compile.tcl: | Bender.lock
$(BENDER) script synopsys $(common_targs) $(common_defs) $(synth_targs) $(synth_defs) > $@

scripts/compile_lint.tcl:
echo 'set ROOT $(ROOT_DIR)' > $@
$(BENDER) script vsim --vlog-arg="$(VLOG_ARGS_LINT)" $(common_defs) $(common_targs) | grep -v "set ROOT" >> $@
echo >> $@

$(library):
$(QUESTA) vlib $(library)

venv:
python3 -m venv $(VENV) && \
$(VENV)/bin/python -m pip install -U pip && \
$(VENV)/bin/python -m pip install -r $(shell bender path idma)/requirements.txt

generate_idma_rtl: venv
. "$(VENV)/bin/activate" && $(MAKE) -C $(shell bender path idma) idma_hw_all

compile: $(library)
@test -f Bender.lock || { echo "ERROR: Bender.lock file does not exist. Did you run make checkout in bender mode?"; exit 1; }
@test -f scripts/compile.tcl || { echo "ERROR: scripts/compile.tcl file does not exist. Did you run make scripts in bender mode?"; exit 1; }
$(VSIM) -c -do 'quit -code [source scripts/compile.tcl]'

build: compile
$(VOPT) $(compile_flag) -suppress 3053 -suppress 8885 -work $(library) $(top_level) -o $(top_level)_optimized +acc
build_qone: compile
$(QOPT) $(compile_flag) -debug +designfile -suppress 3053 -suppress 8885 -work $(library) $(top_level)_tb -o $(top_level)_tb_optimized


build: generate_idma_rtl compile
$(VOPT) $(compile_flag) -suppress 3053 -suppress 8885 -work $(library) $(top_level)_tb -o $(top_level)_tb_optimized +acc

compile_lint: $(library)
@test -f Bender.lock || { echo "ERROR: Bender.lock file does not exist. Did you run make checkout in bender mode?"; exit 1; }
@test -f scripts/compile_lint.tcl || { echo "ERROR: scripts/compile_lint.tcl file does not exist. Did you run make scripts in bender mode?"; exit 1; }
$(Q1VE) -od lint/comp_lint_results -c -do " \
onerror {exit}; \
do scripts/compile_lint.tcl; \
exit"

lint: compile_lint
$(Q1VE) -od lint/lint_results -c -do " \
lint methodology ip -goal release; \
lint run -d $(top_level); \
exit"

cdc: compile_lint
$(Q1VE) -od cdc_results -c -do " \
cdc run -d $(top_level); \
exit"

run:
$(VSIM) +permissive -suppress 3053 -suppress 8885 -lib $(library) +MAX_CYCLES=$(max_cycles) +UVM_TESTNAME=$(test_case) +APP=$(elf-bin) +notimingchecks +nospecify -t 1ps \
${top_level}_optimized +permissive-off ++$(elf-bin) ++$(target-options) ++$(cl-bin) | tee sim.log
${top_level}_tb_optimized +permissive-off ++$(elf-bin) ++$(target-options) ++$(cl-bin) | tee sim.log

####################
# Regression tests #
Expand Down
Loading
Loading