From 24ec49db2e45a914b1f021c6f49866afca846c46 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Thu, 25 Nov 2021 16:07:36 +1030 Subject: [PATCH] microwatt: Use Xilinx multiplier Use the technology specific multiplier implementation when building for a Xilinx platform. This isn't understood by yosys so we can't use it when yosys is used for synthesis. Signed-off-by: Joel Stanley --- litex/soc/cores/cpu/microwatt/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litex/soc/cores/cpu/microwatt/core.py b/litex/soc/cores/cpu/microwatt/core.py index bb1ffc908..570f9f844 100644 --- a/litex/soc/cores/cpu/microwatt/core.py +++ b/litex/soc/cores/cpu/microwatt/core.py @@ -187,8 +187,7 @@ class Microwatt(CPU): # Load/Store. "loadstore1.vhdl", - # Multiply/Divide. - "multiply.vhdl", + # Divide. "divider.vhdl", # FPU. @@ -207,6 +206,12 @@ class Microwatt(CPU): "core_debug.vhdl", "core.vhdl", ] + from litex.build.xilinx import XilinxPlatform + if isinstance(platform, XilinxPlatform) and not use_ghdl_yosys_plugin: + sources.append("xilinx-mult.vhdl") + else: + sources.append("multiply.vhdl") + sdir = get_data_mod("cpu", "microwatt").data_location cdir = os.path.dirname(__file__) # Convert VHDL to Verilog through GHDL/Yosys.