yosys/techlibs/analogdevices/lutrams_map.v

128 lines
2.2 KiB
Verilog
Raw Normal View History

2025-09-23 12:08:17 +02:00
module $__ANALOGDEVICES_LUTRAM_SP_ (...);
parameter INIT = 0;
parameter OPTION_ABITS = 5;
2025-10-09 05:38:49 +02:00
output PORT_RW_RD_DATA;
input PORT_RW_WR_DATA;
2025-09-23 12:08:17 +02:00
input [OPTION_ABITS-1:0] PORT_RW_ADDR;
input PORT_RW_WR_EN;
input PORT_RW_CLK;
generate
case(OPTION_ABITS)
2025-10-09 05:38:49 +02:00
5:
RAMS32X1
2025-09-23 12:08:17 +02:00
#(
2025-10-09 05:38:49 +02:00
.INIT(INIT)
2025-09-23 12:08:17 +02:00
)
_TECHMAP_REPLACE_
(
2025-10-09 05:38:49 +02:00
.O(PORT_RW_RD_DATA),
.A0(PORT_RW_ADDR[0]),
.A1(PORT_RW_ADDR[1]),
.A2(PORT_RW_ADDR[2]),
.A3(PORT_RW_ADDR[3]),
.A4(PORT_RW_ADDR[4]),
.D(PORT_RW_WR_DATA),
2025-09-23 12:08:17 +02:00
.WCLK(PORT_RW_CLK),
2025-10-09 05:38:49 +02:00
.WE(PORT_RW_WR_EN)
2025-09-23 12:08:17 +02:00
);
2025-10-09 05:38:49 +02:00
6: begin
RAMS64X1
2025-09-23 12:08:17 +02:00
#(
2025-10-09 05:38:49 +02:00
.INIT(INIT)
2025-09-23 12:08:17 +02:00
)
_TECHMAP_REPLACE_
(
2025-10-09 05:38:49 +02:00
.O(PORT_RW_RD_DATA),
.A0(PORT_RW_ADDR[0]),
.A1(PORT_RW_ADDR[1]),
.A2(PORT_RW_ADDR[2]),
.A3(PORT_RW_ADDR[3]),
.A4(PORT_RW_ADDR[4]),
.A5(PORT_RW_ADDR[5]),
.D(PORT_RW_WR_DATA),
2025-09-23 12:08:17 +02:00
.WCLK(PORT_RW_CLK),
2025-10-09 05:38:49 +02:00
.WE(PORT_RW_WR_EN)
2025-09-23 12:08:17 +02:00
);
end
default:
$error("invalid OPTION_ABITS/WIDTH combination");
endcase
endgenerate
endmodule
module $__ANALOGDEVICES_LUTRAM_DP_ (...);
parameter INIT = 0;
parameter OPTION_ABITS = 5;
2025-10-09 05:38:49 +02:00
output PORT_RW_RD_DATA;
input PORT_RW_WR_DATA;
2025-09-23 12:08:17 +02:00
input [OPTION_ABITS-1:0] PORT_RW_ADDR;
input PORT_RW_WR_EN;
input PORT_RW_CLK;
2025-10-09 05:38:49 +02:00
output PORT_R_RD_DATA;
2025-09-23 12:08:17 +02:00
input [OPTION_ABITS-1:0] PORT_R_ADDR;
generate
case (OPTION_ABITS)
2025-10-09 05:38:49 +02:00
5:
RAMD32X1
2025-09-23 12:08:17 +02:00
#(
2025-10-09 05:38:49 +02:00
.INIT(INIT)
2025-09-23 12:08:17 +02:00
)
_TECHMAP_REPLACE_
(
2025-10-09 05:38:49 +02:00
.SPO(PORT_RW_RD_DATA),
.DPO(PORT_R_RD_DATA),
.A0(PORT_RW_ADDR[0]),
.A1(PORT_RW_ADDR[1]),
.A2(PORT_RW_ADDR[2]),
.A3(PORT_RW_ADDR[3]),
.A4(PORT_RW_ADDR[4]),
.D(PORT_RW_WR_DATA),
.DPRA0(PORT_R_ADDR[0]),
.DPRA1(PORT_R_ADDR[1]),
.DPRA2(PORT_R_ADDR[2]),
.DPRA3(PORT_R_ADDR[3]),
.DPRA4(PORT_R_ADDR[4]),
2025-09-23 12:08:17 +02:00
.WCLK(PORT_RW_CLK),
2025-10-09 05:38:49 +02:00
.WE(PORT_RW_WR_EN)
2025-09-23 12:08:17 +02:00
);
2025-10-09 05:38:49 +02:00
6:
RAMD64X1
2025-09-23 12:08:17 +02:00
#(
2025-10-09 05:38:49 +02:00
.INIT(INIT)
2025-09-23 12:08:17 +02:00
)
_TECHMAP_REPLACE_
(
2025-10-09 05:38:49 +02:00
.SPO(PORT_RW_RD_DATA),
.DPO(PORT_R_RD_DATA),
.A0(PORT_RW_ADDR[0]),
.A1(PORT_RW_ADDR[1]),
.A2(PORT_RW_ADDR[2]),
.A3(PORT_RW_ADDR[3]),
.A4(PORT_RW_ADDR[4]),
.A5(PORT_RW_ADDR[5]),
.D(PORT_RW_WR_DATA),
.DPRA0(PORT_R_ADDR[0]),
.DPRA1(PORT_R_ADDR[1]),
.DPRA2(PORT_R_ADDR[2]),
.DPRA3(PORT_R_ADDR[3]),
.DPRA4(PORT_R_ADDR[4]),
.DPRA5(PORT_R_ADDR[5]),
2025-09-23 12:08:17 +02:00
.WCLK(PORT_RW_CLK),
2025-10-09 05:38:49 +02:00
.WE(PORT_RW_WR_EN)
2025-09-23 12:08:17 +02:00
);
default:
$error("invalid OPTION_ABITS/WIDTH combination");
endcase
endgenerate
endmodule