Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cologne Chip GateMate integration #148

Merged
merged 11 commits into from
Dec 13, 2021

Conversation

pu-cc
Copy link
Contributor

@pu-cc pu-cc commented Dec 11, 2021

This commit adds support for the Cologne Chip GateMate FPGA series.

Both Evaluation Board and Programmer Cable are supported. Configurations can be loaded into the FPGA with both devices via JTAG or SPI. In addition to reading/writing data from/to flashes directly via SPI, this can also be done via the built-in JTAG-SPI-bypass. A direct wiring between programming hardware and flash is no longer necessary in this case.

  • Added part with JTAG ID to src/part.hpp. We keep the IDCODEs highest nibble to prevent confusion with Efinix T4/T8.
  • Added programmer and board with its relevant information to src/cable.hpp and src/board.hpp.
  • Check the IDCODEs highest nibble in src/jtag.
  • Make FTDIpp_MPSSE a public parent for class FtdiJtagMPSSE so that we can access GPIO functionality.
  • src/colognechipCfgParser.{cpp,hpp} contains the ASCII configuration parser.
  • src/colognechip.{cpp,hpp} contains the basic functionality to write the configuration to FPGA or access external flashes via JTAG/SPI.
  • Usage is described in doc/vendors/colognechip.rst.

Connections of the FT232H-based programming cable:
(ADBUS3..0 configurable for SPI or JTAG communication)

image

Connections of the FT2232H-based evaluation board:
(ADBUS3..0 is JTAG and BDBUS3..0 is SPI)

image

Note that the pin configuration for ~OE, RST, ~FAILED and DONE are valid for both evaluation board and programmer cable. I will link the official datasheets here as soon as they become available.

This commit adds support for the Cologne Chip GateMate FPGA series. Both
Evaluation Board and Programmer Cable are supported. Configurations can be
loaded into the FPGA with both devices via JTAG or SPI. In addition to
reading/writing data from/to flashes directly via SPI, this can also be done
via the built-in JTAG-SPI-bypass. A direct wiring between programming hardware
and flash is no longer necessary in this case.

Signed-off-by: Patrick Urban <patrick.urban@web.de>
@trabucayre
Copy link
Owner

LGTM!
just a small question: you use cfgDone(), with a loop and a timeout, in more: maybe a function like waitCfgDone make sense to factorise this piece of code ?

thanks!

* add missing #include <string>
* add comment to part.hpp why highest nibble should be kept
* remove _reverseOrder variable from colognechipCfgParser.{hpp,cpp}
* rename cfgDone() to to a more meaningfull waitCfgDone()
src/colognechip.cpp Outdated Show resolved Hide resolved
@trabucayre
Copy link
Owner

LGTM (again!)
I just see I have forgotten doc: You need to update:

  • compatibility/board.rst, compatibility/cable.rst, compatibility/fpga.rst
  • README.md and doc/index.rst to add new doc/vendors/colognechip.rst entry

Sorry to missed this before
Thanks

* compatibility/board.rst, compatibility/cable.rst, compatibility/fpga.rst
* README.md and doc/index.rst to add new doc/vendors/colognechip.rst entry
@pu-cc
Copy link
Contributor Author

pu-cc commented Dec 12, 2021

Sure, that was still missing. I just added this - to the best of my knowledge - and hope I didn't break anything in the >build the docs< section...

@trabucayre
Copy link
Owner

Seems ok!
But your branch has to be rebased: there is conflict for fpga.rst

@pu-cc
Copy link
Contributor Author

pu-cc commented Dec 13, 2021

Thanks, should be fine now

@trabucayre trabucayre merged commit 6ba0cb7 into trabucayre:master Dec 13, 2021
@trabucayre
Copy link
Owner

Applied to master!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants