clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
pacak has quit [Quit: Leaving.]
pacak has joined #yosys
emeb_mac has joined #yosys
gsi__ has joined #yosys
gsi_ has quit [Ping timeout: 246 seconds]
lutsabound has quit [Quit: Connection closed for inactivity]
proteusguy has quit [Remote host closed the connection]
PyroPeter has quit [Ping timeout: 252 seconds]
citypw has joined #yosys
PyroPeter has joined #yosys
AlexDaniel has quit [Ping timeout: 272 seconds]
citypw has quit [Ping timeout: 258 seconds]
rohitksingh_work has joined #yosys
stuckpixel has joined #yosys
proteusguy has joined #yosys
proteusguy has quit [Remote host closed the connection]
cr1901 has joined #yosys
cr1901 has quit [Client Quit]
emeb_mac has quit [Ping timeout: 248 seconds]
m4ssi has joined #yosys
futarisIRCcloud has joined #yosys
<corecode> so i'm trying to figure out why i get a context check assertion
<corecode> after my rgb modifications
<daveshah> corecode: most likely that net users or driver doesn't match the net stored on the cell port
<tnt> corecode: is your current code on github ?
gsi__ is now known as gsi_
<corecode> not yet
<corecode> i tried figuring it out first
<corecode> oh now i got it to work
<corecode> oO
<corecode> something about not erasing in a loop
<corecode> i guess
<tnt> Ah yeah, you can't iterate over something you modify.
<tnt> In nextpnr usually it creates a list of 'to delete' during iteration and then does the actual deletion.
<tpb> Title: Comparing YosysHQ:master...corecode:u4k · YosysHQ/nextpnr · GitHub (at github.com)
<corecode> hm
<corecode> ERROR: Module `\SB_LED_DRV_CUR' referenced in module `\top' in cell `\led_drv_cur' is not part of the design.
<corecode> who says that, and what does it mean
<corecode> this is during icefuzz make timings
<tnt> huh line 1056 arch.cc is weird ... like you changed your mind.
<corecode> yes, because i did
<corecode> heh
<corecode> thanks
<corecode> ah i need a hierarchy generate statement in timings.ys
stuckpixel has quit [Ping timeout: 248 seconds]
<tpb> Title: Comparing cliffordwolf:master...corecode:u4k · cliffordwolf/icestorm · GitHub (at github.com)
<tnt> corecode: 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.
<tnt> (AFAIU)
<corecode> i think they are smart pointers
<corecode> but yes, i agree that it isn't great
<corecode> well, unique_pointer
<tpb> Title: Comparing YosysHQ:master...corecode:u4k · YosysHQ/nextpnr · GitHub (at github.com)
<corecode> ah
<daveshah> user.cell->ports.at(user.port).net = nullptr
<tpb> Title: Comparing YosysHQ:master...corecode:u4k · YosysHQ/yosys · GitHub (at github.com)
<corecode> and never delete the port?
<corecode> or still delete it
<daveshah> Probably best to delete it too
<corecode> ok
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
citypw has joined #yosys
citypw has quit [Client Quit]
proteusguy has joined #yosys
<corecode> ok, i submitted the changes as PRs
<tnt> corecode: did you test the resulting bitstream ?
<corecode> i'm on it right now
<corecode> so the bitstream fails to configure if the drive strength is not set properly
<corecode> should we warn/fail during pnr?
<corecode> i don't think we do for RGBA
<corecode> also i don't know whether the current limit works
<tnt> what do you mean not set properly ?
<corecode> all 0s, for example
<corecode> i.e. the default
<corecode> ah yea i can observe a change in LED brightness
<corecode> that means the current limit does do something
proteusguy has quit [Remote host closed the connection]
<daveshah> Yes, it would probably be good to add a warning for that case if it produces a bitstream that doesn't work at all
<daveshah> if not an error
<corecode> where would you add that
<corecode> in bitstream or in pack?
futarisIRCcloud has joined #yosys
<daveshah> In pack would probably be best
<corecode> aaah
<corecode> hang on
<corecode> "0b000000" = 0mA. // Set this value to use the associated SB_IO_OD instance at RGB
<corecode> // LED location.
<corecode> so why wouldn't it configure?
<corecode> weird
<tnt> Yeah, I find it weird that it would not configure at all.
<corecode> maybe it did
<daveshah> Do you have anything on those pins?
<corecode> i think it could be my misinterpretation
proteusguy has joined #yosys
<corecode> ok, i pushed a new version
develonepi3 has joined #yosys
rohitksingh_work has quit [Read error: Connection reset by peer]
vonnieda has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
wifasoi has joined #yosys
vonnieda has joined #yosys
emeb has joined #yosys
rohitksingh has joined #yosys
<corecode> daveshah: thanks for committing
vonnieda has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vonnieda has joined #yosys
<emeb> corecode: so you're just waiting for clifford to approve the icestorm pr?
Laksen has joined #yosys
<corecode> yes
m4ssi has quit [Remote host closed the connection]
dxld_ has joined #yosys
dxld has quit [Ping timeout: 252 seconds]
dxld_ is now known as dxld
rohitksingh has quit [Ping timeout: 248 seconds]
wifasoi has quit [Remote host closed the connection]
dxld has quit [Ping timeout: 248 seconds]
dxld has joined #yosys
rohitksingh has joined #yosys
maikmerten has joined #yosys
<maikmerten> heh, making Mandelbrot slow again:
<tpb> Title: debian Pastezone (at paste.debian.net)
<maikmerten> (my RV32I core @25.125 MHz, doing everything in soft-float)
<emeb> Nice
<emeb> maikmerten: what FPGA is that running on?
<maikmerten> ice40 HX8K
<maikmerten> about 1000 - 1100 LEs for the CPU
<maikmerten> (of 7680)
<maikmerten> with single-cycle shift operations, resource consumption goes up to about ~1300 LEs for the CPU
<emeb> not bad. your own design for risc-v?
<maikmerten> and then it renders in ~32000 ms
<maikmerten> yup
<emeb> fun
<maikmerten> yes, indeed!
<emeb> Just serial I/O for now?
<maikmerten> no, it also has 640x480@16 colors VGA-signal output
<maikmerten> but I haven't wired that mandelbrot renderer to the VGA framebuffer yet
<emeb> doo eeet!
<maikmerten> oh, I will. I will.
<emeb> I imagine that will take some time tho ;)
<emeb> (to render)
<maikmerten> yes, and will also make the CPU ~20% slower
<maikmerten> (because the VGA unit will steal every other RAM clock cycle when in active display region)
<emeb> Hmm...
<maikmerten> so that whole thing is pretty much like a Sinclair Spectrum: If you want to go fast, you have to disable display output ;-)
<emeb> External RAM I suppose.
<maikmerten> yes, 512kx8 SRAM
<tnt> maikmerten: how much cycle per instruction do you use ?
<emeb> Can't run the RAM interface @ 2x and interleave access?
<maikmerten> emeb, 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 ;-)
<maikmerten> tnt, oh, quite a lot, actually
<maikmerten> I have a state diagram somewhere, wait a sec
<emeb> maikmerten: should at least try - you may be pleasantly surprised.
<tpb> Title: Imgur: The magic of the Internet (at imgur.com)
<maikmerten> emeb, yeah :-)
<maikmerten> the usual ALU-Ops work in fetch - decode - exec, so three states
<maikmerten> (I do register writeback in fetch)
<emeb> maikmerten: I've done SDR stuff @ 40-80MSPS over 2.54mm pin headers w/ Lattice & Xilinx parts on my own boards and it worked fine.
Laksen has quit [Quit: Leaving]
<maikmerten> HOWEVER, 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 bottleneck
<maikmerten> emeb, ah, that's good to hear
<maikmerten> emeb, my extension board design might be horrible, though: https://github.com/maikmerten/hx8k-breakout-extension
<tpb> Title: 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)
<maikmerten> signals look good on the oscilloscope, though
<maikmerten> (and yes, one single pin-connector does not have enough signals for that SRAM, so I have to borrow signals from two)
<emeb> maikmerten: what HX8k board are you using?
<tnt> I pushed 300 Mbps though a 2.54mm connector not that long ago.
<maikmerten> it's a wacky little board, with a lot of IO accessible.
<emeb> indeed
<maikmerten> currently on its way from asia is another extension board, which will give me another three pmod-ports (and one IR-receiver)
<emeb> RAM is one of the reasons I prefer the iCE40 Ultra Plus over the HX, even though its got slower timing.
<maikmerten> yeah, the embedded SPRAM is a big bonus
<emeb> having 128kB on-chip makes small system design a whole lot easier.
<maikmerten> indeed.
<maikmerten> but I was hell-bent on 640x480 with at least 16 colors, so that doesn't fit
<maikmerten> with 512kx8 I even have room for several framebuffers (err... exactly three), so I could do double-buffering if needed
<emeb> Nice
<emeb> tnt 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.
<maikmerten> (also allows for simple and zero-CPU scrolling: https://drive.google.com/open?id=1CbMtQZBxJyuepFnHBiFgf9rDobqatjGK )
<tpb> Title: vgascroll.mp4 - Google Drive (at drive.google.com)
<emeb> That looks very nice
<maikmerten> thanks. Horrible phone-video though.
<maikmerten> yeah, with tiling or char-based graphics one can do wonderful things in very little RAM
<maikmerten> (see GameBoy or basically any 8- or 16-bit video console)
<maikmerten> https://www.youtube.com/watch?v=HyzD8pNlpwI <-- worth everyone's time
<emeb> I'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 < 16kB
<maikmerten> oh, nice
<maikmerten> I also have a primitive 40x30 text mode, 8x8 pixels per character, 8 bit color (split for fore- and background)
<maikmerten> currently uploading a little demo
<maikmerten> that one is reasonably fast ;-)
<maikmerten> (upload takes forever)
<maikmerten> (yeah consumer DSL)
<emeb> heh
<maikmerten> (~66% done)
<emeb> I 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.
<maikmerten> yeah, that'd still be very useful
<maikmerten> keep in mind the first Mac was 1bpp, too
<emeb> True. You can do a lot w/ a bit of dithering.
<tnt> I also tried temporal dithering, how it turns out highly depend on the screen. PC monitors tend to be fine. TVs ... not.
<emeb> interesting.
<tpb> Title: badapple.mp4 - Google Drive (at drive.google.com)
<emeb> cute. how did you get all that data into the FPGA?
<maikmerten> emeb, there's a 32 MBit SPI-Flash device (that tiny board hanging onto the SRAM-extension board, visible at around ~0:40)
<maikmerten> it'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 clustering
<tnt> neat !
<maikmerten> so I basically have one 256-entry codebook, and every frame is 1200 bytes
<maikmerten> but I compress that down with simple run-length encoding
<emeb> amaze
<tnt> Definitely would be interested to see that code :)
<maikmerten> so on average every frame is about 280 bytes
<emeb> haha
<emeb> I guess that explains the "torn paper" edges.
<maikmerten> heh
<emeb> "art"
<maikmerten> yes
<maikmerten> it's basically very bad vector quantization, but in motion things end up being "fine-ish"
<emeb> looks like your changing the color sometimes too
<maikmerten> nope, I don't. Camera cleverness, I guess.
<emeb> how does white balance work? :)
<maikmerten> "badly"
<maikmerten> tnt, oh, I can provide the code. It's horrible.
<maikmerten> tnt, on a scale of evilness, it's about 8.79 metric Cthulus
<emeb> lol
<emeb> "Disclaimer: running this (or even looking at it too long) may invoke Old Gods"
<tnt> lol
<maikmerten> this is the player code that runs on the RV32I-CPU: https://paste.debian.net/1087282/
<tpb> Title: debian Pastezone (at paste.debian.net)
<maikmerten> (eeek. Also, I'm not really a C guy. It is messy, but compact. I'm so sorry. So very very sorry.)
<tnt> Doesn't really look that bad.
<emeb> seems fine to me.
<maikmerten> well, for instance, I think in 2019 one *could* use stuff like uint8_t and whatnot instead of char.
<maikmerten> but I know the bittyness of the various types on RV32 and I don't plan for a port, so... lazy.
<emeb> of all the things to worry about, that rates pretty low.
<maikmerten> I also cast things around until GCC gives up complaining, so there's that
<tnt> yeah sure, of course. and uint8_t works fine :p
<tpb> Title: ice40-playground/spi.c at usb-test · smunaut/ice40-playground · GitHub (at github.com)
<tnt> and a few lines later the definition of spi_regs
rohitksingh has quit [Remote host closed the connection]
<tnt> this 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)
<maikmerten> heh
<maikmerten> oh, and the compressor that compresses the animation is written in Java. Anyone really wants to see *that* code?
<tnt> hehe, sure.
<maikmerten> eeek.
<tnt> Although 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.
<tnt> Compared to other languages at the time, I think it was nice.
<tnt> btw, I found that talk interesting https://www.youtube.com/watch?v=zBkNBP00wJE using modern C++ constructs for small cpu without overhead :)
<maikmerten> tnt, here you go: https://paste.debian.net/1087286/
<tpb> Title: debian Pastezone (at paste.debian.net)
<maikmerten> the pain starts... NOW!
<tnt> interesting way to ship files :p
<emeb> rofl
<maikmerten> hehe
<maikmerten> it's inspired by some RFC file attachements
<maikmerten> for instance, for the Opus audio codec, the reference implementation is enclosed as base64-encoded tarball
<tnt> you have audio in that demo as well ?
<maikmerten> tnt, not yet
<maikmerten> I have vague plans of doing PWM-based audio output
<maikmerten> (in the FPGA)
<maikmerten> but I first need to construct a lowpass-thingie that turns that into something non-horrible
<corecode> tnt: thanks
<emeb> maikmerten: that's easy.
<maikmerten> the ADPCM-decoder in that tarball is just to demonstrate to myself that I understand how to decode that audio
develonepi3 has quit [Ping timeout: 252 seconds]
<tnt> corecode: for what ?
<tnt> (I mean, I'll take it, but ... still I wonder)
<maikmerten> (so the audio would be ADPCM-compressed, decoded by the RV32 CPU, and then written to a PWM output)
<tnt> maikmerten: make it PDM rather than PWM :)
<maikmerten> emeb, I think I should construct a Butterworth lowpass
<maikmerten> tnt, PDM?
<tnt> Pulse Density Modulation. AKA Delta Sigma.
<maikmerten> ah, k
<maikmerten> I should research into that
<tpb> Title: ice40-playground/pdm.v at usb-test · smunaut/ice40-playground · GitHub (at github.com)
<tnt> Basically this pushes the noise at much higher frequencies than PWM, making it easier to filter out.
<maikmerten> ah, neat
<maikmerten> thanks
<tnt> and in FPGA you can do PDM just as easy as PWM.
<corecode> tnt: the video
<tnt> In microcontroller usually not ... they have pwm peripheral but not pdm.
<tnt> corecode: Ah oki :) Yeah it's fun stuff.
<maikmerten> yeah, the idea of using PWM is basically µC-inspired
<maikmerten> for instance, how the RPi handles its audio
<maikmerten> (well, that is not a µC)
<maikmerten> but if PDM pushes the noise much higher, then I can get away with a less steep lowpass
<tnt> Exactly :)
<maikmerten> perhaps RC or whatever
<tnt> Yeah 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=2pAy5DvuidA
<maikmerten> subscribed.
<tnt> Heh thanks :)
<maikmerten> btw, this is my very safe proposal for a Steam-replacement: https://paste.debian.net/1087287/
<tpb> Title: debian Pastezone (at paste.debian.net)
<maikmerten> (contains a game. It's harmless.)
<maikmerten> but somehow people freak out when I just append an autostart feature. Dunnowhy ;-)
<maikmerten> (small board game, with AI)
<tnt> maikmerten: fun :) Did you port it to your riscv ?
<maikmerten> tnt, yup
<maikmerten> that's why on normal environments it needs -DSTDLIB to build
<maikmerten> (using proper functions instead of my wacky input stuff)
<tnt> yeah, I suspected :p
<maikmerten> I originally wrote it for the Commodore 64
<maikmerten> (yes, in C)
<maikmerten> (which is why comments refer to multiple files)
<maikmerten> there's nothing neater than a 1 MHz machine outsmarting people (in that particular scenario)
<tnt> :)
<maikmerten> https://csdb.dk/release/?id=130405 <-- there
<tpb> Title: [CSDb] - Nuclear Reaction 2100 by Really Proud Lamers (2014) (at csdb.dk)
<tnt> Oh 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)
<cr1901_modern> maikmerten: This game of yours stole my passwords and drained my bank accounts :(
<maikmerten> that's unfortunate. Sorry.
<cr1901_modern> :P
togo has joined #yosys
maikmerten has quit [Remote host closed the connection]
<emeb> tnt: interesting looking at your pdm.v module vs the way I did it.
<emeb> your acc preserves the overflow bit from one cycle to the next - mine always resets it.
<emeb> mine sounds fine though, so I'm curious about the difference.
<tnt> I'm not sure there is one because I add { acc[WIDTH], in } .... so that bit will always be reset if it's one.
<emeb> Ah ok.
<emeb> Seems the do the same thing, just via slightly different syntax.
<tnt> yeah :)
<emeb> Do you notice much difference in audio quality w/ dither turned on?
<tnt> emeb: I have not used it for sound
<emeb> tnt: just for a DAC for generating control voltages?
<tnt> yup
<tnt> at some point I want to try and write a small sound core but didn't get to it yet ..
<emeb> the one I did is pretty simple - fun thing is you can sum multiple channels into a single Sigma-Delta acc.
<emeb> mixes just fine.
vonnieda has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vonnieda has joined #yosys
vonnieda has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
togo has quit [Ping timeout: 252 seconds]
tpb has quit [Remote host closed the connection]
tpb has joined #yosys