Skip to content

Commit 32f0b8d

Browse files
committed
Merge branch 'RT_reorganization' into 'develop'
Rt reorganization See merge request racetrack-logic/risc-v-lim-architecture!11
2 parents a8be7f1 + b31cdb7 commit 32f0b8d

18 files changed

+67
-28
lines changed

RI5CY-sameIF/tb/core/Makefile

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,26 @@ VERI_CFLAGS = -O2
6060

6161
# RTL source files
6262
RTLSRC_HOME := ../..
63-
RTLSRC_TB_PKG :=
64-
RTLSRC_TB_TOP := tb_top.sv
65-
RTLSRC_TB := $(filter-out riscv_tb_pkg.sv tb_top_verilator.sv,\
66-
$(wildcard *.sv))
63+
RTLSRC_TB_PKG :=
64+
RTLSRC_TB_TOP := tb_top.sv
65+
RTLSRC_TB := $(filter-out riscv_tb_pkg.sv tb_top_verilator.sv,\
66+
$(wildcard *.sv))
67+
RTLSRC_TB_RT := $(wildcard ./RT_rtl/*.sv)
6768
RTLSRC_VERI_TB := $(filter-out tb_top.sv, $(wildcard *.sv))
6869
RTLSRC_INCDIR := $(RTLSRC_HOME)/rtl/include
69-
RTLSRC_PKG := $(RTLSRC_HOME)/rtl/fpnew/src/fpnew_pkg.sv \
70-
$(addprefix $(RTLSRC_HOME)/rtl/include/,\
71-
apu_core_package.sv riscv_defines.sv \
72-
riscv_tracer_defines.sv ../../tb/tb_riscv/include/perturbation_defines.sv)
73-
RTLSRC := $(filter-out $(RTLSRC_HOME)/rtl/riscv_register_file_latch.sv,\
74-
$(wildcard $(RTLSRC_HOME)/rtl/*.sv) $(RTLSRC_HOME)/tb/tb_riscv/riscv_random_stall.sv $(RTLSRC_HOME)/tb/tb_riscv/riscv_random_interrupt_generator.sv)
75-
RTLSRC_FPNEW_INCDIR := $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/include
76-
RTLSRC_FPNEWPKG := $(RTLSRC_HOME)/rtl/fpnew/src/fpu_div_sqrt_mvp/hdl/defs_div_sqrt_mvp.sv
77-
RTLSRC_FPNEW := $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/*.sv) $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/fpu_div_sqrt_mvp/hdl/*.sv) \
78-
$(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/src/*.sv) $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/src/deprecated/*.sv)
70+
RTLSRC_PKG := $(RTLSRC_HOME)/rtl/fpnew/src/fpnew_pkg.sv \
71+
$(addprefix $(RTLSRC_HOME)/rtl/include/,\
72+
apu_core_package.sv riscv_defines.sv \
73+
riscv_tracer_defines.sv ../../tb/tb_riscv/include/perturbation_defines.sv)
74+
RTLSRC := $(filter-out $(RTLSRC_HOME)/rtl/riscv_register_file_latch.sv,\
75+
$(wildcard $(RTLSRC_HOME)/rtl/*.sv) $(RTLSRC_HOME)/tb/tb_riscv/riscv_random_stall.sv $(RTLSRC_HOME)/tb/tb_riscv/riscv_random_interrupt_generator.sv)
76+
RTLSRC_FPNEW_INCDIR := $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/include
77+
RTLSRC_FPNEWPKG := $(RTLSRC_HOME)/rtl/fpnew/src/fpu_div_sqrt_mvp/hdl/defs_div_sqrt_mvp.sv
78+
RTLSRC_FPNEW := $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/*.sv) $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/fpu_div_sqrt_mvp/hdl/*.sv) \
79+
$(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/src/*.sv) $(wildcard $(RTLSRC_HOME)/rtl/fpnew/src/common_cells/src/deprecated/*.sv)
7980
# TODO: clean this up
80-
RTLSRC_VLOG_TB_TOP := $(basename $(notdir $(RTLSRC_TB_TOP)))
81-
RTLSRC_VOPT_TB_TOP := $(RTLSRC_VLOG_TB_TOP)#$(addsuffix _vopt, $(RTLSRC_VLOG_TB_TOP))
81+
RTLSRC_VLOG_TB_TOP := $(basename $(notdir $(RTLSRC_TB_TOP)))
82+
RTLSRC_VOPT_TB_TOP := $(RTLSRC_VLOG_TB_TOP)#$(addsuffix _vopt, $(RTLSRC_VLOG_TB_TOP))
8283

8384
# riscv toolchain install path
8485
RISCV_LIB ?= <tool_chain_install_path>
@@ -136,9 +137,9 @@ vlib: .lib-rtl
136137
touch .lib-rtl
137138

138139
# rebuild if we change some sourcefile
139-
.build-rtl: .lib-rtl $(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB)
140+
.build-rtl: .lib-rtl $(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)
140141
$(VLOG) +define+$(MEM_TYPE) -work $(VWORK) +incdir+$(RTLSRC_INCDIR) $(VLOG_FLAGS) \
141-
$(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB)
142+
$(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)
142143
touch .build-rtl
143144

144145
vsim-all: .build-rtl
@@ -149,9 +150,9 @@ vsim-all: .build-rtl
149150
touch .opt-rtl
150151

151152
# rebuild if we change some sourcefile
152-
.build-rtl-fp: .lib-rtl $(RTLSRC_PKG) $(RTLSRC_FPNEWPKG) $(RTLSRC_FPNEW) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB)
153+
.build-rtl-fp: .lib-rtl $(RTLSRC_PKG) $(RTLSRC_FPNEWPKG) $(RTLSRC_FPNEW) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)
153154
$(VLOG) -work $(VWORK) +incdir+$(RTLSRC_INCDIR) +incdir+$(RTLSRC_FPNEW_INCDIR) $(VLOG_FLAGS) \
154-
$(RTLSRC_PKG) $(RTLSRC_FPNEWPKG) $(RTLSRC_FPNEW) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB)
155+
$(RTLSRC_PKG) $(RTLSRC_FPNEWPKG) $(RTLSRC_FPNEW) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)
155156
touch .build-rtl-fp
156157

157158
vsim-all-fp: .opt-rtl-fp
@@ -170,11 +171,11 @@ dpiheader: .build-tb
170171
# ===================================================================
171172
#ORIGIANL TIMESCALE -timescale=1ns/1ps
172173

173-
vcsify: $(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB)
174+
vcsify: $(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)
174175
$(VCS) +vc -sverilog -race=all -ignore unique_checks -full64 \
175176
-timescale=1ns/1ns -j20\
176177
-CC "-I$(VCS_HOME)/include -O3 -march=native" $(VCS_FLAGS) \
177-
$(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) \
178+
$(RTLSRC_PKG) $(RTLSRC) $(RTLSRC_TB_PKG) $(RTLSRC_TB) $(RTLSRC_TB_RT)\
178179
+incdir+$(RTLSRC_INCDIR) +define+$(MEM_TYPE)
179180

180181
#STANDARD PROGRAMS (MEM_TYPE=STD_MEM)
File renamed without changes.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Racetrack memory RTL model
2+
==========================
3+
This folder contains all the RTL files of the Racetrack memory.
4+
5+
Memory organization
6+
--------------------------
7+
In the following a brief insight of the hierarchical architecture of the memory will be given.
8+
The Racetrack memory array is made up by multiple basic elements called Blocks, the required number of Blocks is istantiated automatically based on the memory size. The file `RT_memory` intantiates the required number of Blocks based on the memory parameters.
9+
Each block is internally divided in multiple Macro Units, 32x32 bits arrays composed by several Racetracks. The file `RT_block` instantiates the required number of Macro Units based on the memory parameters, then hierarchically the file `RT_32_8_4_MU` instantiates all the required Racetracks.
10+
The Racetrack has a 3D structure composed by four different Racetracks:
11+
* Logic Racetrack : computes and stores LiM results
12+
* Data Racetrack : stores standard Data
13+
* Mask Racetrack : stores Mask values
14+
* Program Racetrack : stores program bit
15+
16+
The file `RT_32_8_4_line` instantiates all the basic Racetrack cells (`pNML_NAND_NOR`, `pNML_NAND_NOR_SOT`, `RT_cell`, `RT_read_write_SOT`) for each of the four different Racetracks.
17+
18+
<img src="./images/RT_32_8_4_profile_3D.png" align="center" width="80%" height="80%">
19+
20+
Memory architecture
21+
--------------------------
22+
The Racetrack array is instantiaed in the file `RT_memory`, which wraps the raw memory core and adds surrounding logic for the correct functioning (i.e. `FSM` and `shifter` modules), this module includes also all the logic required for the LiM computations.
23+
24+
<img src="./images/racetrack_array_arch.png" align="center" width="50%" height="50%">
25+
26+
The Racetrack memory is instantiated by the file `dp_ram_logic`, which provides all the additional logic (i.e. decoders, shift number generator etc.).
27+
28+
<img src="./images/racetrack_memory_arch.png" align="center" width="50%" height="50%">
29+
30+
Word organization
31+
--------------------------
32+
The Racetrack memory is capable of parallel LiM store operations by performing parallel accesses in each Block. This feature requires a different word organizayion within the memory.
33+
34+
<img src="./images/word_organization.png" align="center" width="25%" height="25%">
35+
36+
37+
38+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
315 KB
Loading

0 commit comments

Comments
 (0)