Skip to content

Commit

Permalink
Merge pull request #285 from cdwijs/master
Browse files Browse the repository at this point in the history
Typo fixes
  • Loading branch information
trabucayre authored Dec 19, 2022
2 parents 473d2c4 + 4833043 commit 5b0c0db
Show file tree
Hide file tree
Showing 36 changed files with 61 additions and 60 deletions.
2 changes: 1 addition & 1 deletion doc/guide/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Automatic file type detection bypass
====================================
Default behavior is to use file extension to determine file parser.
To avoid this mecanism ``--file-type type`` must be used.
To avoid this mechanism ``--file-type type`` must be used.
FT231/FT232 bitbang mode and pins configuration
===============================================
Expand Down
2 changes: 1 addition & 1 deletion doc/guide/first-steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ First steps with openFPGALoader
Install
=======

Packages are available for Linux distributionsm, Windows (MSYS2) and macOS:
Packages are available for Linux distributions, Windows (MSYS2) and macOS:

* *Arch Linux*: ``sudo pacman -S openfpgaloader``

Expand Down
7 changes: 4 additions & 3 deletions doc/guide/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ This application uses ``libftdi1``, so this library must be installed (and, depe
.. code-block:: bash
sudo apt install \
git \
libftdi1-2 \
libftdi1-dev \
libhidapi-hidraw0 \
Expand Down Expand Up @@ -92,7 +93,7 @@ If you don't want this option, use:
-DENABLE_LIBGPIOD=OFF
Additionnaly you have to install ``libgpiod``
Additionaly you have to install ``libgpiod``

To build the app:

Expand Down Expand Up @@ -137,7 +138,7 @@ After that you need to unplug and replug your device.
``usermod`` is used to add ``$USER`` as a member of ``plugdev`` group.
However this update is not taken into account immediately: it's required to
logout from current session and login again.
Check, by using ``id $USER``, if ``plugdev`` is mentionned after ``groups=``.
Check, by using ``id $USER``, if ``plugdev`` is mentioned after ``groups=``.
An alternate (and temporary) solution is to use ``sudo - $USER`` to have
your user seen as a member of ``plugdev`` group (works only for the current terminal).

Expand All @@ -150,7 +151,7 @@ openFPGALoader is available as a `Homebrew <https://brew.sh>`__ formula:
brew install openfpgaloader
Alternatively, if you want to build it from hand:
Alternatively, if you want to build it by hand:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion doc/vendors/intel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SVF and RBF files are supported.
quartus_cpf --option=bitstream_compression=off -c project_name.sof project_name.rbf
.. WARNING::
As mentionned in ``cyclone`` handbooks, real-time decompression is not supported by FPGA in JTAG mode.
As mentioned in ``cyclone`` handbooks, real-time decompression is not supported by FPGA in JTAG mode.
Keep in mind to disable this option.

file load:
Expand Down
4 changes: 2 additions & 2 deletions doc/vendors/xilinx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SPI flash
.. NOTE::
``.bit``, ``.bin``, and ``.mcs`` are supported for FLASH.

``.mcs`` must be generated through vivado with a tcl script like:
``.mcs`` must be generated through Vivado with a tcl script like:

.. code-block:: tcl
Expand Down Expand Up @@ -94,5 +94,5 @@ File load:
.. NOTE::
``--fpga-part`` is only required if this information is not provided at ``board.hpp`` level or if the board is not
officially supported.
device/packagee format is something like xc7a35tcsg324 (arty model).
device/package format is something like xc7a35tcsg324 (arty model).
See :ghsrc:`src/board.hpp <src/board.hpp>`, or :ghsrc:`spiOverJtag <spiOverJtag>` directory for examples.
2 changes: 1 addition & 1 deletion src/board.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ enum {
};

/*!
* \brief a board has a target cable and optionnally a pin configuration
* \brief a board has a target cable and optionally a pin configuration
* (bitbang mode)
*/
typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion src/cable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ enum ftdi_if {
};

/*!
* \brief cable caracteristics
* \brief cable characteristics
*/
struct cable_t {
communication_type type; /*! see enum communication_type */
Expand Down
4 changes: 2 additions & 2 deletions src/ch552_jtag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int CH552_jtag::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last)
*/
int tx_buff_size = mpsse_get_buffer_size();
int real_len = (last) ? len - 1 : len; // if its a buffer in a big send send len
// else supress last bit -> with TMS
// else suppress last bit -> with TMS
int nb_byte = real_len >> 3; // number of byte to send
int nb_bit = (real_len & 0x07); // residual bits
int xfer = tx_buff_size - 7; // 2 byte for opcode and size 2 time
Expand Down Expand Up @@ -286,7 +286,7 @@ int CH552_jtag::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last)

