Skip to content
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

Add tohost capabilities to cv32e20 environment #2224

Open
wants to merge 1 commit into
base: cv32e20/dev
Choose a base branch
from

Conversation

MarioOpenHWGroup
Copy link
Contributor

Add tohost mechanism instead of the in-house one that we had to end the tests.

Copy link
Member

@MikeOpenHWGroup MikeOpenHWGroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few questions about this. Let's discuss in our weekly meeting with the E20 team on Tuesday (2023-10-03).

cv32e20/bsp/Makefile Outdated Show resolved Hide resolved
cv32e20/bsp/crt0.S Outdated Show resolved Hide resolved
@@ -65,6 +65,8 @@ SECTIONS
KEEP(*(.vectors));
} >ram

.tohost : { *(.tohost) } >ram
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment here.

cv32e20/env/uvme/uvme_cv32e20_env.sv Outdated Show resolved Hide resolved
lib/corev-dv/corev_asm_program_gen.sv Show resolved Hide resolved
lib/uvm_libs/uvml_sb/uvml_sb_cntxt.sv Show resolved Hide resolved
mk/Common.mk Show resolved Hide resolved
# Copyright 2022 OpenHW Group
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1

# Makefile for the CV32E20 "Board Support Package".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems to be in need of an update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True 👍

@MikeOpenHWGroup
Copy link
Member

Hi @MarioOpenHWGroup. This PR now has a couple of conflicts. Can you resolve these? Thanks!

@@ -26,6 +26,8 @@ typedef class uvme_cv32e20_vp_sig_writer_seq_c;
typedef class uvme_cv32e20_vp_status_flags_seq_c;
typedef class uvme_cv32e20_vp_rand_num_seq_c;

import "DPI-C" function longint read_symbol(input string symbol, output longint unsigned address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have some comments here about the purpose of these DPI functions.

cv32e20/env/uvme/uvme_cv32e20_env.sv Show resolved Hide resolved
mk/Common.mk Show resolved Hide resolved
Copy link
Member

@MikeOpenHWGroup MikeOpenHWGroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MarioOpenHWGroup. I resolved the conflicts and conducted another review. I have several comments that we should probably review "in person".

Copy link

@emgens emgens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

* cv32e20/bsp/crt0.s: add tohost symbol declaration
* cv32e20/bsp/link.ld: add tohost symbol linking address
* cv32e20/bsp/syscalls.c: add tohost store in the exit function
* cv32e20/env/corev-dv/cv32e20_instr_gen_config.sv: add rule to enforce
not ZERO reg used in the scratch reg. This constraint was already
implemented but not working with vsim
* cv32e20/env/uvme/uvme_cv32e20_env.sv: add mechanism to load symbols
from the binary for the execution exit.
* cv32e20/env/uvme/vseq/uvme_cv32e20_vp_status_flags_seq.sv: Adapt code
to host format ( {exit_value, 1} )
* cv32e40p/env/uvme/uvme_rv32isa_covg_trn.sv: substitute
uvm_objects_utils(begin/end) for a simple uvm_object_utils
* lib/corev-dv/corev_asm_program_gen.sv: delete wfi for locking the core
and add tohost mechanism
* lib/uvm_agents/uvma_obi_memory/src/comps/uvma_obi_memory_mon.sv: vsim
complaining for using passive_mp
* lib/uvm_libs/uvml_sb/uvml_sb_cntxt.sv: delete T_TRN type for event as
it causes vsim to fail simulation
* mk/Common.mk: add compilation for elfloader vendor
* mk/uvmt/vsim.mk: add comilation for elfloader vendor and delete
clean_riscv-dv on each corev-dv generation
* vendor/elfloader/Makefile: add elfloader vendor
* vendor/elfloader/elfloader.cc: add elfloader vendor
* lib/corev-dv/corev_asm_program_gen.sv: delete wfi and add syscall on ecall
* cv32e20/tests/programs/custom/riscv_arithmetic_basic_test_*: change align of trap handler to 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants