<kristianpaul>
are you aware of MMIO fuctions in rtems milkymist port?
<kristianpaul>
i wonder if it posible call those from ie flickernoise, and void the implementation of a driver..
<kristianpaul>
the core i'm working on works similary as usb/minimac, i mean in fact is just a 4k memory to be read, no more
<kristianpaul>
control and other register to watch are implemented using the CSR bus
<kristianpaul>
so what you think is the recomended way for reading this "buffer"?..
<kristianpaul>
i sie i had similar implementation, and i just did mmap, but thats not posigle and nor nencesary in non mmu
<kristianpaul>
or i just do as Yan pointed me, and treat this address as a register..
<xiangfu>
kristianpaul: hmm.. sorry. I have no idea on read 'buffer' without writing a driver
<xiangfu>
kristianpaul: I don't understand how you read 4k memory with 'register'?
<kristianpaul>
i guess i can treat it as a pointer
<kristianpaul>
but i'm not sure either, so i wanted a second opnion :p
<kristianpaul>
anyway i'll try out..
<kristianpaul>
xiangfu: okay, but do you know how implement what i pointed writting a driver?
<kristianpaul>
that will be like having a memory maped file?..
<kristianpaul>
wich dint sound bad, just a bit confusing  for me ...
<xiangfu>
kristianpaul: there are stream data from that 'core', right?
<kristianpaul>
data is originanally in a serialized way
<kristianpaul>
i shiift it and make a 4Bytes int, wich goes to a circular buffer
<kristianpaul>
the buffer have a counter, i will read that using CSR
<kristianpaul>
so the buffer is just a circular/ring one
<kristianpaul>
i just need to read in buckets of 4k
<kristianpaul>
then able "bucket" to fill again and so on..
<kristianpaul>
well i could make things simplers and just read the shifted register.. (4bytes) that will be polling actually
<kristianpaul>
but i prefer at least have a buffer, and not DMA at the moement...
<kristianpaul>
so yes the idea is to "dump" the 4k buffer up to fill a SD memory or a file on flash, whatever--
<kristianpaul>
later for go fancy maybe try OSC :D
<xiangfu>
kristianpaul: if write a driver. the '4k buffer' is inside the driver. then you can read that device by using 'dd'
<kristianpaul>
dd?
<kristianpaul>
ah
<xiangfu>
kristianpaul: I am try to search how to implement the circle buffer.  the data will not stop coming, right?
<xiangfu>
like /dev/video?
<kristianpaul>
yeah exactly
<kristianpaul>
but you dont need implement circular buffer, i already implementd in hw
<kristianpaul>
hmm, maybe i can take a similar aprouch like in video... wich basically uses a ADC as well..
<kristianpaul>
last time i checked video did DMA isnt?..
<kristianpaul>
s/did/do
<xiangfu>
don't know that. now it's using ADC
<xiangfu>
then if the 4k buffer is full, you can generate a interrupt, just like the /dev/video driver.
<kristianpaul>
yeah thats easy
<aw>
has anyone let AIN5(blue RCA) and AIN4(red RCA) video loop accessed PAL format in successfully?
<lekernel>
aw: i'm not sure it can be done... does the adv7181 datasheet say it's possible?
<aw>
i think they can be switched by internal MUX in decoder, second...
<aw>
Since if this can be done, then rc3 the test program can include this function then I can test AIN5 & AIN6. :-)
<aw>
lekernel, use SETADC_sw_man_en, Manual Input Muxing Enable,
<aw>
Address C4[7] ??? is it possible?
<aw>
lekernel, p14 for Table 8 and figure 6, should be okay. :-)
<lekernel>
aw: maybe xiangfu can try this?
<aw>
lekernel, okay. I'll provide him the bit mapping to see if works. :-)
<guyzmo>
ola
<guyzmo>
the workshop went correctly
<lekernel>
'correctly'... well, at least is wasn't a complete failure :-)
<lekernel>
fun? interested people? things to learn?
<guyzmo>
well, the LUA workshop began "originally", with the guy that implemented it on Awesome explaining that language sucks
<guyzmo>
and why it sucks
<guyzmo>
before even explaining its features
<lekernel>
ok... quite a way to start a workshop :-)
<lekernel>
why does it suck btw? from my (limited) experience with it, it didn't look so bad
<lekernel>
are there slides/recordings somewhere?
<guyzmo>
nope, there was no slides
<guyzmo>
and nobody recorded
<guyzmo>
well, mainly because it provides a too big abstraction on its bindings... for example to write one byte in the dmxout file I had to do a f:write(string.char(255))
<guyzmo>
to have the correct data type...
<guyzmo>
it provides almost no correct stdlib
<guyzmo>
it works mainly on the builtin types and it seems not really extensible, and it provides a base structure to do everything that is a mix of an array and a dictionary
<guyzmo>
which is the foundation of any object representation if you want one
<guyzmo>
but at least that language is strongly and dynamically typed
<guyzmo>
but there are a few things I really disliked
<guyzmo>
when you access a non existent value in an array, it returns 'nil' instead of failing loudly
<guyzmo>
the environment is embedded in a global array called __G_ (or something close to that), so when you access a non existent variable, it does not fail, it returns nil
<guyzmo>
if you do not declare your variable as local, it will be global (even inside a block)
<guyzmo>
and there is no threading support in lua, instead they implemented coroutines : http://www.lua.org/pil/9.html
<guyzmo>
which basically is thread scheduling DIY and GTFO
<guyzmo>
so, my opinion is that when you need a language that is light but poorly featured, for an environment where you'll anyway have to create bindings for almost everything and for what you won't rely on multithreading, lua is for you otherwise find something else
<guyzmo>
so, once we've got at the end of the subject, I opened a lua shell on the milkymist, showed a few functions I wrote for DMX controlling, explained what it does and ask for ideas
<guyzmo>
so I've called random on every channel of the projector in a for loop, with a 1 second delay between each iteration
<guyzmo>
ah, another thing that sucks about lua : that language has a very closed development model, it is led by a team in an university that only plublishes a tarball from time to time and rarelly accepts patches from the community. So we end up having numerous forks of lua...
<CIA-48>
mtk: Sebastien Bourdeauducq master * r247f11f / lib/edit.c : Edit: fix mouse selection bug with line numbers - http://bit.ly/jpsYTB
<CIA-48>
milkymist: Sebastien Bourdeauducq master * r3c1d14a / software/bios/main.c : BIOS: enable video output on user triggered netboot - http://bit.ly/iwCXZe
<lekernel>
rtems should be ready for upstream merge
<lekernel>
no more major changes imo
<lekernel>
maybe still sort out that printf vs. printk thing
<kristianpaul>
hum.. what is better got a boot splash screen then wait some seconds for flickernoise, or just power on and wait like ~30 seonds for flickernoise !! hell what happended...