pld: add support for lattice ecp2 and ecp3 devices
Change-Id: I29c227c37be464f7ecc97a30d9cf3da1442e2b7f Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7396 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
8670ad4caa
commit
d35faaa35c
33
src/pld/lattice_bit.h
Normal file
33
src/pld/lattice_bit.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2022 by Daniel Anselmi *
|
||||
* danselmi@gmx.ch *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef OPENOCD_PLD_LATTICE_BIT_H
|
||||
#define OPENOCD_PLD_LATTICE_BIT_H
|
||||
|
||||
#include "helper/types.h"
|
||||
#include "raw_bit.h"
|
||||
|
||||
|
||||
struct lattice_bit_file {
|
||||
struct raw_bit_file raw_bit;
|
||||
size_t offset;
|
||||
uint32_t idcode;
|
||||
const char *part; /* reuses memory in raw_bit_file */
|
||||
bool has_id;
|
||||
};
|
||||
|
||||
enum lattice_family_e {
|
||||
LATTICE_ECP2,
|
||||
LATTICE_ECP3,
|
||||
LATTICE_ECP5,
|
||||
LATTICE_CERTUS,
|
||||
LATTICE_UNKNOWN,
|
||||
};
|
||||
|
||||
int lattice_read_file(struct lattice_bit_file *bit_file, const char *filename, enum lattice_family_e family);
|
||||
|
||||
#endif /* OPENOCD_PLD_LATTICE_BIT_H */
|
||||
Reference in New Issue
Block a user