Thursday, 2019-08-29

*** tpb has joined #litex00:00
*** rohitksingh has joined #litex00:09
*** rohitksingh has quit IRC02:41
futarisIRCcloudCool.03:13
*** rohitksingh has joined #litex04:03
*** Dolu has quit IRC04:12
*** Dolu has joined #litex04:12
*** freemint has joined #litex05:35
xobsIs there a SPI slave device available anywhere?05:57
xobsI know it shouldn't be too difficult to create one from scratch, but the clock recovery scares me a little bit and it would be nice to have an existing solution.05:57
futarisIRCcloudxobs: https://github.com/osresearch/spispy/blob/master/spi_device.v ?06:07
tpbTitle: spispy/spi_device.v at master · osresearch/spispy · GitHub (at github.com)06:07
xobsfutarisIRCcloud: nice find!06:08
xobsSome background: I use wishbone-over-USB for debugging, but now I'm having issues with USB enumeration, so I'd like to come up with wishbone-over-SPI.06:08
*** rohitksingh has quit IRC06:11
_florent_xobs: hi, here is somehing i was using a few years ago to control a CSR bus over SPI: https://hastebin.com/idivomeqej.pl (sys_clk is expected to be faster than spi_clk, x4 or more should be fine)06:29
xobs_florent_: wow, you've got a lot of fun projects tucked away.06:30
xobsMind if I adapt that to work with full Wishbone?06:31
_florent_xobs: sure, in fact i was planning to reuse it to add SPI Slave in LiteX but haven't been able to work on that yet06:35
_florent_i was thinking about adding SPISlave to https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi.py06:35
tpbTitle: litex/spi.py at master · enjoy-digital/litex · GitHub (at github.com)06:35
_florent_and then it could be reused to do SPISlave to Wishbone by module that would just handle the wishbone protocol06:36
_florent_i can try to add do the initial SPISlave if you want, then you could the wishbone protocol part?06:38
xobs_florent_: sure. I'm not sure the best way to create a SPI master, really.06:39
xobsMy approach was just to bit-bang it on a Raspberry Pi, which severely limits where you can run it.06:40
xobsHow do people normally interact with SPI devices?06:40
_florent_just to be sure i understand correctly, you want the SPI in the FPGA to be a slave, so that you can do the equivalent of your USB wishbone bridge?06:41
xobs_florent_: correct. Normally people would use a uart, but I don't have the space to fit a uart in there.06:43
_florent_xobs: in most of the project i did, SPI was used as master, that's why slave is not there06:45
xobsThat makes sense.  It's kind of specialized.06:47
_florent_xobs: i added a minimal SPISlave: https://github.com/enjoy-digital/litex/commit/41fe7cae0b5341531f609943d5f70afd6256cfc808:07
tpbTitle: core/spi: add minimal SPISlave · enjoy-digital/litex@41fe7ca · GitHub (at github.com)08:07
_florent_xobs: but i'm not sure it's really convenient to use since full miso is sampled at the beginning of the transfer08:08
_florent_basically, when cs_n is set low, you receive self.start is asserted08:09
_florent_if self.mosi is not set, user has then to set it the cycle self.start is received08:10
_florent_(sorry, self.miso)08:11
_florent_when the transfer ends (cs_n is set high), self.done is set and self.mosi can be used08:11
xobs_florent_: cool!08:11
xobsI'm still working from your previous example -- https://github.com/xobs/spibone/blob/master/spibone.py08:12
tpbTitle: spibone/spibone.py at master · xobs/spibone · GitHub (at github.com)08:12
_florent_self.loopback can be use to do some initial testing08:12
_florent_ok nice, it will maybe be easier to get it done this way, even if you don't use it, SPISlave will still be useful for others things08:15
*** freemint has quit IRC10:29
*** freemint has joined #litex13:12
*** freemint has quit IRC14:35
*** freemint has joined #litex14:37
*** freemint has quit IRC14:37
*** freemint has joined #litex14:39
*** freemint has quit IRC14:39
*** rohitksingh has joined #litex16:08
*** rohitksingh has quit IRC16:40
*** rohitksingh has joined #litex16:44
*** rohitksingh has quit IRC17:32
*** CarlFK has quit IRC17:36
John_Kany pointers how to figure out what the righ IOSTANDARD is here? ISE 14.7 (Win 10 edition) with Spartan6 ERROR:NgdBuild:488 - Attribute value "DIFF_SSTL18_DCI" is not an accepted value for attribute "IOSTANDARD" on "ddram_clock_p".18:24
John_KI get the same for "SSTL18_DCI" on the rest of the ddram signals18:24
John_KI'm fairly new to DDR interfaces and IO standards and am cribbing from other implementations18:25
daveshahI suspect for Spartan 6 you need to remove the _DCI18:26
John_K"SSTL18" had originally given me errors, I guess I'll give "SSTL18_I" a shot18:28
daveshahYou need the _I (there are always two types of SSTL - I and II, I can't remember the exact difference but I think it's drive strength or something)18:29
John_Kaha, thanks18:29
daveshahYou're working on the Pano Logic, right?18:29
John_KG2, yes18:29
daveshahInterested to see how that works out18:30
daveshahCould be a very nice platform18:30
John_Kthanks!18:30
John_KYeah, apparently there is a way to update the SPI over the network using stock firmware18:30
John_Kthat could be a huge help for provisioning units without opening them18:30
John_K"SSTL18_I" made ngdbuild happy18:37
*** freemint has joined #litex18:52
*** rohitksingh has joined #litex19:07
*** freemint has quit IRC19:36
*** rohitksingh has quit IRC19:50
*** freemint has joined #litex20:09
*** freemint has quit IRC20:33
_florent_John_K: if the memory is a DDR2, you should look at the Atlys board20:36
_florent_DDR2DQ620:36
_florent_oops20:36
_florent_https://github.com/timvideos/litex-buildenv/blob/master/platforms/atlys.py#L220-L30220:36
tpbTitle: litex-buildenv/atlys.py at master · timvideos/litex-buildenv · GitHub (at github.com)20:36
_florent_and20:37
_florent_https://github.com/timvideos/litex-buildenv/blob/master/targets/atlys/base.py20:37
tpbTitle: litex-buildenv/base.py at master · timvideos/litex-buildenv · GitHub (at github.com)20:37
*** freemint has joined #litex20:44
mithrohey John_K - did we meet at CCCamp19?21:43
*** freemint has quit IRC21:59
*** freemint has joined #litex21:59
John_K_florent_: aha thanks, I think I looked at a combination of mimasv2 and minispartan622:06
John_Kmithro: we did not, I did some Cypress FX firmware loading stuff a year or two ago though22:06
*** rohitksingh has joined #litex22:11
mithroJohn_K: What made you decide to start hacking on RISC-V for the Pano Logic?22:20
mithroJohn_K: I noticed that your in the bay area? I am also...22:21
*** rohitksingh has quit IRC22:30
*** freemint has quit IRC22:52
*** rohitksingh has joined #litex22:56
futarisIRCcloudJohn_K: I'll be in the bay area next week too.22:58
*** freemint has joined #litex23:17
*** freemint has quit IRC23:22
*** rohitksingh has quit IRC23:24
*** freemint has joined #litex23:31
*** CarlFK has joined #litex23:39
*** freeemint has joined #litex23:41
*** freemint has quit IRC23:43
*** freeemint has quit IRC23:57

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!