Monday, 2019-06-10

*** tpb has joined #yosys00:00
*** pacak has quit IRC00:29
*** pacak has joined #yosys00:29
*** emeb_mac has joined #yosys00:53
*** gsi__ has joined #yosys01:25
*** gsi_ has quit IRC01:28
*** lutsabound has quit IRC01:45
*** proteusguy has quit IRC02:40
*** PyroPeter has quit IRC03:04
*** citypw has joined #yosys03:16
*** PyroPeter has joined #yosys03:17
*** AlexDaniel has quit IRC03:19
*** citypw has quit IRC03:32
*** rohitksingh_work has joined #yosys04:43
*** stuckpixel has joined #yosys05:29
*** proteusguy has joined #yosys06:34
*** proteusguy has quit IRC06:40
*** cr1901 has joined #yosys06:58
*** cr1901 has quit IRC06:58
*** emeb_mac has quit IRC07:07
*** m4ssi has joined #yosys07:22
*** futarisIRCcloud has joined #yosys08:00
corecodeso i'm trying to figure out why i get a context check assertion08:36
corecodeafter my rgb modifications08:36
daveshahcorecode: most likely that net users or driver doesn't match the net stored on the cell port08:44
tntcorecode: is your current code on github ?08:46
*** gsi__ is now known as gsi_08:47
corecodenot yet09:10
corecodei tried figuring it out first09:10
corecodeoh now i got it to work09:32
corecodeoO09:32
corecodesomething about not erasing in a loop09:34
corecodei guess09:34
tntAh yeah, you can't iterate over something you modify.09:35
tntIn nextpnr usually it creates a list of 'to delete' during iteration and then does the actual deletion.09:36
corecodehttps://github.com/YosysHQ/nextpnr/compare/master...corecode:u4k?expand=109:40
tpbTitle: Comparing YosysHQ:master...corecode:u4k · YosysHQ/nextpnr · GitHub (at github.com)09:40
corecodehm09:49
corecodeERROR: Module `\SB_LED_DRV_CUR' referenced in module `\top' in cell `\led_drv_cur' is not part of the design.09:49
corecodewho says that, and what does it mean09:49
corecodethis is during icefuzz make timings09:49
tnthuh line 1056 arch.cc is weird ... like you changed your mind.09:50
corecodeyes, because i did09:51
corecodeheh09:51
corecodethanks09:51
corecodeah i need a hierarchy generate statement in timings.ys09:52
*** stuckpixel has quit IRC09:56
corecodehttps://github.com/cliffordwolf/icestorm/compare/master...corecode:u4k?expand=109:56
tpbTitle: Comparing cliffordwolf:master...corecode:u4k · cliffordwolf/icestorm · GitHub (at github.com)09:56
tntcorecode: my only issue ith the code is that during a time you have the RGBPU port that still exists and still has a 'net' pointer in it that points to free'd memory.09:59
tnt(AFAIU)10:00
corecodei think they are smart pointers10:00
corecodebut yes, i agree that it isn't great10:00
corecodewell, unique_pointer10:00
daveshahCan't you just set the port net to nullptr here: https://github.com/YosysHQ/nextpnr/compare/master...corecode:u4k?expand=1#diff-ca9370dbce6cd2a98691928e85456f53R112110:00
tpbTitle: Comparing YosysHQ:master...corecode:u4k · YosysHQ/nextpnr · GitHub (at github.com)10:01
corecodeah10:01
daveshahuser.cell->ports.at(user.port).net = nullptr10:01
corecodehttps://github.com/YosysHQ/yosys/compare/master...corecode:u4k?expand=110:01
tpbTitle: Comparing YosysHQ:master...corecode:u4k · YosysHQ/yosys · GitHub (at github.com)10:01
corecodeand never delete the port?10:03
corecodeor still delete it10:03
daveshahProbably best to delete it too10:06
corecodeok10:07
*** futarisIRCcloud has quit IRC10:10
*** citypw has joined #yosys10:23
*** citypw has quit IRC10:28
*** proteusguy has joined #yosys10:41
corecodeok, i submitted the changes as PRs10:49
tntcorecode: did you test the resulting bitstream ?10:54
corecodei'm on it right now10:54
corecodeso the bitstream fails to configure if the drive strength is not set properly11:01
corecodeshould we warn/fail during pnr?11:02
corecodei don't think we do for RGBA11:02
corecodealso i don't know whether the current limit works11:02
tntwhat do you mean not set properly ?11:03
corecodeall 0s, for example11:03
corecodei.e. the default11:03
corecodeah yea i can observe a change in LED brightness11:04
corecodethat means the current limit does do something11:04
*** proteusguy has quit IRC11:04
daveshahYes, it would probably be good to add a warning for that case if it produces a bitstream that doesn't work at all11:05
daveshahif not an error11:05
corecodewhere would you add that11:06
corecodein bitstream or in pack?11:06
*** futarisIRCcloud has joined #yosys11:06
daveshahIn pack would probably be best11:06
corecodeaaah11:07
corecodehang on11:07
corecode"0b000000" = 0mA. // Set this value to use the associated SB_IO_OD instance at RGB11:07
corecode // LED location.11:07
corecodeso why wouldn't it configure?11:07
corecodeweird11:07
tntYeah, I find it weird that it would not configure at all.11:07
corecodemaybe it did11:07
daveshahDo you have anything on those pins?11:07
corecodei think it could be my misinterpretation11:08
*** proteusguy has joined #yosys12:13
corecodeok, i pushed a new version12:15
*** develonepi3 has joined #yosys12:53
*** rohitksingh_work has quit IRC13:10
*** vonnieda has quit IRC13:55
*** futarisIRCcloud has quit IRC14:06
*** wifasoi has joined #yosys14:21
*** vonnieda has joined #yosys14:24
*** emeb has joined #yosys14:27
*** rohitksingh has joined #yosys14:49
corecodedaveshah: thanks for committing14:52
*** vonnieda has quit IRC14:55
*** vonnieda has joined #yosys14:56
emebcorecode: so you're just waiting for clifford to approve the icestorm pr?15:11
*** Laksen has joined #yosys15:35
corecodeyes15:59
*** m4ssi has quit IRC16:10
*** dxld_ has joined #yosys16:15
*** dxld has quit IRC16:17
*** dxld_ is now known as dxld16:17
*** rohitksingh has quit IRC16:29
*** wifasoi has quit IRC16:41
*** dxld has quit IRC16:47
*** dxld has joined #yosys16:50
*** rohitksingh has joined #yosys17:00
*** maikmerten has joined #yosys17:19
maikmertenheh, making Mandelbrot slow again:17:30
maikmertenhttps://paste.debian.net/1087268/17:30
tpbTitle: debian Pastezone (at paste.debian.net)17:30
maikmerten(my RV32I core @25.125 MHz, doing everything in soft-float)17:30
emebNice17:35
emebmaikmerten: what FPGA is that running on?17:38
maikmertenice40 HX8K17:38
maikmertenabout 1000 - 1100 LEs for the CPU17:38
maikmerten(of 7680)17:38
maikmertenwith single-cycle shift operations, resource consumption goes up to about ~1300 LEs for the CPU17:39
emebnot bad. your own design for risc-v?17:39
maikmertenand then it renders in ~32000 ms17:39
maikmertenyup17:39
emebfun17:39
maikmertenyes, indeed!17:39
emebJust serial I/O for now?17:40
maikmertenno, it also has 640x480@16 colors VGA-signal output17:41
maikmertenbut I haven't wired that mandelbrot renderer to the VGA framebuffer yet17:41
emebdoo eeet!17:41
maikmertenoh, I will. I will.17:42
emebI imagine that will take some time tho ;)17:42
emeb(to render)17:43
maikmertenyes, and will also make the CPU ~20% slower17:43
maikmerten(because the VGA unit will steal every other RAM clock cycle when in active display region)17:43
emebHmm...17:43
maikmertenso that whole thing is pretty much like a Sinclair Spectrum: If you want to go fast, you have to disable display output ;-)17:44
emebExternal RAM I suppose.17:44
maikmertenyes, 512kx8 SRAM17:45
tntmaikmerten: how much cycle per instruction do you use ?17:45
emebCan't run the RAM interface @ 2x and interleave access?17:45
maikmertenemeb, in theory, yes. I don't trust such high-frequency operations over 2.54 mm pin headers, though. Also I don't trust my board design ;-)17:46
maikmertentnt, oh, quite a lot, actually17:47
maikmertenI have a state diagram somewhere, wait a sec17:47
emebmaikmerten: should at least try - you may be pleasantly surprised.17:47
maikmertentnt, https://imgur.com/a/gBZznrQ17:48
tpbTitle: Imgur: The magic of the Internet (at imgur.com)17:48
maikmertenemeb, yeah :-)17:49
maikmertenthe usual ALU-Ops work in fetch - decode - exec, so three states17:49
maikmerten(I do register writeback in fetch)17:50
emebmaikmerten: I've done SDR stuff @ 40-80MSPS over 2.54mm pin headers w/ Lattice & Xilinx parts on my own boards and it worked fine.17:50
*** Laksen has quit IRC17:51
maikmertenHOWEVER, my SRAM is 8 bits wide, instructions are 32 bit, so I need 4 accesses to SRAM - plus one cycle to get things moving. So 5 cycles are spent on fetch. So that is the bottleneck17:51
maikmertenemeb, ah, that's good to hear17:51
maikmertenemeb, my extension board design might be horrible, though: https://github.com/maikmerten/hx8k-breakout-extension17:52
tpbTitle: GitHub - maikmerten/hx8k-breakout-extension: A PCB with SRAM, buttons, LEDs and some pmod-compatible connectors for the Lattice HX8K Breakout Board (at github.com)17:52
maikmertensignals look good on the oscilloscope, though17:52
maikmerten(and yes, one single pin-connector does not have enough signals for that SRAM, so I have to borrow signals from two)17:52
emebmaikmerten: what HX8k board are you using?17:54
tntI pushed 300 Mbps though a 2.54mm connector not that long ago.17:55
maikmertenemeb, that one: https://www.mouser.de/ProductDetail/Lattice/ICE40HX8K-B-EVN?qs=ooqgTKD20drSds2K%2FEAnQg==17:55
maikmertenit's a wacky little board, with a lot of IO accessible.17:55
emebindeed17:55
maikmertencurrently on its way from asia is another extension board, which will give me another three pmod-ports (and one IR-receiver)17:57
emebRAM is one of the reasons I prefer the iCE40 Ultra Plus over the HX, even though its got slower timing.17:58
maikmertenyeah, the embedded SPRAM is a big bonus17:58
emebhaving 128kB on-chip makes small system design a whole lot easier.17:59
maikmertenindeed.17:59
maikmertenbut I was hell-bent on 640x480 with at least 16 colors, so that doesn't fit17:59
maikmertenwith 512kx8 I even have room for several framebuffers (err... exactly three), so I could do double-buffering if needed18:00
emebNice18:00
emebtnt has an interesting video system in the works with lots of indirection that manages to do some nice hi-res color in minimal RAM using lots of maps and tiling.18:01
maikmerten(also allows for simple and zero-CPU scrolling: https://drive.google.com/open?id=1CbMtQZBxJyuepFnHBiFgf9rDobqatjGK )18:02
tpbTitle: vgascroll.mp4 - Google Drive (at drive.google.com)18:02
emebThat looks very nice18:02
maikmertenthanks. Horrible phone-video though.18:03
maikmertenyeah, with tiling or char-based graphics one can do wonderful things in very little RAM18:04
maikmerten(see GameBoy or basically any 8- or 16-bit video console)18:05
maikmertenhttps://www.youtube.com/watch?v=HyzD8pNlpwI <-- worth everyone's time18:05
emebI've been working on an 800x600 VGA using 8x8 characters w/ 16 color fore/back selectable on a per-char basis. Full screen fits in < 16kB18:06
maikmertenoh, nice18:10
maikmertenI also have a primitive 40x30 text mode, 8x8 pixels per character, 8 bit color (split for fore- and background)18:11
maikmertencurrently uploading a little demo18:11
maikmertenthat one is reasonably fast ;-)18:11
maikmerten(upload takes forever)18:17
maikmerten(yeah consumer DSL)18:17
emebheh18:17
maikmerten(~66% done)18:18
emebI need to add a pixel-graphics mode to mine. It'll be just 1bpp and 400x300 to keep it fitting in the available RAM, but at least I can draw monochrome stuff.18:18
maikmertenyeah, that'd still be very useful18:19
maikmertenkeep in mind the first Mac was 1bpp, too18:19
emebTrue. You can do a lot w/ a bit of dithering.18:22
tntI also tried temporal dithering, how it turns out highly depend on the screen. PC monitors tend to be fine. TVs ... not.18:31
emebinteresting.18:32
maikmertennon-optional Bad Apple demo: https://drive.google.com/file/d/1-6S2-pWhovTNroUEn83Zp2s6kCquv7ds/view18:34
tpbTitle: badapple.mp4 - Google Drive (at drive.google.com)18:34
emebcute. how did you get all that data into the FPGA?18:36
maikmertenemeb, there's a 32 MBit SPI-Flash device (that tiny board hanging onto the SRAM-extension board, visible at around ~0:40)18:37
maikmertenit's all character-based graphics, but the font is not hardcoded. The font is generated on my PC by reading in all frames, determining all 8x8 pixel blocks - and then doing k-means clustering18:39
tntneat !18:40
maikmertenso I basically have one 256-entry codebook, and every frame is 1200 bytes18:40
maikmertenbut I compress that down with simple run-length encoding18:40
emebamaze18:40
tntDefinitely would be interested to see that code :)18:40
maikmertenso on average every frame is about 280 bytes18:40
emebhaha18:41
emebI guess that explains the "torn paper" edges.18:41
maikmertenheh18:41
emeb"art"18:41
maikmertenyes18:41
maikmertenit's basically very bad vector quantization, but in motion things end up being "fine-ish"18:42
emeblooks like your changing the color sometimes too18:43
maikmertennope, I don't. Camera cleverness, I guess.18:43
emebhow does white balance work? :)18:44
maikmerten"badly"18:44
maikmertentnt, oh, I can provide the code. It's horrible.18:46
maikmertentnt, on a scale of evilness, it's about 8.79 metric Cthulus18:47
emeblol18:48
emeb"Disclaimer: running this (or even looking at it too long) may invoke Old Gods"18:48
tntlol18:48
maikmertenthis is the player code that runs on the RV32I-CPU: https://paste.debian.net/1087282/18:50
tpbTitle: debian Pastezone (at paste.debian.net)18:50
maikmerten(eeek. Also, I'm not really a C guy. It is messy, but compact. I'm so sorry. So very very sorry.)18:50
tntDoesn't really look that bad.18:51
emebseems fine to me.18:52
maikmertenwell, for instance, I think in 2019 one *could* use stuff like uint8_t and whatnot instead of char.18:53
maikmertenbut I know the bittyness of the various types on RV32 and I don't plan for a port, so... lazy.18:53
emebof all the things to worry about, that rates pretty low.18:54
maikmertenI also cast things around until GCC gives up complaining, so there's that18:55
tntyeah sure, of course. and uint8_t works fine :p18:55
tntFor instance look at https://github.com/smunaut/ice40-playground/blob/usb-test/projects/riscv_usb/fw/spi.c#L3118:56
tpbTitle: ice40-playground/spi.c at usb-test · smunaut/ice40-playground · GitHub (at github.com)18:56
tntand a few lines later the definition of spi_regs18:56
*** rohitksingh has quit IRC18:57
tntthis is how I do hw registers now and it works and maps fine without any overhead vs directly doing the lenghty *((volatile char*)REG_ADDRESS)18:57
maikmertenheh18:57
maikmertenoh, and the compressor that compresses the animation is written in Java. Anyone really wants to see *that* code?18:59
tnthehe, sure.18:59
maikmerteneeek.18:59
tntAlthough I don't really like most implementations of java, I actually find the language pretty nice. Haven't used it in forever but I loved the concept of interface / implemtation and also the fact it came with a standard lib that was actually useful.19:00
tntCompared to other languages at the time, I think it was nice.19:00
tntbtw, I found that talk interesting https://www.youtube.com/watch?v=zBkNBP00wJE    using modern C++ constructs for small cpu without overhead :)19:02
maikmertentnt, here you go: https://paste.debian.net/1087286/19:02
tpbTitle: debian Pastezone (at paste.debian.net)19:02
maikmertenthe pain starts... NOW!19:02
tntinteresting way to ship files :p19:03
emebrofl19:03
maikmertenhehe19:03
maikmertenit's inspired by some RFC file attachements19:04
maikmertenfor instance, for the Opus audio codec, the reference implementation is enclosed as base64-encoded tarball19:04
tntyou have audio in that demo as well ?19:05
maikmertentnt, not yet19:07
maikmertenI have vague plans of doing PWM-based audio output19:07
maikmerten(in the FPGA)19:07
maikmertenbut I first need to construct a lowpass-thingie that turns that into something non-horrible19:08
corecodetnt: thanks19:08
emebmaikmerten: that's easy.19:08
maikmertenthe ADPCM-decoder in that tarball is just to demonstrate to myself that I understand how to decode that audio19:09
*** develonepi3 has quit IRC19:09
tntcorecode: for what ?19:09
tnt(I mean, I'll take it, but ... still I wonder)19:09
maikmerten(so the audio would be ADPCM-compressed, decoded by the RV32 CPU, and then written to a PWM output)19:09
tntmaikmerten: make it PDM rather than PWM :)19:10
maikmertenemeb, I think I should construct a Butterworth lowpass19:10
maikmertentnt, PDM?19:10
tntPulse Density Modulation.  AKA  Delta Sigma.19:10
maikmertenah, k19:11
tnthttps://github.com/smunaut/ice40-playground/blob/usb-test/cores/misc/rtl/pdm.v19:11
maikmertenI should research into that19:11
tpbTitle: ice40-playground/pdm.v at usb-test · smunaut/ice40-playground · GitHub (at github.com)19:11
tntBasically this pushes the noise at much higher frequencies than PWM, making it easier to filter out.19:11
maikmertenah, neat19:12
maikmertenthanks19:12
tntand in FPGA you can do PDM just as easy as PWM.19:12
corecodetnt: the video19:12
tntIn microcontroller usually not ... they have pwm peripheral but not pdm.19:12
tntcorecode: Ah oki :) Yeah it's fun stuff.19:12
maikmertenyeah, the idea of using PWM is basically µC-inspired19:13
maikmertenfor instance, how the RPi handles its audio19:13
maikmerten(well, that is not a µC)19:13
maikmertenbut if PDM pushes the noise much higher, then I can get away with a less steep lowpass19:14
tntExactly :)19:14
maikmertenperhaps RC or whatever19:14
tntYeah and if you have 45 min to waste you can listen to my rambling about tricks to increase precisions and lower noise even more : https://www.youtube.com/watch?v=2pAy5DvuidA19:18
maikmertensubscribed.19:19
tntHeh thanks :)19:22
maikmertenbtw, this is my very safe proposal for a Steam-replacement: https://paste.debian.net/1087287/19:24
tpbTitle: debian Pastezone (at paste.debian.net)19:24
maikmerten(contains a game. It's harmless.)19:25
maikmertenbut somehow people freak out when I just append an autostart feature. Dunnowhy ;-)19:25
maikmerten(small board game, with AI)19:26
tntmaikmerten: fun :)  Did you port it to your riscv ?19:36
maikmertentnt, yup19:37
maikmertenthat's why on normal environments it needs -DSTDLIB to build19:37
maikmerten(using proper functions instead of my wacky input stuff)19:38
tntyeah, I suspected :p19:38
maikmertenI originally wrote it for the Commodore 6419:38
maikmerten(yes, in C)19:38
maikmerten(which is why comments refer to multiple files)19:39
maikmertenthere's nothing neater than a 1 MHz machine outsmarting people (in that particular scenario)19:39
tnt:)19:39
maikmertenhttps://csdb.dk/release/?id=130405 <-- there19:40
tpbTitle: [CSDb] - Nuclear Reaction 2100 by Really Proud Lamers (2014) (at csdb.dk)19:40
tntOh nice. I never had a C64 (although I've been watching a lot of retro video on yt recently which included a lot of c64 stuff :p)19:43
cr1901_modernmaikmerten: This game of yours stole my passwords and drained my bank accounts :(19:46
maikmertenthat's unfortunate. Sorry.19:50
cr1901_modern:P19:52
*** togo has joined #yosys20:01
*** maikmerten has quit IRC20:52
emebtnt: interesting looking at your pdm.v module vs the way I did it.20:57
emebyour acc preserves the overflow bit from one cycle to the next - mine always resets it.20:57
emebmine sounds fine though, so I'm curious about the difference.20:57
tntI'm not sure there is one because I add { acc[WIDTH], in } .... so that bit will always be reset if it's one.20:58
emebAh ok.20:59
emebSeems the do the same thing, just via slightly different syntax.20:59
tntyeah :)20:59
emebDo you notice much difference in audio quality w/ dither turned on?21:01
tntemeb: I have not used it for sound21:01
emebtnt: just for a DAC for generating control voltages?21:02
tntyup21:02
tntat some point I want to try and write a small sound core but didn't get to it yet ..21:04
emebthe one I did is pretty simple - fun thing is you can sum multiple channels into a single Sigma-Delta acc.21:05
emebmixes just fine.21:06
*** vonnieda has quit IRC22:14
*** vonnieda has joined #yosys22:14
*** vonnieda has quit IRC22:38
*** togo has quit IRC22:59

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