Merge pull request #706 from betrusted-io/master

add a hook for activating the GSR inside the STARTUPE2 block for spi_opi
This commit is contained in:
bunnie 2020-11-24 00:29:14 +08:00 committed by GitHub
commit 119062c068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ class S7SPIOPI(Module, AutoCSR, AutoDoc):
self.iddr_name = iddr_name
self.cipo_name = cipo_name
self.spiread = spiread
self.gsr = Signal()
self.dq = dq = TSTriple(7) # dq[0] is special because it is also copi
self.dq_copi = dq_copi = TSTriple(1) # this has similar structure but an independent "oe" signal
@ -289,7 +290,7 @@ class S7SPIOPI(Module, AutoCSR, AutoDoc):
# De-activate the CCLK interface, parallel it with a GPIO
Instance("STARTUPE2",
i_CLK = 0,
i_GSR = 0,
i_GSR = self.gsr,
i_GTS = 0,
i_KEYCLEARB = 0,
i_PACK = 0,