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 <joel@jms.id.au>
This commit is contained in:
Joel Stanley 2021-11-25 16:07:36 +10:30
parent 0503188661
commit 24ec49db2e
1 changed files with 7 additions and 2 deletions

View File

@ -187,8 +187,7 @@ class Microwatt(CPU):
# Load/Store. # Load/Store.
"loadstore1.vhdl", "loadstore1.vhdl",
# Multiply/Divide. # Divide.
"multiply.vhdl",
"divider.vhdl", "divider.vhdl",
# FPU. # FPU.
@ -207,6 +206,12 @@ class Microwatt(CPU):
"core_debug.vhdl", "core_debug.vhdl",
"core.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 sdir = get_data_mod("cpu", "microwatt").data_location
cdir = os.path.dirname(__file__) cdir = os.path.dirname(__file__)
# Convert VHDL to Verilog through GHDL/Yosys. # Convert VHDL to Verilog through GHDL/Yosys.