From f52fd6a272958b6371d280e90dc3dbeeebbee16c Mon Sep 17 00:00:00 2001 From: YRabbit Date: Fri, 22 Oct 2021 14:41:18 +1000 Subject: gowin: Add ALU support. - Both the mode used by yosys and all Gowin primitive modes are supported. - The ALU always starts with a zero slice. - The maximum length of the ALU chain is limited to one line of the chip. Signed-off-by: YRabbit --- gowin/cells.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gowin/cells.h') diff --git a/gowin/cells.h b/gowin/cells.h index cb1c7aba..8f0636b8 100644 --- a/gowin/cells.h +++ b/gowin/cells.h @@ -57,6 +57,8 @@ inline bool is_widelut(const BaseCtx *ctx, const CellInfo *cell) } } +inline bool is_alu(const BaseCtx *ctx, const CellInfo *cell) { return (cell->type.index == ID_ALU); } + // is MUX2_LUT5 inline bool is_mux2_lut5(const BaseCtx *ctx, const CellInfo *cell) { return (cell->type.index == ID_MUX2_LUT5); } -- cgit v1.2.3