Skip to content

Commit

Permalink
Merge pull request #2329 from silabs-krdosvik/s/dev-merge
Browse files Browse the repository at this point in the history
S/dev merge
  • Loading branch information
silabs-robin authored Dec 14, 2023
2 parents 034b338 + d76b8af commit a063a3f
Show file tree
Hide file tree
Showing 59 changed files with 3,451 additions and 1,413 deletions.
2 changes: 1 addition & 1 deletion bin/clonetb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ clone() {
clone_cv32e40x() {
CV_CORE=cv32e40x
VERIF_ENV_REPO=https://github.com/openhwgroup/cv32e40x-dv.git
VERIF_ENV_REF=be17b8902002f91803abde4bfb8caa91088575e1
VERIF_ENV_REF=1ceaede5f4c0da6f1d34f4f4f7d7f3bbcdbe0b4a
clone

ignore_cloned_directory
Expand Down
14 changes: 12 additions & 2 deletions bin/merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ usage() {
}


die() {

scriptname=$0
message=$1
echo "$scriptname: error: $message"
exit 1

}


merge_cv32e40s_into_cv32e40x-dv () {

echo $'\n======= Merge of cv32e40s into cv32e40x-dv: =======\n'
Expand Down Expand Up @@ -158,8 +168,8 @@ rejection_diff() {
branch_name_merge_normal=$(git branch | grep 'merge')
branch_name_merge_theirs=$(echo $branch_name_merge_normal | sed 's/merge/theirs/')

git checkout main
git checkout -B $branch_name_merge_theirs
git checkout main || die "can't checkout main"
git checkout -B $branch_name_merge_theirs || die "can't create branch"
git merge -X theirs $branch_name_40s_subtree

move_files_40s_into_40x
Expand Down
21 changes: 20 additions & 1 deletion cv32e40s/bsp/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ typedef union {
volatile uint32_t r : 1;
volatile uint32_t w : 1;
volatile uint32_t x : 1;
volatile uint32_t a : 1;
volatile uint32_t a : 2;
volatile uint32_t reserved_6_5 : 2;
volatile uint32_t l : 1;
} __attribute__((packed)) volatile fields;
Expand All @@ -163,3 +163,22 @@ typedef union {
} __attribute__((packed)) volatile fields;
volatile uint32_t raw : 32;
} __attribute__((packed)) jvt_t;

typedef union {
struct {
volatile uint32_t exccode : 12;
volatile uint32_t res_30_12 : 19;
volatile uint32_t interrupt : 1;
} __attribute__((packed)) volatile clint;
struct {
volatile uint32_t exccode : 12;
volatile uint32_t res_15_12 : 4;
volatile uint32_t mpil : 8;
volatile uint32_t res_26_24 : 3;
volatile uint32_t mpie : 1;
volatile uint32_t mpp : 2;
volatile uint32_t minhv : 1;
volatile uint32_t interrupt : 1;
} __attribute__((packed)) volatile clic;
volatile uint32_t raw : 32;
} __attribute__((packed)) mcause_t;
38 changes: 20 additions & 18 deletions cv32e40s/bsp/corev_uvmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,27 @@

#define CV_VP_REGISTER_BASE 0x00800000

#define CV_VP_VIRTUAL_PRINTER_OFFSET 0x00000000
#define CV_VP_RANDOM_NUM_OFFSET 0x00000040
#define CV_VP_CYCLE_COUNTER_OFFSET 0x00000080
#define CV_VP_STATUS_FLAGS_OFFSET 0x000000c0
#define CV_VP_FENCEI_TAMPER_OFFSET 0x00000100
#define CV_VP_INTR_TIMER_OFFSET 0x00000140
#define CV_VP_DEBUG_CONTROL_OFFSET 0x00000180
#define CV_VP_OBI_SLV_RESP_OFFSET 0x000001c0
#define CV_VP_SIG_WRITER_OFFSET 0x00000200
#define CV_VP_VIRTUAL_PRINTER_OFFSET 0x00000000
#define CV_VP_RANDOM_NUM_OFFSET 0x00000040
#define CV_VP_CYCLE_COUNTER_OFFSET 0x00000080
#define CV_VP_STATUS_FLAGS_OFFSET 0x000000c0
#define CV_VP_FENCEI_TAMPER_OFFSET 0x00000100
#define CV_VP_INTR_TIMER_OFFSET 0x00000140
#define CV_VP_DEBUG_CONTROL_OFFSET 0x00000180
#define CV_VP_OBI_SLV_RESP_OFFSET 0x000001c0
#define CV_VP_SIG_WRITER_OFFSET 0x00000200
#define CV_VP_OBI_ERR_AWAIT_GOAHEAD_OFFSET 0x00000240

#define CV_VP_VIRTUAL_PRINTER_BASE (CV_VP_REGISTER_BASE + CV_VP_VIRTUAL_PRINTER_OFFSET)
#define CV_VP_RANDOM_NUM_BASE (CV_VP_REGISTER_BASE + CV_VP_RANDOM_NUM_OFFSET)
#define CV_VP_CYCLE_COUNTER_BASE (CV_VP_REGISTER_BASE + CV_VP_CYCLE_COUNTER_OFFSET)
#define CV_VP_STATUS_FLAGS_BASE (CV_VP_REGISTER_BASE + CV_VP_STATUS_FLAGS_OFFSET)
#define CV_VP_INTR_TIMER_BASE (CV_VP_REGISTER_BASE + CV_VP_INTR_TIMER_OFFSET)
#define CV_VP_DEBUG_CONTROL_BASE (CV_VP_REGISTER_BASE + CV_VP_DEBUG_CONTROL_OFFSET)
#define CV_VP_OBI_SLV_RESP_BASE (CV_VP_REGISTER_BASE + CV_VP_OBI_SLV_RESP_OFFSET)
#define CV_VP_SIG_WRITER_BASE (CV_VP_REGISTER_BASE + CV_VP_SIG_WRITER_OFFSET)
#define CV_VP_FENCEI_TAMPER_BASE (CV_VP_REGISTER_BASE + CV_VP_FENCEI_TAMPER_OFFSET)
#define CV_VP_CYCLE_COUNTER_BASE (CV_VP_REGISTER_BASE + CV_VP_CYCLE_COUNTER_OFFSET)
#define CV_VP_DEBUG_CONTROL_BASE (CV_VP_REGISTER_BASE + CV_VP_DEBUG_CONTROL_OFFSET)
#define CV_VP_FENCEI_TAMPER_BASE (CV_VP_REGISTER_BASE + CV_VP_FENCEI_TAMPER_OFFSET)
#define CV_VP_INTR_TIMER_BASE (CV_VP_REGISTER_BASE + CV_VP_INTR_TIMER_OFFSET)
#define CV_VP_OBI_ERR_AWAIT_GOAHEAD_BASE (CV_VP_REGISTER_BASE + CV_VP_OBI_ERR_AWAIT_GOAHEAD_OFFSET)
#define CV_VP_OBI_SLV_RESP_BASE (CV_VP_REGISTER_BASE + CV_VP_OBI_SLV_RESP_OFFSET)
#define CV_VP_RANDOM_NUM_BASE (CV_VP_REGISTER_BASE + CV_VP_RANDOM_NUM_OFFSET)
#define CV_VP_SIG_WRITER_BASE (CV_VP_REGISTER_BASE + CV_VP_SIG_WRITER_OFFSET)
#define CV_VP_STATUS_FLAGS_BASE (CV_VP_REGISTER_BASE + CV_VP_STATUS_FLAGS_OFFSET)
#define CV_VP_VIRTUAL_PRINTER_BASE (CV_VP_REGISTER_BASE + CV_VP_VIRTUAL_PRINTER_OFFSET)

// --------------------------------------------------------------------------
// Registers inside the OBI_SLV_RESP VP
Expand Down
Loading

0 comments on commit a063a3f

Please sign in to comment.