2012-12-20 00:04 LunaVorax has joined #qi-hardware 2012-12-20 00:27 LunaVorax has quit [Ping timeout: 246 seconds] 2012-12-20 00:47 viric: ah xterm beuty are colours ;-) 2012-12-20 00:47 may be thats why i never got used to it 2012-12-20 01:01 urandom__ has quit [Quit: Konversation terminated!] 2012-12-20 01:37 xiangfu has joined #qi-hardware 2012-12-20 01:39 viric: (color xterm) yeah, that's evil. particularly when someone uses yellow for problem reports. my xterms are black on beige ("moccasin") so anything yellow is almost invisible 2012-12-20 02:19 qi-bot has quit [Ping timeout: 240 seconds] 2012-12-20 04:03 DocScrutinizer06 has joined #qi-hardware 2012-12-20 04:05 DocScrutinizer05 has quit [Ping timeout: 272 seconds] 2012-12-20 04:45 wolfspra1l has quit [Ping timeout: 246 seconds] 2012-12-20 04:48 wolfspraul has joined #qi-hardware 2012-12-20 06:27 MistahDarcy has joined #qi-hardware 2012-12-20 06:34 emeb has quit [Quit: Leaving.] 2012-12-20 06:36 qi-bot has joined #qi-hardware 2012-12-20 07:02 I finished work on the blinking_led (in fpgatools), awaiting confirmation from xiangfu... 2012-12-20 07:02 next step is a counter which can be programmed over jtag 2012-12-20 07:03 goal: 2 weeks :-) 2012-12-20 07:03 also I need to work on support for the ftg256 package (as opposed to the only supported tqg144 right now) 2012-12-20 07:03 after the counter: j1 soc to blink led... 2012-12-20 07:08 jekhor has joined #qi-hardware 2012-12-20 07:15 so currently have a blinking led, but no counter ? 2012-12-20 07:24 awaiting confirmation, but yes, it's a blinking led driven from a static counter 2012-12-20 07:24 counts up, clocked from an external clock, and the highest bit of the counter is the on/off wire 2012-12-20 07:25 whereas the next counter will have start/stop/frequency registers that can be programmed over jtag 2012-12-20 07:25 in lines of verilog, the and gate was 1 line, the static counter 3 or 4, and the new one now maybe 100 2012-12-20 07:25 with jtag and registers etc. 2012-12-20 07:26 will be interesting to see how fpgatools holds up 2012-12-20 07:26 this is the final blinking_led.c btw https://github.com/Wolfgang-Spraul/fpgatools/blob/master/blinking_led.c 2012-12-20 07:27 maybe I do need some smarter high-level functions for the new jtag counter, or else the .c would grow to thousands of lines dealing with each wire (bit) separately... 2012-12-20 07:30 (awaiting confirmation) you mean you don't have a board but just test it on paper, knuth-style ? :-) 2012-12-20 07:31 the next counter sounds pretty fancy :) 2012-12-20 07:34 wow indeed the c file seems pretty big for what it actually does, the entire M1 soc would take a lot of lines :p 2012-12-20 07:34 congratz anyway !! 2012-12-20 07:34 does "(A6+~A6)*(A5)" mean, in C parlance, "(A6 | ~A6) & A5" ? i.e., just A5 ? 2012-12-20 07:36 Fallenou: i think with a little preprocessor, you could condense this a lot. there's plenty of redundancy in there 2012-12-20 07:36 looks cool anyway to be able to tweak fpa bitstream with so low level 2012-12-20 07:37 also, the way how things are references (by coordinates) is somewhat user-unfriendly. of course, it probably makes sense at the level at which the tools operate 2012-12-20 07:39 for an API meant for human users, you'd probably have an "object" for those things at (55, 13), etc., then operate on properties of that object. 2012-12-20 07:41 the object would be a pointer to a struct. since these objects correspond to physical circuits (i.e., LUTs and such; not abstract things like routes), they could be statically allocated, depending on the chip used 2012-12-20 07:42 of course, there's the question whether creating such a "friendly" API would even make sense, considering that it would still be uncomfortably low for human users 2012-12-20 07:43 panda|x201 has joined #qi-hardware 2012-12-20 07:44 a bit like, in programming terms: the bitstream is machine language in hex codes, wolfgang's api is an assembler that translates mnemonics but doesn't have any symbols 2012-12-20 07:45 the hypothetical "nice" API would be a regular assembler. but then, most people what to program in C or something even more distant from the bare metal 2012-12-20 07:50 hmm, i see logic_cfg.a2d[LUT_A].lut5 = "0"; 2012-12-20 07:51 and then logic_cfg.a2d[LUT_C].lut5 = 0; 2012-12-20 07:51 typo or just confusing non-use of NULL ? 2012-12-20 07:56 wolfspraul: wpwrak : I tested the blinking led config bits file (gernerate by fpgatools (../blinking_led | ../fp2bit - blinking.bit). it works just fine on my slx9-qfp144 board. 2012-12-20 07:56 actually, i just realize that the mayans were right after all. wolfgang just started the apocalypse for closed fpga synthesis :-) 2012-12-20 07:57 whee, time for the champagne !! 2012-12-20 07:57 wolfspraul: congratulations ! 2012-12-20 07:59 xiangfu: (qfp) so no nasty BGAs anymore ? that should help to make that board more accessible 2012-12-20 08:02 since the fpgatools only support qfp144. 2012-12-20 08:02 wpwrak: I am still working on ftg256. add spi flash and a bluetooth-serial modular. 2012-12-20 08:30 LunaVorax has joined #qi-hardware 2012-12-20 08:34 xiangfu: did you find a BT module with sufficiently open documentation ? 2012-12-20 08:43 wpwrak: no. 2012-12-20 08:43 this one: http://www.wavesen.com/probig.asp?id=17 2012-12-20 08:44 there are only 4 AT commands for this modular. (test, modify serial bandwidth, modify bluetooth name and password) 2012-12-20 08:46 datasheet is here: (only chinese: http://www.wavesen.com/mysys/db_picture/news3/20121119115841101.pdf) 2012-12-20 08:52 even the coin for the size comparison is chinese ;-) 2012-12-20 08:52 I have tested with rfcomm command with my laptop. 2012-12-20 08:53 it's like, laptop usb-serial <---> serial-bluetooth-modular <---> laptop rfcomm command through bluetooth. it's a circle 2012-12-20 08:54 heh :) well, the serial interface seems to be sufficiently documented to tbe usable. 2012-12-20 08:54 that's already something 2012-12-20 09:07 xiangfu has quit [Ping timeout: 264 seconds] 2012-12-20 09:08 xiangfu has joined #qi-hardware 2012-12-20 09:20 panda|x201 has quit [Ping timeout: 245 seconds] 2012-12-20 09:57 lekernel_ has joined #qi-hardware 2012-12-20 10:02 LunaVorax has quit [*.net *.split] 2012-12-20 10:02 lekernel has quit [*.net *.split] 2012-12-20 10:05 DocScrutinizer06 is now known as DocScrutinizer05 2012-12-20 10:06 DocScrutinizer05 has quit [Changing host] 2012-12-20 10:06 DocScrutinizer05 has joined #qi-hardware 2012-12-20 10:11 LunaVorax has joined #qi-hardware 2012-12-20 10:16 yes, all feedback is correct, all acknowledged :-) 2012-12-20 10:17 higher-level structs and functions 2012-12-20 10:17 qfp144 and ftg256 both have different pros and cons 2012-12-20 10:17 qfp144 has a 0.5mm pitch, that's actually quite tough for diy boards 2012-12-20 10:18 sure.. but at the prices fusionpcb from seed costs... who cares. 2012-12-20 10:18 yes lut5="0" and lut5=0 are two different things. ="0" means that the lut5 is in use, and pulled low (gnd) 2012-12-20 10:18 atleast one can 'easily' solder such stuff 2012-12-20 10:18 lut5=0 means the lut5 is not in use, at that point I am probably overwriting a structure from before and 'resetting' the lut5 to 'not in use' 2012-12-20 10:19 (A6+~A6) is just a convention to say that A6 is not in use - it is pulled high and the lut functions as a two-lut system (two times 5 instead of one-time 6) 2012-12-20 10:19 xiangfu: thanks for testing! 2012-12-20 10:19 I shall continue with the jtag counter then :-) 2012-12-20 10:20 it took me 3 months to go from the AND gate to a simple clocked led blinker, let's hope it gets faster now 2012-12-20 10:21 for the higher level stuff, I will take a look at llvm backends 2012-12-20 10:21 that will give me some guidance (hopefully) how to design the higher-level functions 2012-12-20 10:22 http://llvm.org/docs/WritingAnLLVMBackend.html 2012-12-20 10:23 really good news, big congratulations wolfspraul :) 2012-12-20 10:24 woakas has joined #qi-hardware 2012-12-20 10:24 thanks 2012-12-20 10:25 whitequa1k has joined #qi-hardware 2012-12-20 10:25 but it's still far from practically usable, I have to say 2012-12-20 10:25 we will see 2012-12-20 10:25 bartbes__ has joined #qi-hardware 2012-12-20 10:25 I start to realize how much work the synthesis is actually doing :-) 2012-12-20 10:26 with the AND gate, that wasn't so obvious yet, but for sure by the time I play with the J1 soc, it will be pretty obvious... 2012-12-20 10:27 wej_ has joined #qi-hardware 2012-12-20 10:29 unclouded has quit [Ping timeout: 245 seconds] 2012-12-20 10:29 whitequark has quit [Ping timeout: 245 seconds] 2012-12-20 10:29 zear has quit [Ping timeout: 245 seconds] 2012-12-20 10:29 unclouded has joined #qi-hardware 2012-12-20 10:29 bartbes_ has quit [Ping timeout: 260 seconds] 2012-12-20 10:29 wej has quit [Ping timeout: 260 seconds] 2012-12-20 10:30 zear_ has joined #qi-hardware 2012-12-20 10:41 whitequa1k is now known as whitequark 2012-12-20 10:41 whitequark has quit [Quit: leaving] 2012-12-20 10:41 whitequark has joined #qi-hardware 2012-12-20 11:10 unclouded has quit [Ping timeout: 245 seconds] 2012-12-20 11:14 kuribas has joined #qi-hardware 2012-12-20 11:15 jekhor has quit [Ping timeout: 264 seconds] 2012-12-20 11:21 Jurting has quit [Remote host closed the connection] 2012-12-20 11:25 LunaVorax has quit [Remote host closed the connection] 2012-12-20 11:31 lekernel_ has quit [Ping timeout: 264 seconds] 2012-12-20 11:57 urandom__ has joined #qi-hardware 2012-12-20 12:52 zear_ is now known as zear 2012-12-20 13:09 jekhor has joined #qi-hardware 2012-12-20 13:36 jekhor has quit [Ping timeout: 260 seconds] 2012-12-20 13:39 xiangfu has quit [Ping timeout: 252 seconds] 2012-12-20 13:41 xiangfu has joined #qi-hardware 2012-12-20 13:55 rz2k has joined #qi-hardware 2012-12-20 14:07 Hoolxi has joined #qi-hardware 2012-12-20 14:08 Hoolxi has quit [Read error: Connection reset by peer] 2012-12-20 14:25 rz2k has quit [] 2012-12-20 14:26 xiangfu has quit [Quit: leaving] 2012-12-20 14:26 xiangfu has joined #qi-hardware 2012-12-20 14:40 wpwrak: I have worked with llvm stuff for the last two years, I might be able to help you in some questions 2012-12-20 14:40 wolfspraul: sorry, meant you 2012-12-20 14:41 thanks 2012-12-20 14:41 not sure I know the questions now 2012-12-20 14:49 lekernel has joined #qi-hardware 2012-12-20 15:36 jekhor has joined #qi-hardware 2012-12-20 15:55 emeb has joined #qi-hardware 2012-12-20 16:07 wolfspraul has quit [Quit: leaving] 2012-12-20 16:08 wolfspraul has joined #qi-hardware 2012-12-20 16:26 xiangfu has quit [Quit: leaving] 2012-12-20 16:29 wolfspraul: I also have some experience with LLVM and might be able to help 2012-12-20 16:57 kuribas has quit [Remote host closed the connection] 2012-12-20 17:34 GNUtoo has joined #qi-hardware 2012-12-20 17:34 GNUtoo has quit [Remote host closed the connection] 2012-12-20 18:04 wolfspraul: (=0 vs. ="0") why not use NULL instead of =0 ? otherwise, it's extremely confusing and will mislead people 2012-12-20 18:06 iirc the C standard also allows NULL to be non-zero. haven't heard of an actual platform twisted enough to do that, though. 2012-12-20 18:08 and yes: http://c-faq.com/null/ptrtest.html 2012-12-20 18:08 some people have too much time on their hands 2012-12-20 18:09 that's why C++11 defines nullptr type 2012-12-20 18:24 (too much time) why ? it's a legitimate concern 2012-12-20 18:28 ChanServ has quit [*.net *.split] 2012-12-20 18:30 ChanServ has joined #qi-hardware 2012-12-20 18:47 why would a hardware or OS developer need a non-zero NULL pointer? 2012-12-20 18:49 I also have a feeling that a lot of software we use today would break if compiled for a platform where NULL != 0 :) 2012-12-20 18:52 lekernel: in fact llvm assumes it's 0, which basically means that all software, if compiled with clang 2012-12-20 18:52 not sure about gcc. 2012-12-20 18:55 afaik yes, optimizer likes this fact 2012-12-20 19:09 lekernel: your application wouldn't normally see that NULL is internally not all zero bits. similar to 0.0 not necessarily being all zero. 2012-12-20 19:17 lekernel: '0', evaluated as a pointer, may not have an integer representation of all bits zero 2012-12-20 19:17 so '(int) ((void *) 0)' may be different than '(int) 0'. :) 2012-12-20 19:18 NULL simply is translated as '((void *) 0)' 2012-12-20 19:18 A good compiler, where a null pointer is 0xffff, will not have "#define NULL 0xffff" 2012-12-20 19:18 viric: are you sure about the cast ? for consistency, it may still yield 0. 2012-12-20 19:19 It will have "#define NULL ((void *) 0)" 2012-12-20 19:19 (i'm too lazy to look up what the standard has to say about it, though :) 2012-12-20 19:19 umh I also can't cite much. But if '0' is evaluated as a pointer, it evaluates as the *null pointer*, regardless of it being zero or not. 2012-12-20 19:19 where you would notice are things like memset or unions used for type conversion 2012-12-20 19:20 but then, how to write the memory address zero? I don't know. :) 2012-12-20 19:20 yes, (type *) 0 is always a "null pointer" 2012-12-20 19:21 easy: C doesn't define hardware addresses :) 2012-12-20 19:21 yes, that sounds right. 2012-12-20 19:21 so you'd use some architecture-specific hack 2012-12-20 19:21 yes 2012-12-20 19:22 http://c-faq.com/null/nullor0.html 2012-12-20 19:23 #define NUL is asking for trouble ;-) 2012-12-20 19:24 of course, so are people who speak of a "NULL (sic) character" 2012-12-20 19:24 yes 2012-12-20 19:24 You can define NIL too 2012-12-20 19:24 or NIHIL 2012-12-20 19:24 :) 2012-12-20 19:24 or all of them 2012-12-20 19:25 #define ZERO that also rocks 2012-12-20 19:25 if (NULL == ZERO) {... } 2012-12-20 19:25 NIL may upset LISP programmers :) 2012-12-20 19:25 argh ;-) 2012-12-20 19:26 so, who needs macros? noone 2012-12-20 19:26 actually, wolfgang, a CLEAR(x) macro for memset(&(x), 0, sizeof(x)) may be handy in your fpgatools examples 2012-12-20 19:26 naw, macros are cool 2012-12-20 19:30 unclouded has joined #qi-hardware 2012-12-20 19:32 nice idea - done 2012-12-20 19:32 thanks! 2012-12-20 19:33 LunaVorax has joined #qi-hardware 2012-12-20 19:41 rz2k has joined #qi-hardware 2012-12-20 19:44 * wpwrak wonder why NXP always have to use such anal pin names. PIO0_1 instead of P0_1 for pin 1 on port 0, CT32B0_MAT2 instead of something like T0M2 for the 2nd match output of timer 0, ... 2012-12-20 19:52 Jurting has joined #qi-hardware 2012-12-20 19:53 GNUtoo-desktop has joined #qi-hardware 2012-12-20 20:00 kuribas has joined #qi-hardware 2012-12-20 20:24 wej_ has quit [Ping timeout: 264 seconds] 2012-12-20 20:25 GNUtoo-desktop has quit [Quit: [INFO] fsogsmd : received signal -11, exiting.] 2012-12-20 20:30 wej has joined #qi-hardware 2012-12-20 20:38 Jurting has quit [Ping timeout: 252 seconds] 2012-12-20 21:01 hehe, XC6SLX9-CSG324 (in kicad-libs/components/xc6slx9-csg324.lib) ... how that's a HUGE beast ;-) 2012-12-20 21:27 ChanServ has quit [*.net *.split] 2012-12-20 21:30 ChanServ has joined #qi-hardware 2012-12-20 21:31 [commit] Werner Almesberger: components/HIERARCHY: add XC6SLX9-CSG324 (master) http://qi-hw.com/p/kicad-libs/e10d1e9 2012-12-20 21:31 [commit] Werner Almesberger: components/lpc1100-qfn33.lib: NXP LPC11xx series in HVQFN33 package (master) http://qi-hw.com/p/kicad-libs/ecba9a3 2012-12-20 22:11 wpwrak: to avoid collisions in global namespace? 2012-12-20 22:17 whitequark: hmm, with names like "R" or "AD1". the "R" even collides internally. 2012-12-20 22:17 (i.e., there are several non-equivalent pins where one of the names is "R") 2012-12-20 22:19 (one of the names) as in R/PIO1_2/AD3/CT32B1_MAT1 or R/PIO0_11/AD0/CT32B0_MAT3 2012-12-20 22:27 what the "R" means is that this pin could have an additional function that is "reserved". the concept of indicating this in the pin names alone is somewhat mind-boggling. 2012-12-20 22:29 and of course, the immediately visible problem with things like PIO0_1 is that you have two visually very similar characters (O and 0) right next to each other. 2012-12-20 22:51 ugh. yes. 2012-12-20 22:52 kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 2012-12-20 22:52 [commit] Werner Almesberger: components/lpc1100-qfn33.lib: remove dubious "R" (reserved) pin function (master) http://qi-hw.com/p/kicad-libs/1f0d15c 2012-12-20 22:52 restored at least a bit of sanity :) 2012-12-20 22:59 LunaVorax has quit [Read error: No route to host] 2012-12-20 23:01 LunaVorax has joined #qi-hardware 2012-12-20 23:05 jekhor has quit [Ping timeout: 252 seconds]