Topic for #qi-hardware is now Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs
LunaVorax has joined #qi-hardware
LunaVorax has quit [Ping timeout: 246 seconds]
<kristianpaul> viric: ah xterm beuty are colours ;-)
<kristianpaul> may be thats why i never got used to it
urandom__ has quit [Quit: Konversation terminated!]
xiangfu has joined #qi-hardware
<wpwrak> 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
qi-bot has quit [Ping timeout: 240 seconds]
DocScrutinizer06 has joined #qi-hardware
DocScrutinizer05 has quit [Ping timeout: 272 seconds]
wolfspra1l has quit [Ping timeout: 246 seconds]
wolfspraul has joined #qi-hardware
MistahDarcy has joined #qi-hardware
emeb has quit [Quit: Leaving.]
qi-bot has joined #qi-hardware
<wolfspraul> I finished work on the blinking_led (in fpgatools), awaiting confirmation from xiangfu...
<wolfspraul> next step is a counter which can be programmed over jtag
<wolfspraul> goal: 2 weeks :-)
<wolfspraul> also I need to work on support for the ftg256 package (as opposed to the only supported tqg144 right now)
<wolfspraul> after the counter: j1 soc to blink led...
jekhor has joined #qi-hardware
<wpwrak> so currently have a blinking led, but no counter ?
<wolfspraul> awaiting confirmation, but yes, it's a blinking led driven from a static counter
<wolfspraul> counts up, clocked from an external clock, and the highest bit of the counter is the on/off wire
<wolfspraul> whereas the next counter will have start/stop/frequency registers that can be programmed over jtag
<wolfspraul> in lines of verilog, the and gate was 1 line, the static counter 3 or 4, and the new one now maybe 100
<wolfspraul> with jtag and registers etc.
<wolfspraul> will be interesting to see how fpgatools holds up
<wolfspraul> this is the final blinking_led.c btw https://github.com/Wolfgang-Spraul/fpgatools/blob/master/blinking_led.c
<wolfspraul> 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...
<wpwrak> (awaiting confirmation) you mean you don't have a board but just test it on paper, knuth-style ? :-)
<wpwrak> the next counter sounds pretty fancy :)
<Fallenou> wow indeed the c file seems pretty big for what it actually does, the entire M1 soc would take a lot of lines :p
<Fallenou> congratz anyway !!
<wpwrak> does "(A6+~A6)*(A5)" mean, in C parlance, "(A6 | ~A6) & A5" ? i.e., just A5 ?
<wpwrak> Fallenou: i think with a little preprocessor, you could condense this a lot. there's plenty of redundancy in there
<Fallenou> looks cool anyway to be able to tweak fpa bitstream with so low level
<wpwrak> 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
<wpwrak> 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.
<wpwrak> 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
<wpwrak> 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
panda|x201 has joined #qi-hardware
<wpwrak> 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
<wpwrak> 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
<wpwrak> hmm, i see logic_cfg.a2d[LUT_A].lut5 = "0";
<wpwrak> and then logic_cfg.a2d[LUT_C].lut5 = 0;
<wpwrak> typo or just confusing non-use of NULL ?
<xiangfu> 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.
<wpwrak> actually, i just realize that the mayans were right after all. wolfgang just started the apocalypse for closed fpga synthesis :-)
<wpwrak> whee, time for the champagne !!
<wpwrak> wolfspraul: congratulations !
<wpwrak> xiangfu: (qfp) so no nasty BGAs anymore ? that should help to make that board more accessible
<xiangfu> since the fpgatools only support qfp144.
<xiangfu> wpwrak: I am still working on ftg256. add spi flash and a bluetooth-serial modular.
LunaVorax has joined #qi-hardware
<wpwrak> xiangfu: did you find a BT module with sufficiently open documentation ?
<xiangfu> wpwrak: no.
<xiangfu> there are only 4 AT commands for this modular. (test, modify serial bandwidth, modify bluetooth name and password)
<wpwrak> even the coin for the size comparison is chinese ;-)
<xiangfu> I have tested with rfcomm command with my laptop.
<xiangfu> it's like, laptop usb-serial <---> serial-bluetooth-modular <---> laptop rfcomm command through bluetooth. it's a circle
<wpwrak> heh :) well, the serial interface seems to be sufficiently documented to tbe usable.
<wpwrak> that's already something
xiangfu has quit [Ping timeout: 264 seconds]
xiangfu has joined #qi-hardware
panda|x201 has quit [Ping timeout: 245 seconds]
lekernel_ has joined #qi-hardware
LunaVorax has quit [*.net *.split]
lekernel has quit [*.net *.split]
DocScrutinizer06 is now known as DocScrutinizer05
DocScrutinizer05 has quit [Changing host]
DocScrutinizer05 has joined #qi-hardware
LunaVorax has joined #qi-hardware
<wolfspraul> yes, all feedback is correct, all acknowledged :-)
<wolfspraul> higher-level structs and functions
<wolfspraul> qfp144 and ftg256 both have different pros and cons
<wolfspraul> qfp144 has a 0.5mm pitch, that's actually quite tough for diy boards
<roh> sure.. but at the prices fusionpcb from seed costs... who cares.
<wolfspraul> yes lut5="0" and lut5=0 are two different things. ="0" means that the lut5 is in use, and pulled low (gnd)
<roh> atleast one can 'easily' solder such stuff
<wolfspraul> 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'
<wolfspraul> (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)
<wolfspraul> xiangfu: thanks for testing!
<wolfspraul> I shall continue with the jtag counter then :-)
<wolfspraul> it took me 3 months to go from the AND gate to a simple clocked led blinker, let's hope it gets faster now
<wolfspraul> for the higher level stuff, I will take a look at llvm backends
<wolfspraul> that will give me some guidance (hopefully) how to design the higher-level functions
<Fallenou> really good news, big congratulations wolfspraul :)
woakas has joined #qi-hardware
<wolfspraul> thanks
whitequa1k has joined #qi-hardware
<wolfspraul> but it's still far from practically usable, I have to say
<wolfspraul> we will see
bartbes__ has joined #qi-hardware
<wolfspraul> I start to realize how much work the synthesis is actually doing :-)
<wolfspraul> 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...
wej_ has joined #qi-hardware
unclouded has quit [Ping timeout: 245 seconds]
whitequark has quit [Ping timeout: 245 seconds]
zear has quit [Ping timeout: 245 seconds]
unclouded has joined #qi-hardware
bartbes_ has quit [Ping timeout: 260 seconds]
wej has quit [Ping timeout: 260 seconds]
zear_ has joined #qi-hardware
whitequa1k is now known as whitequark
whitequark has quit [Quit: leaving]
whitequark has joined #qi-hardware
unclouded has quit [Ping timeout: 245 seconds]
kuribas has joined #qi-hardware
jekhor has quit [Ping timeout: 264 seconds]
Jurting has quit [Remote host closed the connection]
LunaVorax has quit [Remote host closed the connection]
lekernel_ has quit [Ping timeout: 264 seconds]
urandom__ has joined #qi-hardware
zear_ is now known as zear
jekhor has joined #qi-hardware
jekhor has quit [Ping timeout: 260 seconds]
xiangfu has quit [Ping timeout: 252 seconds]
xiangfu has joined #qi-hardware
rz2k has joined #qi-hardware
Hoolxi has joined #qi-hardware
Hoolxi has quit [Read error: Connection reset by peer]
rz2k has quit []
xiangfu has quit [Quit: leaving]
xiangfu has joined #qi-hardware
<lindi-> wpwrak: I have worked with llvm stuff for the last two years, I might be able to help you in some questions
<lindi-> wolfspraul: sorry, meant you
<wolfspraul> thanks
<wolfspraul> not sure I know the questions now
lekernel has joined #qi-hardware
jekhor has joined #qi-hardware
emeb has joined #qi-hardware
wolfspraul has quit [Quit: leaving]
wolfspraul has joined #qi-hardware
xiangfu has quit [Quit: leaving]
<whitequark> wolfspraul: I also have some experience with LLVM and might be able to help
kuribas has quit [Remote host closed the connection]
GNUtoo has joined #qi-hardware
GNUtoo has quit [Remote host closed the connection]
<wpwrak> wolfspraul: (=0 vs. ="0") why not use NULL instead of =0 ? otherwise, it's extremely confusing and will mislead people
<lekernel> iirc the C standard also allows NULL to be non-zero. haven't heard of an actual platform twisted enough to do that, though.
<lekernel> some people have too much time on their hands
<whitequark> that's why C++11 defines nullptr type
<wpwrak> (too much time) why ? it's a legitimate concern
ChanServ has quit [*.net *.split]
ChanServ has joined #qi-hardware
<lekernel> why would a hardware or OS developer need a non-zero NULL pointer?
<lekernel> I also have a feeling that a lot of software we use today would break if compiled for a platform where NULL != 0 :)
<whitequark> lekernel: in fact llvm assumes it's 0, which basically means that all software, if compiled with clang
<whitequark> not sure about gcc.
<whitequark> afaik yes, optimizer likes this fact
<wpwrak> lekernel: your application wouldn't normally see that NULL is internally not all zero bits. similar to 0.0 not necessarily being all zero.
<viric> lekernel: '0', evaluated as a pointer, may not have an integer representation of all bits zero
<viric> so '(int) ((void *) 0)' may be different than '(int) 0'. :)
<viric> NULL simply is translated as '((void *) 0)'
<viric> A good compiler, where a null pointer is 0xffff, will not have "#define NULL 0xffff"
<wpwrak> viric: are you sure about the cast ? for consistency, it may still yield 0.
<viric> It will have "#define NULL ((void *) 0)"
<wpwrak> (i'm too lazy to look up what the standard has to say about it, though :)
<viric> 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.
<wpwrak> where you would notice are things like memset or unions used for type conversion
<viric> but then, how to write the memory address zero? I don't know. :)
<wpwrak> yes, (type *) 0 is always a "null pointer"
<wpwrak> easy: C doesn't define hardware addresses :)
<viric> yes, that sounds right.
<wpwrak> so you'd use some architecture-specific hack
<viric> yes
<wpwrak> #define NUL is asking for trouble ;-)
<wpwrak> of course, so are people who speak of a "NULL (sic) character"
<viric> yes
<viric> You can define NIL too
<viric> or NIHIL
<viric> :)
<viric> or all of them
<viric> #define ZERO that also rocks
<viric> if (NULL == ZERO) {... }
<wpwrak> NIL may upset LISP programmers :)
<wpwrak> argh ;-)
<viric> so, who needs macros? noone
<wpwrak> actually, wolfgang, a CLEAR(x) macro for memset(&(x), 0, sizeof(x)) may be handy in your fpgatools examples
<wpwrak> naw, macros are cool
unclouded has joined #qi-hardware
<wolfspraul> nice idea - done
<wolfspraul> thanks!
LunaVorax has joined #qi-hardware
rz2k has joined #qi-hardware
* 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, ...
Jurting has joined #qi-hardware
GNUtoo-desktop has joined #qi-hardware
kuribas has joined #qi-hardware
wej_ has quit [Ping timeout: 264 seconds]
GNUtoo-desktop has quit [Quit: [INFO] fsogsmd : received signal -11, exiting.]
wej has joined #qi-hardware
Jurting has quit [Ping timeout: 252 seconds]
<wpwrak> hehe, XC6SLX9-CSG324 (in kicad-libs/components/xc6slx9-csg324.lib) ... how that's a HUGE beast ;-)
ChanServ has quit [*.net *.split]
ChanServ has joined #qi-hardware
<qi-bot> [commit] Werner Almesberger: components/HIERARCHY: add XC6SLX9-CSG324 (master) http://qi-hw.com/p/kicad-libs/e10d1e9
<qi-bot> [commit] Werner Almesberger: components/lpc1100-qfn33.lib: NXP LPC11xx series in HVQFN33 package (master) http://qi-hw.com/p/kicad-libs/ecba9a3
<whitequark> wpwrak: to avoid collisions in global namespace?
<wpwrak> whitequark: hmm, with names like "R" or "AD1". the "R" even collides internally.
<wpwrak> (i.e., there are several non-equivalent pins where one of the names is "R")
<wpwrak> (one of the names) as in R/PIO1_2/AD3/CT32B1_MAT1 or R/PIO0_11/AD0/CT32B0_MAT3
<wpwrak> 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.
<wpwrak> 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.
<whitequark> ugh. yes.
kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<qi-bot> [commit] Werner Almesberger: components/lpc1100-qfn33.lib: remove dubious "R" (reserved) pin function (master) http://qi-hw.com/p/kicad-libs/1f0d15c
<wpwrak> restored at least a bit of sanity :)
LunaVorax has quit [Read error: No route to host]
LunaVorax has joined #qi-hardware
jekhor has quit [Ping timeout: 252 seconds]