forked from lowRISC/riscv-compliance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications to support Codasip simulator.
The simulator is renamed as Codasip-simulator (was Codasip-IA-simulator), compliance_test.h has been moved to target directories and a COMPILE_TARGET has been added to Makefile to allow use of LLVM. ChangeLog: * Makefile: Include Codasip simulator target. * riscv-target/codasip-IA-simulator/compliance_io.h: Renamed as riscv-target/Codasip-simulator/compliance_io.h. * riscv-target/Codasip-simulator/compliance_io.h: Renamed from riscv-target/codasip-IA-simulator/compliance_io. * riscv-target/Codasip-simulator/compliance_test.h: Created. * riscv-target/codasip-IA-simulator/device/rv32i/Makefile.include: Renamed as riscv-target/Codasip-simulator/device/rv32i/Makefile.include * riscv-target/Codasip-simulator/device/rv32i/Makefile.include: Renamed from riscv-target/codasip-IA-simulator/device/rv32i/Makefile.include. * riscv-test-env/compliance_test.h: Renamed as riscv-target/riscvOVPsim/compliance_test.h. * riscv-target/riscvOVPsim/compliance_test.h: Renamed from riscv-test-env/compliance_test.h. * riscv-target/riscvOVPsim/device/rv32i/Makefile.include: Updated for new environment. * riscv-target/spike/compliance_test.h: Created. * riscv-target/spike/device/rv32i/Makefile.include: Updated for new environment. * riscv-test-suite/rv32i/Makefile: Likewise.
- Loading branch information
1 parent
e373062
commit beb5b06
Showing
11 changed files
with
163 additions
and
22 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
2018-06-15 Radek Hajek <[email protected]> | ||
|
||
Modifications to support Codasip simulator. | ||
|
||
The simulator is renamed as Codasip-simulator (was | ||
Codasip-IA-simulator), compliance_test.h has been moved to target | ||
directories and a COMPILE_TARGET has been added to Makefile to | ||
allow use of LLVM. | ||
|
||
* Makefile: Include Codasip simulator target. | ||
* riscv-target/codasip-IA-simulator/compliance_io.h: Renamed as | ||
riscv-target/Codasip-simulator/compliance_io.h. | ||
* riscv-target/Codasip-simulator/compliance_io.h: Renamed from | ||
riscv-target/codasip-IA-simulator/compliance_io. | ||
* riscv-target/Codasip-simulator/compliance_test.h: Created. | ||
* riscv-target/codasip-IA-simulator/device/rv32i/Makefile.include: | ||
Renamed as | ||
riscv-target/Codasip-simulator/device/rv32i/Makefile.include | ||
* riscv-target/Codasip-simulator/device/rv32i/Makefile.include: | ||
Renamed from | ||
riscv-target/codasip-IA-simulator/device/rv32i/Makefile.include. | ||
* riscv-test-env/compliance_test.h: Renamed as | ||
riscv-target/riscvOVPsim/compliance_test.h. | ||
* riscv-target/riscvOVPsim/compliance_test.h: Renamed from | ||
riscv-test-env/compliance_test.h. | ||
* riscv-target/riscvOVPsim/device/rv32i/Makefile.include: Updated | ||
for new environment. | ||
* riscv-target/spike/compliance_test.h: Created. | ||
* riscv-target/spike/device/rv32i/Makefile.include: Updated for | ||
new environment. | ||
* riscv-test-suite/rv32i/Makefile: Likewise. | ||
|
||
2018-06-10 Jeremy Bennett <[email protected]> | ||
|
||
Put placeholders in empty directories to make sure they show in | ||
|
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// RISC-V Compliance Test Header File | ||
// Copyright (c) 2017, Codasip Ltd. All Rights Reserved. | ||
// See LICENSE for license details. | ||
// | ||
// Description: Common header file for RV32I tests | ||
|
||
#ifndef _COMPLIANCE_TEST_H | ||
#define _COMPLIANCE_TEST_H | ||
|
||
#include "riscv_test.h" | ||
|
||
//----------------------------------------------------------------------- | ||
// RV Compliance Macros | ||
//----------------------------------------------------------------------- | ||
|
||
#define RV_COMPLIANCE_HALT \ | ||
.globl codasip_syscall; \ | ||
codasip_syscall: \ | ||
add x15, x0, 1; \ | ||
sw x15, codasip_syscall, t0; \ | ||
|
||
#define RV_COMPLIANCE_RV32M \ | ||
\ | ||
|
||
#define RV_COMPLIANCE_CODE_BEGIN \ | ||
.section .text.init; \ | ||
.align 4; \ | ||
.globl _start; \ | ||
_start: \ | ||
|
||
#define RV_COMPLIANCE_CODE_END \ | ||
\ | ||
|
||
#define RV_COMPLIANCE_DATA_BEGIN \ | ||
.align 4; \ | ||
.global codasip_signature_start; \ | ||
codasip_signature_start: \ | ||
|
||
#define RV_COMPLIANCE_DATA_END \ | ||
.align 4; \ | ||
.global codasip_signature_end; \ | ||
codasip_signature_end: | ||
|
||
#endif | ||
|
18 changes: 18 additions & 0 deletions
18
riscv-target/Codasip-simulator/device/rv32i/Makefile.include
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# TBD | ||
|
||
RUN_TARGET=\ | ||
codix_berkelium-ia-isimulator -r --info 5 \ | ||
$(work_dir_isa)/$< 2> $(work_dir_isa)/$@ 1>$(work_dir_isa)/$(*)_signature.output | ||
# +signature=$(work_dir_isa)/$(*)_signature.output \ | ||
# $(work_dir_isa)/$< 2> $(work_dir_isa)/$@ | ||
|
||
RISCV_PREFIX ?= codix_berkelium-ia- | ||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= -nostdlib -nodefaultlibs | ||
|
||
COMPILE_TARGET=\ | ||
$$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-env/ \ | ||
-I$(ROOTDIR)/riscv-test-env/p/ \ | ||
-I$(ROOTDIR)/riscv-target/$(RISCV_TARGET)/ \ | ||
$$< -o $(work_dir_isa)/$$@ |
6 changes: 0 additions & 6 deletions
6
riscv-target/codasip-IA-simulator/device/rv32i/Makefile.include
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
|
@@ -4,4 +4,18 @@ RUN_TARGET=\ | |
--override riscvOVPsim/cpu/sigdump/SignatureFile=$(work_dir_isa)/$(*)_signature.output \ | ||
--override riscvOVPsim/cpu/sigdump/ResultReg=3 \ | ||
--override riscvOVPsim/cpu/simulateexceptions=T \ | ||
--logfile $(work_dir_isa)/$@ | ||
--logfile $(work_dir_isa)/$@ | ||
|
||
RISCV_PREFIX ?= riscv32-unknown-elf- | ||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump | ||
RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles | ||
|
||
COMPILE_TARGET=\ | ||
$$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-env/ \ | ||
-I$(ROOTDIR)/riscv-test-env/p/ \ | ||
-I$(ROOTDIR)/riscv-target/$(RISCV_TARGET)/ \ | ||
-T$(ROOTDIR)/riscv-test-env/p/link.ld $$< \ | ||
-o $(work_dir_isa)/$$@; \ | ||
$$(RISCV_OBJDUMP) -D $(work_dir_isa)/$$@ > $(work_dir_isa)/[email protected] |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// RISC-V Compliance Test Header File | ||
// Copyright (c) 2017, Codasip Ltd. All Rights Reserved. | ||
// See LICENSE for license details. | ||
// | ||
// Description: Common header file for RV32I tests | ||
|
||
#ifndef _COMPLIANCE_TEST_H | ||
#define _COMPLIANCE_TEST_H | ||
|
||
#include "riscv_test.h" | ||
|
||
//----------------------------------------------------------------------- | ||
// RV Compliance Macros | ||
//----------------------------------------------------------------------- | ||
|
||
#define RV_COMPLIANCE_HALT \ | ||
RVTEST_PASS \ | ||
|
||
#define RV_COMPLIANCE_RV32M \ | ||
RVTEST_RV32M \ | ||
|
||
#define RV_COMPLIANCE_CODE_BEGIN \ | ||
RVTEST_CODE_BEGIN \ | ||
|
||
#define RV_COMPLIANCE_CODE_END \ | ||
RVTEST_CODE_END \ | ||
|
||
#define RV_COMPLIANCE_DATA_BEGIN \ | ||
RVTEST_DATA_BEGIN \ | ||
|
||
#define RV_COMPLIANCE_DATA_END \ | ||
RVTEST_DATA_END \ | ||
|
||
#endif |
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,4 +1,18 @@ | ||
RUN_TARGET=\ | ||
spike --isa=rv32i \ | ||
+signature=$(work_dir_isa)/$(*)_signature.output \ | ||
$(work_dir_isa)/$< 2> $(work_dir_isa)/$@ | ||
$(work_dir_isa)/$< 2> $(work_dir_isa)/$@ | ||
|
||
RISCV_PREFIX ?= riscv32-unknown-elf- | ||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump | ||
RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles | ||
|
||
COMPILE_TARGET=\ | ||
$$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-env/ \ | ||
-I$(ROOTDIR)/riscv-test-env/p/ \ | ||
-I$(ROOTDIR)/riscv-target/$(RISCV_TARGET)/ \ | ||
-T$(ROOTDIR)/riscv-test-env/p/link.ld $$< \ | ||
-o $(work_dir_isa)/$$@; \ | ||
$$(RISCV_OBJDUMP) -D $(work_dir_isa)/$$@ > $(work_dir_isa)/[email protected] |
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