unsigned char last_bit = (tdi) ? *tx_ptr : 0;

/* next: serie of bit to send: inconditionnaly write AND read
/* next: serie of bit to send: unconditionally write AND read
*/
if (nb_bit != 0) {
display("%s read/write %d bit\n", __func__, nb_bit);
Expand Down
6 changes: 3 additions & 3 deletions src/cmsisDAP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class CmsisDAP: public JtagInterface {
public:
/*!
* \brief contructor: open device with vid/pid if != 0
* \brief constructor: open device with vid/pid if != 0
* else search for a compatible device
* \param[in] vid: vendor id
* \param[in] pid: product id
Expand Down Expand Up @@ -79,13 +79,13 @@ class CmsisDAP: public JtagInterface {
private:
/*!
* \brief connect device in JTAG mode
* \return 1 if success <= 0 otherwhise
* \return 1 if success <= 0 otherwise
*/
int dapConnect();

/*!
* \brief disconnect device
* \return 1 if success <= 0 otherwhise
* \return 1 if success <= 0 otherwise
*/
int dapDisconnect();
int dapResetTarget();
Expand Down
4 changes: 2 additions & 2 deletions src/colognechip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void CologneChip::reset()
}

/**
* Obtain CFG_DONE and CFG_FAILED signals. Configuration is successfull iff
* Obtain CFG_DONE and CFG_FAILED signals. Configuration is successful if
* CFG_DONE=true and CFG_FAILED=false.
*/
bool CologneChip::cfgDone()
Expand All @@ -99,7 +99,7 @@ bool CologneChip::cfgDone()
}

/**
* Prints information if configuration was successfull.
* Prints information if configuration was successful.
*/
void CologneChip::waitCfgDone()
{
Expand Down
2 changes: 1 addition & 1 deletion src/cxxopts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ namespace cxxopts
}

// The fallback parser. It uses the stringstream parser to parse all types
// that have not been overloaded explicitly. It has to be placed in the
// that have not been overloaded explicitly. It has to be placed in the
// source code before all other more specialized templates.
template <typename T>
void
Expand Down
2 changes: 1 addition & 1 deletion src/dfu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class DFU {
int dev_idx; /**< device index in dfu_dev */
uint16_t _vid; /**< device Vendor ID */
uint16_t _pid; /**< device Product ID */
int16_t _altsetting; /**< device altesetting */
int16_t _altsetting; /**< device altsetting */
struct libusb_context *usb_ctx; /**< usb context */
libusb_device_handle * dev_handle; /**< current device handle */
int curr_intf; /**< device interface to use */
Expand Down
4 changes: 2 additions & 2 deletions src/dfuFileParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class DFUFileParser: public ConfigBitstreamParser {
DFUFileParser(const std::string &filename, bool verbose);
/*!
* \brief read full content of the file, fill the buffer
* \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwhise
* \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwise
*/
int parse() override;
/*!
* \brief read DFU suffix content of the file, fill _hdr structure
* \return EXIT_SUCCESS if suffix is fully read, EXIT_FAILURE otherwhise
* \return EXIT_SUCCESS if suffix is fully read, EXIT_FAILURE otherwise
*/
int parseHeader();
/*!
Expand Down
2 changes: 1 addition & 1 deletion src/dirtyJtag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum CommandModifier {

struct version_specific
{
uint8_t no_read; // command modifer for xfer no read
uint8_t no_read; // command modifier for xfer no read
uint16_t max_bits; // max bit count that can be transferred
};

Expand Down
2 changes: 1 addition & 1 deletion src/efinixHexParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EfinixHexParser: public ConfigBitstreamParser {
EfinixHexParser(const std::string &filename);
/*!
* \brief read full content of the file, fill the buffer
* \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwhise
* \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwise
*/
int parse() override;
};
Expand Down
8 changes: 4 additions & 4 deletions src/epcq2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ int EPCQ::erase_sector(char start_sector, char nb_sectors)
}
#endif

