mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
WALLY-init-lib improvements to support functional coverage
This commit is contained in:
parent
9ef211b40d
commit
669ee6ca12
@ -128,6 +128,17 @@ write_tohost:
|
|||||||
self_loop:
|
self_loop:
|
||||||
j self_loop # wait
|
j self_loop # wait
|
||||||
|
|
||||||
|
// utility routines
|
||||||
|
|
||||||
|
# put a 1 in msb of a0 (position XLEN-1); works for both RV32 and RV64
|
||||||
|
setmsb:
|
||||||
|
li a0, 0x80000000 # 1 in bit 31
|
||||||
|
slli a1, a0, 1 # check if register is wider than 31 bits
|
||||||
|
beqz a1, 1f # yes, a0 has 1 in bit 31
|
||||||
|
slli a0, a0, 16 # no: shift a0 to have 1 inn bit 63
|
||||||
|
slli a0, a0, 16 # use two shifts of 16 bits each to be compatible with compiling either RV32 or 64
|
||||||
|
ret # return to calller
|
||||||
|
|
||||||
.section .tohost
|
.section .tohost
|
||||||
tohost: # write to HTIF
|
tohost: # write to HTIF
|
||||||
.dword 0
|
.dword 0
|
||||||
@ -139,6 +150,9 @@ begin_signature:
|
|||||||
.fill 6*(XLEN/32),4,0xdeadbeef #
|
.fill 6*(XLEN/32),4,0xdeadbeef #
|
||||||
end_signature:
|
end_signature:
|
||||||
|
|
||||||
|
scratch:
|
||||||
|
.fill 4,4,0x0
|
||||||
|
|
||||||
# Initialize stack with room for 512 bytes
|
# Initialize stack with room for 512 bytes
|
||||||
.bss
|
.bss
|
||||||
.space 512
|
.space 512
|
||||||
|
Loading…
Reference in New Issue
Block a user