*** tpb has joined #timvideos | 00:00 | |
*** CarlFK has quit IRC | 00:17 | |
*** CarlFK has joined #timvideos | 00:42 | |
*** ChanServ sets mode: +v CarlFK | 00:42 | |
*** arcticShadow has quit IRC | 01:24 | |
mithro | cr1901_modern: ping? | 02:32 |
---|---|---|
cr1901_modern | mithro: pong | 02:42 |
mithro | cr1901_modern: I'm working on the qemu emulation of the bitbanging spi flash | 02:42 |
cr1901_modern | mithro: That sounds like fun. Need help? | 02:42 |
cr1901_modern | Oh wait... | 02:43 |
mithro | cr1901_modern: Well, I don't have any actual software which I know works :-P | 02:43 |
* cr1901_modern is on a broken operating system. I couldn't run QEMU even if I wanted to | 02:43 | |
cr1901_modern | mithro: You mean you want an XMODEM impl I assume? | 02:43 |
mithro | cr1901_modern: I mean I would like your bitbanging test code in a repo I can use :-) | 02:44 |
cr1901_modern | Can you be more specific? What platform is QEMU emulating? | 02:45 |
cr1901_modern | is it emulating, say, a mimasv2? | 02:45 |
mithro | cr1901_modern: Sure, or an Opsis | 02:46 |
cr1901_modern | mithro: The test code I'm using was just an extra file compiled into HDMI2USB. I *could* create a minimal firmware whose sole purpose is to be loaded into RAM and then test SPI flash writes if that's what you wish | 02:47 |
mithro | cr1901_modern: The rest of the firmware boots fine, so if you just added your test code to be able to be called from the ci, that would work? | 02:47 |
cr1901_modern | Yes | 02:48 |
cr1901_modern | that's exactly what I did to test anyway :) | 02:48 |
cr1901_modern | https://github.com/cr1901/HDMI2USB-litex-firmware | 02:48 |
tpb | Title: GitHub - cr1901/HDMI2USB-litex-firmware: A version of the HDMI2USB firmware based around the misoc+migen tools produced by m-labs. (at github.com) | 02:48 |
cr1901_modern | https://github.com/cr1901/litex | 02:48 |
tpb | Title: GitHub - cr1901/litex: Build your hardware, easily! (at github.com) | 02:48 |
cr1901_modern | mithro: The actual modification to litex is very minimal. In fact, libbase, spiflash.c is unaltered! | 02:49 |
cr1901_modern | wait... let's back up. Let me know when you caught up. | 02:49 |
cr1901_modern | "The rest of the firmware boots fine" <-- I'm confused. Was there a point recently (sans the RAM bug on mimasv2) that the firmware didn't boot? | 02:52 |
mithro | cr1901_modern: In QEmu | 02:53 |
cr1901_modern | mithro: Ahhh, I see. In any case, my fork of HDMI2USB added a "debug spiflash" to the ci (what does that stand for?) that reads, the flash, writes the inverse value, and the erases the flash. All of this takes place in an unused portion of flash memory. | 02:55 |
cr1901_modern | There's no bounds checking, and tbh, "writes the inverse value" is an oversight (AIUI, in flash memory you can only turn ones into zeros, not vice versa). I should prob add those | 02:56 |
mithro | commandline interface | 02:57 |
*** arcticShadow has joined #timvideos | 03:33 | |
mithro | cr1901_modern: So this should work on the mimasv2 right? | 03:34 |
cr1901_modern | mithro: Yes. I would certainly hope so, since I tested it on my mimasv2 | 03:38 |
mithro | cr1901_modern: testing now | 03:38 |
cr1901_modern | mithro: Did you use my copy of litex/hdmi2usb? | 03:39 |
mithro | cr1901_modern: So, if I understand correctly there are 3 CSR registers | 03:50 |
cr1901_modern | mithro: Yes | 03:53 |
mithro | Bit0 == MOSI, Bit1 == CLK, Bit2 == CS_N, Bit3 == MOSI Enable? | 03:54 |
*** arcticShadow has quit IRC | 03:54 | |
cr1901_modern | mithro: H/o my swapfile is having a stroke | 03:54 |
mithro | Actually looks like Bit3 was only used on spi_width > 1 | 03:55 |
cr1901_modern | mithro: Yes, that's correct. It is ignored on spi_width == 1. | 03:56 |
cr1901_modern | I just wanted the same code to be usable regardless of spi_width | 03:56 |
mithro | cr1901_modern: So the spiflash command should start out at all ff and then end up at all 00 ? | 03:56 |
cr1901_modern | mithro: Yes | 03:56 |
mithro | cr1901_modern: Can you write something more interesting then 00? | 03:56 |
cr1901_modern | mithro: Sure, but you'll need to wait 5-10 minutes for me to reprogram my board :) | 03:57 |
mithro | cr1901_modern: You should just be able to load different firmware, right? | 03:58 |
cr1901_modern | right... LOADING the firmware takes 5 minutes :D | 03:58 |
cr1901_modern | The free space is also inaccurate b/c I didn't calculate it properly (arithmetic error) | 03:59 |
cr1901_modern | I'll fix that in a bit | 03:59 |
mithro | cr1901_modern: Do you read any data from the spiflash using the bitbanging? | 04:03 |
cr1901_modern | mithro: No, although I could add such a command | 04:04 |
mithro | cr1901_modern: Could you? I'd like to verify writing and then reading via the bitbanging before checking from the memory interface | 04:04 |
cr1901_modern | mithro: This was quick and dirty, so whatever extra you need, just let me know :) | 04:04 |
cr1901_modern | (In a word: sure, I'll add it) | 04:05 |
mithro | What CPOL/CPHA are we using? | 04:05 |
cr1901_modern | 0/0 | 04:05 |
cr1901_modern | We could also support 1/1 with bitbanging | 04:05 |
cr1901_modern | But the MISO CSR only clocks in a new bit when the clk goes from 0 => 1. So that implies either 0/0 or 1/1 | 04:06 |
cr1901_modern | I'm not aware of 1/0 or 0/1 flash mems | 04:06 |
cr1901_modern | mithro: Pushed. Try now | 04:16 |
*** madgoat has joined #timvideos | 04:19 | |
*** madgoat has left #timvideos | 04:22 | |
mithro | O | 04:35 |
cr1901_modern | O? | 04:35 |
mithro | I'm still trying to figure out the CS line in QEmu | 04:35 |
cr1901_modern | I can't help you unfortunately :(. I've never actually played with QEMU much | 04:37 |
mithro | I'm confused about the SPI flash modes | 05:27 |
cr1901_modern | what do you mean? | 05:28 |
mithro | cr1901_modern: when to sample / write the MISO/MOSI | 05:29 |
cr1901_modern | CPOL == Which logic level is the "idle level" | 05:30 |
mithro | For CPHA0 - on the IDLE->ACTIVE, MOSI is set and on ACTIVE->IDLE MISO is read | 05:34 |
mithro | Oh, I need to merge your read stuff | 05:39 |
mithro | I seem to be getting the commands through... | 05:39 |
mithro | : flash_erase: offset = 0xb0000, len = 65536 | 05:39 |
mithro | : m25p80_transfer8: page program cur_addr=0xbafc8 data=ff | 05:39 |
mithro | cr1901_modern: Your not reading from the flash via bit banging yet? | 05:42 |
*** Ishan_Bansal has joined #timvideos | 05:42 | |
mithro | Ishan_Bansal: Hi | 05:43 |
mithro | Ishan_Bansal: Your message from yesterday didn't make any sense | 05:43 |
cr1901_modern | mithro: You asked me that an hour ago (no) :P. | 05:43 |
mithro | cr1901_modern: Oh, it looks like there are not any reading functions in libbase/spiflash.c ... | 05:43 |
cr1901_modern | mithro: Sorry I got distracted. CPHA == Which clock edge should we sample MISO on? | 05:44 |
cr1901_modern | 0 == first edge, 1 == second edge, regardless of the clock polarity | 05:44 |
*** Ishan_Bansal has quit IRC | 05:45 | |
*** Ishan_Bansal has joined #timvideos | 05:51 | |
cr1901_modern | mithro: I didn't add the read functions yet. I'll do those after I sleep. | 05:51 |
mithro | Hrm... | 05:51 |
mithro | flash.o: In function `bitbang_test': | 05:51 |
mithro | flash.c:(.text+0x220): undefined reference to `write_to_flash' | 05:51 |
mithro | flash.c:(.text+0x220): relocation truncated to fit: R_LM32_CALL against undefined symbol `write_to_flash' | 05:51 |
mithro | flash.c:(.text+0x23c): undefined reference to `erase_flash_sector' | 05:51 |
mithro | flash.c:(.text+0x23c): relocation truncated to fit: R_LM32_CALL against undefined symbol `erase_flash_sector' | 05:51 |
cr1901_modern | mithro: Recompile libbase? | 05:53 |
mithro | Oh, it's because my litex reset itself back to the committed module | 05:54 |
cr1901_modern | mithro: How's the GSoC coming along, btw? | 05:55 |
mithro | cr1901_modern: Need a compiler guard for the bitbanging interface | 05:55 |
cr1901_modern | https://github.com/cr1901/litex/blob/master/litex/soc/software/libbase/spiflash.c#L3 ? | 05:56 |
tpb | Title: litex/spiflash.c at master · cr1901/litex · GitHub (at github.com) | 05:56 |
mithro | cr1901_modern: need the same in firmware/flash.c | 05:58 |
cr1901_modern | pushed | 05:59 |
mithro | cr1901_modern: It might be good to read the flash ID and stuff too | 06:17 |
mithro | cr1901_modern: These -> https://github.com/xobs/chibios-netvcr/blob/netvcr/src/cmd-spinor.c#L19-L21 | 06:18 |
tpb | Title: chibios-netvcr/cmd-spinor.c at netvcr · xobs/chibios-netvcr · GitHub (at github.com) | 06:18 |
Ishan_Bansal | mithro: On execution of 'download-env.sh' during setup you got the error 'https://drive.google.com/file/d/0B1XjuIBKA3WYS0QxQ2VDenQ2dUU/view?usp=sharing' saying file not found | 06:21 |
tpb | Title: Screenshot from 2017-04-02 11:36:18.png - Google Drive (at drive.google.com) | 06:21 |
cr1901_modern | mithro: Ack. | 06:22 |
mithro | Ishan_Bansal: Do you know how to use a pastebin? | 06:22 |
mithro | Ishan_Bansal: I'm pretty sure the information I need to diagnose what your real error is, is further up | 06:23 |
cr1901_modern | ssk1328 isn't in the room it seems? | 06:27 |
mithro | cr1901_modern: For doing things like PIP we need to finish merging ssk1328's work | 06:27 |
cr1901_modern | What does his work do, high level overview? | 06:28 |
mithro | cr1901_modern: We merged his stuff into "16bit floating point pixels" into litevideo recently | 06:28 |
mithro | cr1901_modern: We need 16bit floating point pixels to do proper color merging | 06:28 |
mithro | Ishan_Bansal: I'm adding some more information into the download-env.sh script to make it easier to understand what it is doing | 06:29 |
cr1901_modern | fair. But isn't PIP just an overlay? | 06:29 |
cr1901_modern | (well for *my* use-case anyway) | 06:29 |
cr1901_modern | mithro: ^ | 06:42 |
mithro | cr1901_modern: You need to scale the image first? | 06:42 |
cr1901_modern | mithro: Oh, I wasn't planning on doing that :D | 06:43 |
mithro | cr1901_modern: What about blending? | 06:43 |
cr1901_modern | Blending? If I'm displaying, say, a raw NTSC signal, 256x224, on an LCD monitor as-is, do I need blending? (contrived example) | 06:44 |
cr1901_modern | it would just be an RGB int triple, right? | 06:44 |
cr1901_modern | In any case, I assume even if the output is RGB int, it's still useful to have float as intermediate results | 06:47 |
cr1901_modern | pity FPGA multipliers can't handle floating point well | 06:47 |
mithro | cr1901_modern: If you want the color to not look like poo brown :-) | 06:48 |
cr1901_modern | mithro: Can you elaborate? Why would an overlay, where you choose to blit the pixels of one video source vs another, look like poo brown? | 06:49 |
* cr1901_modern thinks he has some learning to do about actually drawing stuff to the screen :D | 06:49 | |
mithro | cr1901_modern: You need to do blending in linear gamma domain otherwise things don't work correctly | 06:51 |
mithro | Almost all RGB color spaces are not linear | 06:52 |
cr1901_modern | Oh, I thought that was gamma correction. Blending is "combining two colors to make a third", right? | 06:53 |
mithro | Blending is doing anything to the pixels values | 06:55 |
cr1901_modern | oh... I'm an idiot | 06:55 |
cr1901_modern | mithro: In any case, I understand now | 06:56 |
cr1901_modern | gamma's nonlinear, so floating point precision makes sense for dynamic range purposes I assume | 06:56 |
mithro | cr1901_modern: When converting from rgb to 16bit floating point you do gamma correction to make the output linear | 06:57 |
mithro | cr1901_modern: Then when converting back from 16bit floating point to the output, you do gamma correction again | 06:57 |
mithro | You need >8bits for this operation to be a no-op | 06:58 |
mithro | 16bit-floating point gives you enough precision that you don't lose detail doing this | 06:58 |
cr1901_modern | "You need >8bits for this operation to be a no-op" <-- by no-op you mean "single cycle in h/w"? | 06:59 |
mithro | cr1901_modern: No I mean that if you do A->X->B, then for all values of A, A==B | 07:04 |
mithro | I'm going to get some food, be back in 30 minutes | 07:04 |
cr1901_modern | I will prob be asleep by that time | 07:13 |
*** Ishan_Bansal has quit IRC | 07:24 | |
mithro | cr1901_modern: http://paste.debian.net/925579/ | 10:54 |
tpb | Title: debian Pastezone (at paste.debian.net) | 10:54 |
mithro | cr1901_modern: Why is it every 4th value? | 11:06 |
*** Ishan_Bansal has joined #timvideos | 12:59 | |
Ishan_Bansal | mithro: Hi | 12:59 |
Ishan_Bansal | mithro : I am hoping to work on the project '[HDMI2USB] Convert the JPEG encoder from VHDL to Migen/MiSoC' during my summer and for this I have submitted my draft (https://docs.google.com/document/d/1IuC6jKkqt8Z5ucak3_jZADiEJQUOY6Ga3RdeOJMltJo/edit?usp=sharing) on GSOC website yesterday , kindly review the draft and give your valuable suggestions for the further improvement required in the doc. | 13:07 |
tpb | Title: Project Proposal_JPEG_encoder - Google Docs (at docs.google.com) | 13:07 |
cr1901_modern | mithro: Because the buffer that I write to flash is an array of ints: https://github.com/cr1901/HDMI2USB-litex-firmware/blob/master/firmware/flash.c#L85 | 13:31 |
tpb | Title: HDMI2USB-litex-firmware/flash.c at master · cr1901/HDMI2USB-litex-firmware · GitHub (at github.com) | 13:31 |
*** Ishan_Bansal has quit IRC | 15:22 | |
*** sb0 has quit IRC | 17:27 | |
CarlFK | mithro: im trying to follow the build instructions.. | 19:34 |
CarlFK | https://github.com/mithro/HDMI2USB-litex-firmware/blob/master/scripts/build-qemu.sh#L38 | 19:34 |
tpb | Title: HDMI2USB-litex-firmware/build-qemu.sh at master · mithro/HDMI2USB-litex-firmware · GitHub (at github.com) | 19:34 |
CarlFK | QEMU_SRC_DIR=$TOP_DIR/third_party/qemu-litex | 19:34 |
CarlFK | where does third_party come from? | 19:35 |
*** danielki has joined #timvideos | 20:24 | |
*** Guest83532 has joined #timvideos | 21:19 | |
*** Guest83532 has quit IRC | 21:30 | |
*** samsagaz__ has joined #timvideos | 23:04 | |
*** samsagaz__ has quit IRC | 23:06 | |
mithro | CarlFK: it should clone it for you if you don't already have it? | 23:48 |
CarlFK | mithro: it clones qemu-litex | 23:52 |
CarlFK | but that doesn't create third_party | 23:52 |
CarlFK | ah, it errors before the git clone line. I bet you wanted a mkdir somewhere... or something. | 23:53 |
CarlFK | ./build-qemu.sh: line 41: cd: /home/juser/temp/third_party: No such file or directory | 23:53 |
CarlFK | bbl - dinner time | 23:57 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!