diff options
author | David Shah <davey1576@gmail.com> | 2018-06-29 19:58:08 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-29 19:58:08 +0200 |
commit | 302ccc14cfa4344aeefa413e4d686e1c279552fa (patch) | |
tree | 8cca689439240961e11f628760b86e7f25058063 /ice40/cells.cc | |
parent | 27e7bc3b4bb04b395db6456b71f31f98607a4298 (diff) | |
download | nextpnr-302ccc14cfa4344aeefa413e4d686e1c279552fa.tar.gz nextpnr-302ccc14cfa4344aeefa413e4d686e1c279552fa.tar.bz2 nextpnr-302ccc14cfa4344aeefa413e4d686e1c279552fa.zip |
ice40: UltraPlus SPRAM working
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r-- | ice40/cells.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc index 27277e4e..7f690930 100644 --- a/ice40/cells.cc +++ b/ice40/cells.cc @@ -124,6 +124,24 @@ std::unique_ptr<CellInfo> create_ice_cell(Context *ctx, IdString type, std::stri } else if (type == ctx->id("SB_GB")) { add_port(ctx, new_cell.get(), "USER_SIGNAL_TO_GLOBAL_BUFFER", PORT_IN); add_port(ctx, new_cell.get(), "GLOBAL_BUFFER_OUTPUT", PORT_OUT); + } else if (type == ctx->id("ICESTORM_SPRAM")) { + add_port(ctx, new_cell.get(), "WREN", PORT_IN); + add_port(ctx, new_cell.get(), "CHIPSELECT", PORT_IN); + add_port(ctx, new_cell.get(), "CLOCK", PORT_IN); + add_port(ctx, new_cell.get(), "STANDBY", PORT_IN); + add_port(ctx, new_cell.get(), "SLEEP", PORT_IN); + add_port(ctx, new_cell.get(), "POWEROFF", PORT_IN); + + for (int i = 0; i < 16; i++) { + add_port(ctx, new_cell.get(), "DATAIN_" + std::to_string(i), PORT_IN); + add_port(ctx, new_cell.get(), "DATAOUT_" + std::to_string(i), PORT_OUT); + } + for (int i = 0; i < 14; i++) { + add_port(ctx, new_cell.get(), "ADDRESS_" + std::to_string(i), PORT_IN); + } + for (int i = 0; i < 4; i++) { + add_port(ctx, new_cell.get(), "MASKWREN_" + std::to_string(i), PORT_IN); + } } else { log_error("unable to create iCE40 cell of type %s", type.c_str(ctx)); } |