From b01669c135b8b6319f598dc0083ee7299c973905 Mon Sep 17 00:00:00 2001 From: tmeissner Date: Mon, 2 Jan 2023 20:08:07 +0100 Subject: [PATCH] Update Makefile to build cryptocores AES-CTR component --- neorv32_aes/syn/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/neorv32_aes/syn/Makefile b/neorv32_aes/syn/Makefile index 45a44f8..41d52da 100644 --- a/neorv32_aes/syn/Makefile +++ b/neorv32_aes/syn/Makefile @@ -56,8 +56,17 @@ NEORV32_CORE_SRC := \ NEORV32_SRC := ${NEORV32_PKG} ${NEORV32_APP_SRC} ${NEORV32_MEM_ENTITIES} \ ${NEORV32_MEM_SRC} ${NEORV32_CORE_SRC} -WORK_FILES := ../rtl/${DESIGN_NAME}.vhd -GM_FILES := ../../lib/rtl_components.vhd +AES_DIR := ../../cryptocores/aes/rtl/vhdl +CRYPTO_SRC := \ + $(AES_DIR)/aes_pkg.vhd \ + $(AES_DIR)/aes_enc.vhd \ + $(AES_DIR)/aes_dec.vhd \ + $(AES_DIR)/aes.vhd \ + $(AES_DIR)/../../../ctraes/rtl/vhdl/ctraes.vhd + + +WORK_FILES := ../rtl/${DESIGN_NAME}.vhd +GM_FILES := ../../lib/rtl_components.vhd GHDL_FLAGS := --std=08 --workdir=build -Pbuild YOSYSPIPE := -nomx8 @@ -74,9 +83,12 @@ imp: ${DESIGN_NAME}.bit build/work-obj08.cf: ${WORK_FILES} build/gatemate-obj08.cf build/neorv32-obj08.cf ghdl -a ${GHDL_FLAGS} --work=work ${WORK_FILES} -build/neorv32-obj08.cf: build/gatemate-obj08.cf ${NEORV32_SRC} +build/neorv32-obj08.cf: build/gatemate-obj08.cf build/cryptocores-obj08.cf ${NEORV32_SRC} ghdl -a $(GHDL_FLAGS) --work=neorv32 ${NEORV32_SRC} +build/cryptocores-obj08.cf: ${CRYPTO_SRC} + ghdl -a $(GHDL_FLAGS) --work=cryptocores ${CRYPTO_SRC} + build/gatemate-obj08.cf: ${GM_FILES} mkdir -p build ghdl -a ${GHDL_FLAGS} --work=gatemate ${GM_FILES}