aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-04-10 14:58:07 +0200
committerClifford Wolf <clifford@clifford.at>2016-04-10 14:58:07 +0200
commit8f5845310950ee00dbc3084e76e3f11dd8493158 (patch)
treee109d94e957eafdaf0ee09e6e0215c270d4801ec /scripts
parentdf1ae479e368af5065c7d45e97a2a8c9b46b7dc4 (diff)
downloadpicorv32-8f5845310950ee00dbc3084e76e3f11dd8493158.tar.gz
picorv32-8f5845310950ee00dbc3084e76e3f11dd8493158.zip
Using compressed ISA in cxxdemo
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cxxdemo/Makefile11
-rw-r--r--scripts/cxxdemo/testbench.v4
2 files changed, 9 insertions, 6 deletions
diff --git a/scripts/cxxdemo/Makefile b/scripts/cxxdemo/Makefile
index 444aa34..d811427 100644
--- a/scripts/cxxdemo/Makefile
+++ b/scripts/cxxdemo/Makefile
@@ -1,6 +1,7 @@
-CXX = riscv32-unknown-elf-g++
-CC = riscv32-unknown-elf-gcc
-AS = riscv32-unknown-elf-gcc
+RISCV_TOOLS_PREFIX = /opt/riscv32ic/bin/riscv32-unknown-elf-
+CXX = $(RISCV_TOOLS_PREFIX)g++
+CC = $(RISCV_TOOLS_PREFIX)gcc
+AS = $(RISCV_TOOLS_PREFIX)gcc
CXXFLAGS = -MD -Os -Wall -std=c++11
CCFLAGS = -MD -Os -Wall -std=c++11
LDFLAGS = -Wl,--gc-sections
@@ -14,8 +15,8 @@ testbench.exe: testbench.v ../../picorv32.v
chmod -x testbench.exe
firmware32.hex: firmware.elf start.elf hex8tohex32.py
- riscv32-unknown-elf-objcopy -O verilog start.elf start.tmp
- riscv32-unknown-elf-objcopy -O verilog firmware.elf firmware.tmp
+ $(RISCV_TOOLS_PREFIX)objcopy -O verilog start.elf start.tmp
+ $(RISCV_TOOLS_PREFIX)objcopy -O verilog firmware.elf firmware.tmp
cat start.tmp firmware.tmp > firmware.hex
python3 hex8tohex32.py firmware.hex > firmware32.hex
rm -f start.tmp firmware.tmp
diff --git a/scripts/cxxdemo/testbench.v b/scripts/cxxdemo/testbench.v
index 07cea2b..ac9af70 100644
--- a/scripts/cxxdemo/testbench.v
+++ b/scripts/cxxdemo/testbench.v
@@ -23,7 +23,9 @@ module testbench;
wire [3:0] mem_wstrb;
reg [31:0] mem_rdata;
- picorv32 uut (
+ picorv32 #(
+ .COMPRESSED_ISA(1)
+ ) uut (
.clk (clk ),
.resetn (resetn ),
.trap (trap ),