/* write must be do by 256bytes. Before writting next 256bytes we must
/* write must be do by 256bytes. Before writing next 256bytes we must
* wait for WIP goes low
*/

Expand Down Expand Up @@ -185,7 +185,7 @@ void EPCQ::program(unsigned int start_offset, string filename, bool reverse)

nb_read = fread(rd_buffer, 1, 256, fd);
if (nb_read == 0) {
printf("problem dans le read du fichier source\n");
printf("problem reading the source file\n");
break;
}
buffer[1] = (offset >> 16) & 0xff;
Expand Down Expand Up @@ -262,14 +262,14 @@ void EPCQ::read_id()
_spi->spi_put(0x9F, NULL, rx_buf, 3);
_device_id = rx_buf[2];
if (_verbose)
printf("device id 0x%x attendu 0x15\n", _device_id);
printf("device id 0x%x expected 0x15\n", _device_id);
/* read EPCQ silicon id */
//tx_buf[0] = 0xAB;
/* 3 dummy_byte + 1 byte*/
_spi->spi_put(0xAB, NULL, rx_buf, 4);
_silicon_id = rx_buf[3];
if (_verbose)
printf("silicon id 0x%x attendu 0x14\n", _silicon_id);
printf("silicon id 0x%x expected 0x14\n", _silicon_id);
}

EPCQ::EPCQ(SPIInterface *spi, int8_t verbose):SPIFlash(spi, verbose)
Expand Down
2 changes: 1 addition & 1 deletion src/epcq2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EPCQ: public SPIFlash {

void read_id() override;

//void program(unsigned int start_offet, string filename, bool reverse=true);
//void program(unsigned int start_offset, string filename, bool reverse=true);
//int erase_sector(char start_sector, char nb_sectors);
//void dumpflash(char *dest_file, int size);

Expand Down
4 changes: 2 additions & 2 deletions src/feaparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# define FEA_I2C_DG_FIL_EN (1 << 0) /* I2C deglitch filter enable for Primary I2C Port 0=Disabled (Default), 1=Enabled */
# define FEA_FLASH_PROT_SEC_SEL (0x7 << 1) /* Flash Protection Sector Selection */
# define FEA_MY_ASSP_EN (1 << 4) /* MY_ASSP Enabled 0=Disabled (Default), 1=Enabled */
# define FEA_PROG_PERSIST (1 << 5) /* PROGRAMN Persistence 0=Enabled (Default), 1=Disabled */
# define FEA_PROG_PERSIST (1 << 5) /* PROGRAM Persistence 0=Enabled (Default), 1=Disabled */
# define FEA_INITN_PERSIST (1 << 6) /* INITN Persistence 0=Disabled (Default), 1=Enabled */
# define FEA_DONE_PERSIST (1 << 7) /* DONE Persistence 0=Disabled (Default), 1=Enabled */
# define FEA_JTAG_PERSIST (1 << 8) /* JTAG Port Persistence 0=Enabled (Default), 1=Disabled */
Expand Down Expand Up @@ -73,7 +73,7 @@ FeaParser::FeaParser(string filename, bool verbose):
_featuresRow[i] = 0;
}

/* fill a vector with consecutive lines, begining with 0 or 1, until EOF
/* fill a vector with consecutive lines, beginning with 0 or 1, until EOF
* \brief read a line with '\r''\n' or '\n' termination
* check if last char is '\r'
* \return a vector of lines without [\r]\n
Expand Down
2 changes: 1 addition & 1 deletion src/fsparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int FsParser::parseHeader()
if (buffer[buffer.size()-1] == '\r')
buffer.pop_back();

/* store each line in dedicated buffer for futur use
/* store each line in dedicated buffer for future use
*/
_lstRawData.push_back(buffer);

