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

Fixes for ri5cy verilator #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-04-24 Edward Jones <[email protected]>

* config/riscv32/chips/ri5cy/chip.cfg: Change CHIP_CFLAGS to
match architecture of ri5cy (-march=rv32imc -mabi=ilp32)

2019-04-24 Jeremy Bennett <[email protected]>

The initial data for FDCT was in a global block, overwritten by
Expand Down
2 changes: 1 addition & 1 deletion config/riscv32/chips/ri5cy/chip.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.

export CHIP_CFLAGS="-march=rv32i"
export CHIP_CFLAGS="-march=rv32imc -mabi=ilp32"
11 changes: 11 additions & 0 deletions testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2019-04-24 Edward Jones <[email protected]>

* config/ri5cyverilator.exp (beebs_load): Pick up
GDBSERVER_CMD environment variable if set.

2019-04-23 Edward Jones <[email protected]>

* config/ri5cyverilator.exp (beebs_load): Check for
_exit breakpoint instead of __internal_syscall when trying
to detect exit.

2019-04-10 Jeremy Bennett <[email protected]>

This gives greater flexibility when testing with BEEBS. The
Expand Down
12 changes: 9 additions & 3 deletions testsuite/config/ri5cyverilator.exp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ set_board_info beebs,benchmarks "$env(BENCHMARKS)"

proc beebs_load { file } {
set GDB riscv32-unknown-elf-gdb
set GDB_SERVER riscv32-gdbserver
set GDBSERVER_CMD "riscv32-gdbserver -c ri5cy --stdin"

# Maybe override the gdbserver command with an environment variable
if { [llength [array names ::env GDBSERVER_CMD]] > 0 } {
set GDBSERVER_CMD $::env(GDBSERVER_CMD)
verbose "GDBSERVER_CMD set to $GDBSERVER_CMD"
}

# Launch GDB, the target, and start running.
#
Expand All @@ -37,7 +43,7 @@ proc beebs_load { file } {
# We set all required breakpoints here then begin execution.
spawn $GDB --interpreter=mi -ex "set height 0" \
-ex "file $file" \
-ex "target remote | $GDB_SERVER -c ri5cy --stdin" \
-ex "target remote | $GDBSERVER_CMD" \
-ex "stepi" \
-ex "stepi" \
-ex "load" \
Expand Down Expand Up @@ -95,7 +101,7 @@ proc beebs_load { file } {
# _exit and check its argument instead).
send "cont\n"
expect {
-re ".*__internal_syscall.*n=93.*" {
-re ".*stopped.*_exit.*" {
send "print \$a0\n"
}
timeout {
Expand Down