sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
fengling has joined #m-labs
fengling has quit [Quit: WeeChat 1.1.1]
<mindrunner> sorry to bother u again with that, but it is kind of weird... I an now using a secondary serial port (not through the FTDI), which behaves totally the same. i set the baud to 3M, the software part on the board is constantly sending a string with a newline at its end. on the other side, i am reading with pyserial and just printing the received string to stdout. after starting the python script, the first approx 400kb are fine, afterwards I am
<mindrunner> getting random errors. restarting the python script gives me another 400kb of good data then bad, this is reproducable. It kind of feels more like a fault on my conputer's side than on the fpga side. is anybody keen to reproduce that? i could provide code if you want.
<mindrunner> it seems like, i can read more good data, before the errors occur when the difference between baud-rate and real io-speed is lower.
<mindrunner> about 1M baud looks currently good. but I think if I read somehow delayed, it might corrupt as well then.
<mindrunner> is it expected behaviour that i am losing bytes if there is no flow control/fifo whatever? so what is the serial port good for then? is there anybody out there using it for a reliable data transfer?
<mindrunner> i think i can answer some of my questions by myself. if i do not read fast enough, there are buffer overflows and i am losing data, correct? my java application is using a seperated thread for getting the data out of the serial interface and another one for processing, which seems way more reliable.
<mindrunner> but there is nothing which can guarantee me that i am really reading all bytes, right?
mumptai has joined #m-labs
mithro has quit [Ping timeout: 252 seconds]
mithro has joined #m-labs
cfelton_ has joined #m-labs
[florian1 has joined #m-labs
cfelton has quit [*.net *.split]
[florian] has quit [*.net *.split]
cfelton_ is now known as cfelton
<sb0> mindrunner, you can implement flow control inside your protocol.
<mindrunner> xonxoff?
<sb0> for example. or even something in-band (e.g. wait for acks for the commands/data you send).
<mindrunner> i am already doing this. still everything above 1Mbaud is totally unstable. also there is another performance issue. if i just download data from fpga to pc, i am at about 100kb/s. if i send data in between as well, the total speed drops to about half.
<mindrunner> my curent protocol sends a command to read out a page form nand, then receives 2112kilobyte of data (plus encoding overhead). as long as i stay with 1MBaud, it seems to be fine, but only reads with 50kb/s.
<mindrunner> if i send two commands before reading the page, it drops to 25kb/s
<sb0> that's with the cpu, right?
<mindrunner> lm32 core and default uart
<mindrunner> no FTDI serial connection
<sb0> consider how many interrupts per second 100kb/s is (according to what I said and repeated before), how many cycles the interrupt service routine takes, and what the CPU frequency is
<mindrunner> yep
<mindrunner> looks like i need to burn an i7 into this fpga 8)
<sb0> no, you just need a more efficient uart data transfer mechanism than 1 IRQ + CSR read per byte
<sb0> again, this uart was optimized for minimal fpga resource usage, not for performance
<mindrunner> understand
<sb0> or just remove the CPU altogether as Florent suggested
<mindrunner> but no cpu means, no software, means imlement everything in hw
<sb0> you can maybe offload a lot of the handling to the PC
<sb0> make the fpga design as dumb as possible, but fast
<sb0> if you write a polling UART driver, what throughput can you expect?
<mindrunner> sort of having only the serial communication and a driver for the io pins in the fpga
<sb0> keeping the CPU?
<sb0> but not using the IRQs
<mindrunner> i dont know
<sb0> well, figure that out. that will help you.
<sb0> write the rough algorithm and estimate how many cpu cycles it'll take per byte
<mindrunner> ill try, tanks :)
<mindrunner> *h
<mindrunner> so I need to replace UART() class for this, dont I?
<sb0> no, keep the same uart, change the software
<sb0> but before you do that, estimate the throughput you can expect and decide if that's good enough for you or if you need a bigger boat
<mindrunner> hmm, sounds like a long weekend :/
<sb0> if you don't do that you'll keep making crappy designs and not understand why
<mindrunner> coming from a pure software background makes this soo hard to understand
<sb0> what kind of software were you writing that never required you to estimate how much time certain instructions were taking?
<mindrunner> that is not what i mean. i feel really lost in all this. reading the misoc/migen code is hard. (almost) no comments, (almost) no documentation. for someone who is not very experienced in hardware designs, this is really difficult
<sb0> well the uart data read process is: read CSR to determine if data is available, if it is, then read the data from another CSR and write to CSR to acknowledge the data reception and clear the data available flag
<sb0> "data" is just one byte here
<mindrunner> ok
<mindrunner> thats whats happening in uart_isr(), isnt it?
<larsc> .~.
<whitequark> ft/hr
<whitequark> not /h
<whitequark> /h is... not sure what it is
<whitequark> planck constant
<sb0> ah, how did I miss thart
<sb0> *that
<sb0> yup, works :)
<whitequark> super useful
<whitequark> knows pretty much every constant and unit i needed so far
<cr1901_modern> sb0: The patch to fix ISE parsing for older chips is literally one line change. Do you still want me to send it and effectively decrease the SNR of the mailing list?
<sb0> you can send it to my email... sb @ the same domain without "lists."
<sb0> does that still work with s6 and k7?
<sb0> or do we have to remove the option when compiling for those newer chips? have you tested that?
<cr1901_modern> I'll test... it should have no effect on s6 and k7
<cr1901_modern> no errors on s6. Cannot test k7, as I do not have vivado
<sb0> xst/ise supports k7 as well
<sb0> and xst itself doesn't check the license, though maybe you don't have the devices installed.
<cr1901_modern> ERROR:Xst:1817 - Invalid target device 'xc7k325t'. It appears I do not.
<cr1901_modern> I completely forgot I could override the toolchain :P
<sb0> well, it should be fine if it works for s6 I guess
<cr1901_modern> As I understand it, 1. I shouldn't be using a Spartan-3, but hindsight is 20/20. 2. Since Spartan-3 is old, my theory is that Xilinx included an old parser for backwards compatibility.
<cr1901_modern> And they use the new parser by default for anything not s3
<cr1901_modern> My ISP is eating the emails I try to send using git send-email (I'm sending them to myself to test first). Debugging that now, then I'll send you the patch
<cr1901_modern> Makes me glad they withdrew their bid to take over another company
<whitequark> xilinx seems to just fork the entire toolchain every time they move to another chip series
<whitequark> bizarre. but i guess more tolerable of shitty engineering
<cr1901_modern> I also remember reading a convincing article that they also seem to be moving away completely in supporting hobbyists. Webpack's discontinuation isn't encouraging
<cr1901_modern> sb: Sent the patch.
<whitequark> hobbyists are not people you want to manufacture silicon for
<cr1901_modern> No kidding. No money :P.
<cr1901_modern> Hobbyists have to adapt to the changing market. And some of the stuff hobbyists do with current technology meant for customers ordering millions of chips astounds me.
<cr1901_modern> Like this person. I'll never be able to do BGA. I don't have the steady hand for it: http://www.reddit.com/r/electronics/comments/3184up/inspired_by_henriks_embedded_linux_system_i_made/
<whitequark> meh, BGA is not complex
<whitequark> just annoying because pbfree
<cr1901_modern> Do you have a station for it?
<whitequark> sure
<cr1901_modern> I can't afford one at the moment, but... I really should at least try BGA after I can afford one. In spite of my previous surface mount failures lmao
aeris has quit [Ping timeout: 245 seconds]
<sb0> cr1901_modern, how are they moving away completely from hobbyists?
<sb0> they even published an article about milkymist in their xcell journal, back in the days. even hackaday didn't do that.
<cr1901_modern> Xilinx? I don't remember the details of the article, other than it concerned me more than I already am- I'll see if I can find it. My immediate concern is they get rid of Webpack (free version), I won't be able to use their FPGAs. I can't afford a license for Xilinx's software!
<cr1901_modern> Webpack is already no longer updated- that's the prerequisite to phasing it out.
<cr1901_modern> I'm surprised hackaday didn't publish an article about milkymist. If Xilinx published an article, perhaps my concern is unfounded/there will be alternatives.
<whitequark> they stopped updating ISE, not WebPack (WebPack is not a product)
<whitequark> Vivado WebPack exists
<mumptai> nah, dropping free tool chains would be very unwise
<mumptai> students, many freelancers and opensource people would simeply walk away and never look back
imrehg has joined #m-labs
<GitHub58> [migen] sbourdeauducq pushed 1 new commit to master: http://git.io/vf6iM
<GitHub58> migen/master 472665b William D. Jones: Add a command line option (-use_new_parser yes) to Xilinx XST to force use of the newer parser for older FPGAs.
<GitHub108> [artiq] sbourdeauducq pushed 1 new commit to master: http://git.io/vf6HK
<GitHub108> artiq/master 110f7bc Sebastien Bourdeauducq: runtime: saner lwipopts
imrehg has quit [Remote host closed the connection]
travis-ci has joined #m-labs
<travis-ci> m-labs/artiq#143 (master - 110f7bc : Sebastien Bourdeauducq): The build passed.
travis-ci has left #m-labs [#m-labs]
stekern_ has joined #m-labs
ohama has quit [Disconnected by services]
antgreen` has joined #m-labs
hozer1 has joined #m-labs
ohama has joined #m-labs
nengel_ has joined #m-labs
jaeckel has quit [Ping timeout: 246 seconds]
Gurty has quit [Ping timeout: 246 seconds]
Gurty has joined #m-labs
early` has joined #m-labs
jaeckel has joined #m-labs
cfelton has quit [*.net *.split]
antgreen has quit [*.net *.split]
stekern has quit [*.net *.split]
nengel has quit [*.net *.split]
hozer has quit [*.net *.split]
early has quit [*.net *.split]
Gurty has quit [Ping timeout: 246 seconds]
aeris has joined #m-labs
Gurty has joined #m-labs
Gurty has joined #m-labs
Gurty has quit [Excess Flood]
Gurty has joined #m-labs
<cr1901_modern> whitequark: Huh, so Vivado does have a free version... I did not know that. Well then... I retract my statements/I didn't do my research.
<cr1901_modern> mumptai: That's also true. I know one company that made a cool product- CircuitLab- that retracted its free version and ppl (including myself) won't use the product at all.
cfelton has joined #m-labs
<mumptai> especially if the toolchain & ecosystem is more important than the specific FPGA type
<cr1901_modern> I remember reading recently that Lattice's FPGA bitstream was decoded, so a true open source toolchain from source code to programming the FPGA is on the horizon.
<whitequark> ahah no
<whitequark> PAR is... complex
<whitequark> massively
<whitequark> if you want it to make use of resources that is even slightly efficient
<larsc> just need a good multi variable solver ;)
<cr1901_modern> Wouldn't PAR be "max (min)imize" an objective function such as the number of "slices (assuming one slice consists of multiple 4LUTs and flip-flops)"?
<cr1901_modern> And knowing internally what the FPGA looks like XD
<cr1901_modern> number of slices used*
<whitequark> well, chemistry is basically just placing atoms together
<whitequark> simple, right
<larsc> physics is just applied mathematics
<larsc> the thing is, it is so hard that a lot of par tools don't even use it
<larsc> but rather just go for try and error
<larsc> 'simulated annealing'
<whitequark> annealing?
<whitequark> that's a strange way to name that
<larsc> that's the term for the method used
<whitequark> oh, so it *is* directly related to metallurgy
<whitequark> reminds me of that thing where ideal gas law was applied to roundworms
<cr1901_modern> Devil's in the details, right? Always in the details.
<larsc> there are opensource par tools, iirc, not necessarily perfect sure
<larsc> but that doesn't mean useless
<larsc> just means you won't be able to use as much resources
<cr1901_modern> I seem to recall that genetic algorithm has been used before for FPGAs, but it creates... weird layouts.
<larsc> or get lower clock speeds
_whitelogger has joined #m-labs
_whitelogger has joined #m-labs
whitequark has joined #m-labs
<cr1901_modern> Anyone who can answer: I'm guessing "yes", but: am I setting myself for failure if I buy a cheap(er) Xilinix JTAG cable knockoff on Ebay?
<felix_> the 35 euro adapter i used maybe two years ago did work with the xilinx software