pld: add support for lattice ecp2 and ecp3 devices
[openocd.git] / src / pld / lattice.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright (C) 2022 by Daniel Anselmi *
5 * danselmi@gmx.ch *
6 ***************************************************************************/
7
8 #ifndef OPENOCD_PLD_LATTICE_H
9 #define OPENOCD_PLD_LATTICE_H
10
11 #include <jtag/jtag.h>
12 #include "pld.h"
13 #include "lattice_bit.h"
14
15 #define BYPASS 0xFF
16
17 struct lattice_pld_device {
18 struct jtag_tap *tap;
19 size_t preload_length;
20 enum lattice_family_e family;
21 };
22
23 int lattice_set_instr(struct jtag_tap *tap, uint8_t new_instr, tap_state_t endstate);
24 int lattice_read_u32_register(struct jtag_tap *tap, uint8_t cmd, uint32_t *in_val,
25 uint32_t out_val, bool do_idle);
26 int lattice_verify_usercode(struct lattice_pld_device *lattice_device, uint32_t out,
27 uint32_t expected, uint32_t mask);
28 int lattice_verify_status_register_u32(struct lattice_pld_device *lattice_device, uint32_t out,
29 uint32_t expected, uint32_t mask, bool do_idle);
30 int lattice_preload(struct lattice_pld_device *lattice_device);
31
32 #endif /* OPENOCD_PLD_LATTICE_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)