Expand Down
2 changes: 1 addition & 1 deletion src/ftdiJtagMPSSE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int FtdiJtagMPSSE::writeTDI(uint8_t *tdi, uint8_t *tdo, uint32_t len, bool last)
*/
int tx_buff_size = mpsse_get_buffer_size();
int real_len = (last) ? len - 1 : len; // if its a buffer in a big send send len
// else supress last bit -> with TMS
// else suppress last bit -> with TMS
int nb_byte = real_len >> 3; // number of byte to send
int nb_bit = (real_len & 0x07); // residual bits
int xfer = tx_buff_size - 3;
Expand Down
2 changes: 1 addition & 1 deletion src/ftdispi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int FtdiSpi::spi_put(uint8_t cmd, uint8_t *tx, uint8_t *rx, uint32_t len)
if (tx != NULL)
memcpy(jtx+1, tx, len);

/* send first alreay stored cmd,
/* send first already stored cmd,
* in the same time store each byte
* to next
*/
Expand Down
2 changes: 1 addition & 1 deletion src/fx2_ll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FX2_ll::FX2_ll(uint16_t uninit_vid, uint16_t uninit_pid,
}

/* try to open an already init device
* since fx2 may be not immediatly ready
* since fx2 may be not immediately ready
* retry with a delay
*/
int timeout = 100;
Expand Down
2 changes: 1 addition & 1 deletion src/ihexParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace std;
* 01 -> end of file
* 02 -> extended addr
* 03 -> start segment addr record
* 04 -> extented linear addr record
* 04 -> extended linear addr record
* 05 -> start linear addr record
*/

Expand Down
2 changes: 1 addition & 1 deletion src/jedParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ JedParser::JedParser(string filename, bool verbose):
}

/*!
* \brief read a line with '\r''\n' or '\n' terminaison
* \brief read a line with '\r''\n' or '\n' termination
* check if last char is '\r'
* \return the line without [\r]\n
*/
Expand Down
8 changes: 4 additions & 4 deletions src/jlink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class Jlink: public JtagInterface {
public:
/*!
* \brief contructor: open device
* \brief constructor: open device
* \param[in] clkHz: output clock frequency
* \param[in] verbose: verbose level -1 quiet, 0 normal,
* 1 verbose, 2 debug
Expand All @@ -28,7 +28,7 @@ class Jlink: public JtagInterface {

~Jlink();

// jtagInterface requirement
// jtag Interface requirement
/*!
* \brief configure probe clk frequency
* \param[in] clkHZ: frequency in Hertz
Expand Down Expand Up @@ -58,7 +58,7 @@ class Jlink: public JtagInterface {

/*!
* \brief access ll_write outer this class / directly receives
* fully filled tms, tdi buffers, and optionnally tdo
* fully filled tms, tdi buffers, and optionally tdo
* \param[in] tms: tms buffer
* \param[in] tdi: tdi buffer
* \param[out] tdo: tdo buffer
Expand Down Expand Up @@ -295,7 +295,7 @@ class Jlink: public JtagInterface {
// buffers for xfer, tdi and tdo
// each jlink's buffer have 2K Byte
// enough to send full jtag write
// buffers must be independant
// buffers must be independent
uint8_t _xfer_buf[(2048*2) + 4]; /*!> internal buffer */
uint8_t _tms[2048]; /*!< TMS buffer */
uint8_t _tdi[2048]; /*!< TDI buffer */
Expand Down
2 changes: 1 addition & 1 deletion src/jtag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ int Jtag::flushTMS(bool flush_buffer)

void Jtag::go_test_logic_reset()
{
/* idenpendly to current state 5 clk with TMS high is enough */
/* independently to current state 5 clk with TMS high is enough */
for (int i = 0; i < 6; i++)
setTMS(0x01);
flushTMS(false);
Expand Down
Loading

0 comments on commit 5b0c0db

Please sign in to comment.