From 19d3983010eaef1c850d22b136e3a132ef75cfab Mon Sep 17 00:00:00 2001 From: Alexandre Joannou Date: Mon, 27 Jan 2025 12:13:19 +0000 Subject: [PATCH] Added an option to control the capability type used for verilog wrappers --- CHERICapWrap.bsv | 5 ++++- Makefile | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHERICapWrap.bsv b/CHERICapWrap.bsv index 6714a76..c884fa8 100644 --- a/CHERICapWrap.bsv +++ b/CHERICapWrap.bsv @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Alexandre Joannou + * Copyright (c) 2019-2025 Alexandre Joannou * All rights reserved. * * This software was developed by SRI International and the University of @@ -30,7 +30,10 @@ package CHERICapWrap; import CHERICap :: *; import CHERICC_Fat :: *; +`ifndef CAPTYPE `define CAPTYPE CapPipe +`endif + `ifndef CAP64 `define W(name) wrap128_``name `else diff --git a/Makefile b/Makefile index 25f1985..c0ae5b4 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ else BSCFLAGS = -D CAP64 endif +CAPTYPE ?= CapPipe +BSCFLAGS += -D CAPTYPE=$(CAPTYPE) + ARCH ?= RISCV ifeq ($(ARCH), RISCV) BSCFLAGS += -D RISCV @@ -33,4 +36,4 @@ clean-blarney-wrappers: clean rm -f *.hs clean: - rm -f *.bo \ No newline at end of file + rm -f *.bo