-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding back the HWLoop #436
Merged
davideschiavone
merged 127 commits into
openhwgroup:master
from
davideschiavone:new_pipeline
Aug 28, 2020
Merged
Changes from all commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
d147824
using always 32bits prefetcher
davideschiavone 38c944c
removed HWLoop, RVC and prefetcher fifo with RVC support, now just a …
davideschiavone dff4d79
:construction: Adding back RVC support with aligned and compressed de…
davideschiavone 0f91fa2
adding riscv aligner
davideschiavone 729ad63
fix halt if and update waves
davideschiavone c6f71a6
add support for branches
davideschiavone beb1135
:construction: keep on working on RVC support in the ID stage
davideschiavone 2c2a2ca
adding pc_if as next pc and change pipe_flush to wfi
davideschiavone db48689
updated rtl/riscv_aligner.sv
96f6aa9
removed pc registers in IF
davideschiavone a9fa357
:construction: reworked HWLoop in new pipeline
davideschiavone 8513f91
removed unused signal from controller
3bfe1ea
tmp removed unused states in LSU
89884e5
fixed WAIT RVALID on hwloop branches during stalls on iMem
1532dd9
added ports hwloop_target_reg from ID to IF
d89347e
fixed wait for grant when hwloop is used
davideschiavone 7c376e6
update hwloop controller
davideschiavone 80f2716
:construction: using the last version of FIFO from common cells
davideschiavone 674e75e
lowering grant and valid on correct edge of the clock in random stall…
davideschiavone 8ba9f4b
removed deprecated 128bit prefetcher
davideschiavone e003339
:bug: add flushing conditions in RVALID states during HWLoops
davideschiavone bcfa13d
updated rtl/riscv_prefetch_buffer.sv: added default for fifo_flush
6fadc44
:police_car: updated rtl/riscv_prefetch_buffer.sv: fixed valid_o in W…
40c3d00
Updated rtl/riscv_hwloop_controller.sv: HwloopTarget and pcisEnd is u…
f18ca3d
updated
0434224
updated rtl/riscv_prefetch_buffer.sv. Fixed issue on ABORT HWLOOP
8a4aca0
updated src_files.yml
59178b9
BUGFIX, fixed aligner and controller handshake
fd1e5be
:sparkles: merging CLINT on new pipeline branch
davideschiavone 12915fe
:art: updating Bender
davideschiavone 193b661
align tb_top settings to master
6536507
:bug: fix wrong update of instruction when flushing
eeb6d10
fix NS in riscv_aligner
mp-17 0a7d024
merge from master
mp-17 5ad84f6
:bug: add special case for stalled JUMP in aligner
mp-17 acb2f09
:bug: fix memory stall activation routine
mp-17 9373be2
:sparkles: mtvec and mtvex writable when PULP_SECURE=0 #254
davideschiavone cd4355c
Disable inference of FP registers when `Zfinx` is enabled
andreaskurth 13956dd
Disable inference of FP latches when `Zfinx` is enabled
andreaskurth 6344fe0
:recycle: copied fifo from common cells
davideschiavone 4999ee0
:construction: updated aligner next state and valid logic
davideschiavone cf81e05
Merge remote-tracking branch 'origin' into new_pipeline
davideschiavone c9d4ade
:construction: new HWLoop integrated into controller and new Prefetch…
davideschiavone 934c05d
:zap: removed dependency from data_* to instr_*
davideschiavone 8e2c248
:wastebasket: removed riscv_hwloop_controller
davideschiavone a393eb1
:construction: :art: clean up pf and add conditions in IDLE to be add…
davideschiavone 58d0784
fix in prefetcher when IDLE and fifo not empty
davideschiavone 3da5ff5
fix to hwloop body signals and jump conditions
davideschiavone 7cc399d
:construction: :art: added another condition to handle returns from t…
davideschiavone aa96ec8
merge master
davideschiavone 498a9c2
merge master
davideschiavone 2fd49be
add memory stalls to interrupt test
mp-17 e91424d
:bug: fix -jump lost if waiting for rvalid- bug
mp-17 081e963
add hwlp-test
mp-17 cf0db8e
fix controller condition to be inside a HWLP
mp-17 2b4e610
fixed and reorganized prefetcher
mp-17 9d1dd0a
add hwlp-test
mp-17 c8a5cbc
hwlp-test updated
mp-17 b4060f3
merge master
mp-17 0b5e6ef
:fix: fix and clean prefetcher
mp-17 edf4060
:fix: fix prefetcher for D-MEM stalls
mp-17 b07b714
:bug: fix jump to wrong hwlp for FIFO_DEPTH>2
mp-17 82ba7d5
:boom: merge master
davideschiavone af48c30
propagate PULP_HWLP param to tb_top
mp-17 0585591
:boom: merge master with OBI
davideschiavone db047e5
merge master
davideschiavone 51c8747
fix missing connection
mp-17 4fe1659
merge new_pipeline_obi
mp-17 3f229c5
fix previous merge
mp-17 d4b38e5
:bug: hold PC_ID during ecall for correct MEPC
mp-17 c6c29fa
add div/ebreak/fence.i to hwlp_test
mp-17 768d33a
:bug: hold PC_ID in ebreak/ill.instr for correct MEPC
mp-17 9c5fa36
:bug: prefetcher now correctly aborts hwlp jumps
mp-17 47df2f3
:bug: hold PC_ID in fencei for correct jump
mp-17 075fddd
:bug: fix spurious HWLP_begin I-MEM req when aborting the previous req
mp-17 ad013ad
:boom: merge master new file prefix names
davideschiavone ecae92d
:boom: added prefetch busy
davideschiavone 1f4d4c6
refactor mem_stall support
mp-17 2085fb1
:bug: fix -mret does not jump- bug
mp-17 d46a3a7
update file lists to cv32e40p new_pipeline
mp-17 939d147
update riscv tb names to cv32e40p
mp-17 8b7bc02
remove prefetch_controller from source file lists
mp-17 2b0557b
fixed debug single step
davideschiavone e41f88f
:bug: fix access restriction to trigger registers
mp-17 9c9fb1e
:bug: fix peripheral rdata answers during outst. trans. with mem stalls
mp-17 bc4106d
adapt prefetcher to new OBI interface (HWLP not supported)
mp-17 a69237e
update prefetcher controller with hwlp support
mp-17 d6ad52f
fix hwlp support
mp-17 e624d16
fix - make hwlp_jump_o last only one cycle
mp-17 a1d0c21
adapt signal names to hwlp_ instead of hwloop_
mp-17 b2381da
:bug: support multiple outst. mem reqs in random stall interface
mp-17 69e2621
add Prefetch Controller to waves
mp-17 fff37bb
align module instantiation order to master (prefetch_buffer)
mp-17 c57dade
beautify and add assertions to prefetch_controller
mp-17 74aef0e
removed display statements
davideschiavone f78b228
update src_files.yml
mp-17 f00ad1f
:boom: merge master
davideschiavone ab3eb19
fix src_file
davideschiavone a383079
:bug: counter-fix: modify access restrictions for trigger CSR
mp-17 27fd106
:bug: force interrupt generator to assert at least 1 irq line
mp-17 d7d8b4d
:bug: interrupts must have higher priority than hwlp in prefetch ctrl
mp-17 b07bbd0
optimize prefetch_controller requests control during jumps
mp-17 99dfa79
:boom: merge master
davideschiavone 6dd65c2
:bug: fix corner case hwlp_jump at HWLP_END after mret from interrupt
mp-17 46d85f5
cut path id_ready->branch and :bug: fix mstatus.mpie overwrite
mp-17 eecc931
refactor hwlp test and add hwlp+interrupt self-test
mp-17 fa3c10e
adapt interrupt generator to new interrupt interface
mp-17 7da64c9
:boom: merge master
davideschiavone 139108f
:boom: merge master
davideschiavone 030a5f8
added hwloop test --> to be moved in core-v-verif
davideschiavone ba9b4bc
fix manifest file and removed fetch_fifo
davideschiavone 388f59e
fix wfi
davideschiavone 4df8625
fix branch_address in aligner
davideschiavone 9a0152a
clean id-stage, aligner, controller
mp-17 45e89ac
update src_file
davideschiavone eac9ac5
:bug: fix next pc during wfi in debug mode
davideschiavone 561cd88
update reviews PR#436
davideschiavone 23d9bb9
removed ALIGNED16 state from aligner
davideschiavone adea64e
:boom: removed fsm in if_stage
davideschiavone d22d781
2nd update reviews PR#436
davideschiavone d5d724e
moving aligner to if
davideschiavone 0b4d9a7
:bug: fix debug
davideschiavone 8eebae5
moved rvc decoder in if
davideschiavone 89d3045
:recycle: clean up the code
davideschiavone 6420cdf
removed extra variable in Makefile
davideschiavone e460eff
Merge pull request #1 from davideschiavone/new_pipeline_aligner_rvc_if
davideschiavone badb22f
removed instr_width parameter
davideschiavone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,6 @@ RISCV_EXE_PREFIX = $(RISCV)/bin/riscv32-unknown-elf- | |
|
||
# GCC configuration | ||
CUSTOM_GCC_FLAGS = | ||
INTERRUPT_GCC_FLAGS = | ||
|
||
all: custom-vsim-run | ||
|
||
|
@@ -229,7 +228,7 @@ custom-fp-vsim-run-gui: vsim-run-gui-fp | |
# compile and run interrupt | ||
interrupt/interrupt.elf: interrupt/interrupt.c | ||
$(RISCV_EXE_PREFIX)gcc -march=rv32imc -o $@ -w -Os -g -nostdlib \ | ||
${INTERRUPT_GCC_FLAGS} \ | ||
${CUSTOM_GCC_FLAGS} \ | ||
-T custom/link.ld \ | ||
-static \ | ||
custom/crt0.S \ | ||
|
@@ -252,6 +251,34 @@ interrupt-vsim-run-gui: vsim-all interrupt/interrupt.hex | |
interrupt-vsim-run-gui: ALL_VSIM_FLAGS += "+firmware=interrupt/interrupt.hex" | ||
interrupt-vsim-run-gui: vsim-run-gui | ||
|
||
# Compile and run HW-loops test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be moved to core-v-verif right away? We are trying to keep this Makefile as minimal as possible (ideally only 'hello world') |
||
# Until the compiler will correctly handle HW-loops, manually insert them (no jumps/branch in the body) | ||
# Compile with "rv32imxpulpv2" with "-mnohwloop" or "-O0" to avoid the compiler inserting other hw-loops | ||
# Do not use RVC, as the instructions should be aligned and not compressed | ||
hwlp_test/hwlp_test.elf: hwlp_test/hwlp_test.c | ||
$(RISCV_EXE_PREFIX)gcc -march=rv32imxpulpv2 -mnohwloop -o $@ -w -O0 -g -nostdlib \ | ||
$(CUSTOM_GCC_FLAGS) \ | ||
-T custom/link.ld \ | ||
-static \ | ||
custom/crt0.S \ | ||
$^ mem_stall/mem_stall.c custom/syscalls.c custom/vectors.S \ | ||
-I $(RISCV)/riscv32-unknown-elf/include \ | ||
-I mem_stall \ | ||
-L $(RISCV)/riscv32-unknown-elf/lib \ | ||
-lc -lm -lgcc | ||
hwlp-clean: | ||
rm -rf hwlp_test/hwlp_test.elf hwlp_test/hwlp_test.hex | ||
|
||
.PHONY: hwlp-vsim-run | ||
hwlp-vsim-run: vsim-all hwlp_test/hwlp_test.hex | ||
hwlp-vsim-run: ALL_VSIM_FLAGS += "+firmware=hwlp_test/hwlp_test.hex" | ||
hwlp-vsim-run: vsim-run | ||
|
||
.PHONY: hwlp-vsim-run-gui | ||
hwlp-vsim-run-gui: vsim-all hwlp_test/hwlp_test.hex | ||
hwlp-vsim-run-gui: ALL_VSIM_FLAGS += "+firmware=hwlp_test/hwlp_test.hex" | ||
hwlp-vsim-run-gui: vsim-run-gui | ||
|
||
# general targets | ||
.PHONY: clean | ||
clean: tb-clean tb-clean-fp custom-clean custom-fp-clean interrupt-clean | ||
clean: tb-clean tb-clean-fp custom-clean custom-fp-clean interrupt-clean hwlp-clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
#include "mem_stall.h" | ||
|
||
int main(int argc, char *argv[]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,10 +85,10 @@ class rand_data_cycles; | |
rand int n; | ||
endclass : rand_data_cycles | ||
|
||
mailbox #(stall_mem_t) core_reqs = new (4); | ||
mailbox #(stall_mem_t) core_resps = new (4); | ||
mailbox #(logic) core_resps_granted = new (4); | ||
mailbox #(stall_mem_t) memory_transfers = new (4); | ||
mailbox #(stall_mem_t) core_reqs = new (); | ||
mailbox #(stall_mem_t) core_resps = new (); | ||
mailbox #(logic) core_resps_granted = new (); | ||
mailbox #(stall_mem_t) memory_transfers = new (); | ||
|
||
always_latch | ||
begin | ||
|
@@ -129,8 +129,10 @@ always_latch | |
#10;//wait at the very beginning | ||
while(1) begin | ||
@(posedge clk_i); | ||
#1; | ||
grant_core_o = 1'b0; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
#1; | ||
|
||
if (!req_per_q) begin | ||
wait(req_per_q == 1'b1); | ||
end | ||
|
@@ -178,10 +180,10 @@ always_latch | |
|
||
while(1) begin | ||
@(posedge clk_i); | ||
#1; | ||
rvalid_core_o = 1'b0; | ||
rdata_core_o = 'x; | ||
|
||
#1; | ||
core_resps_granted.get(granted); | ||
|
||
core_resps.get(mem_acc); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed (the fifo from common_cells was copied; is another cell from that repos now used)?