<sb0>
rjo: and how do you initialize the ADC/DAC? do you rely on other parts of the redpitaya software stack?
<mtrbot-ml>
[mattermost] <sb10q> @cjbe your stabilizer commit messed up permissions
sb0 has quit [Quit: Leaving]
sb0 has joined #m-labs
mauz555 has joined #m-labs
rohitksingh has quit [Ping timeout: 245 seconds]
Dar1us has joined #m-labs
<Dar1us>
hi everyone
<Dar1us>
I am trying Migen with a Spartan 3 board I have lying around (working through https://github.com/litex-hub/fpga_101/). I adjusted the IOs to match my board and changed the device. It builds but after programming it nothing happens
<Dar1us>
oh I ran bitgen by hand to specify -g StartUpClk:JTagClk otherwise djtgcfg complains
<Dar1us>
I have their seven_seg.v demo project working
sb0 has quit [Quit: Leaving]
mauz555 has joined #m-labs
sb0 has joined #m-labs
mauz555 has quit [Ping timeout: 276 seconds]
mauz555 has joined #m-labs
mauz555 has quit [Ping timeout: 246 seconds]
<rjo>
sb0: just cat it into that special device in /dev forgot the name
<rjo>
sb0: iirc the fast adc and dacs don't need initialization. the slow ones are a delta-sigma and the XADC.
<sb0>
okay, I'm only interested in the fast ADC
<sb0>
nice
<sb0>
so, I guess we can strip the existing software quite easily and just use migen-axi + the zc706 rust code
<Dar1us>
"zc706 rust code"?
<Dar1us>
(if you don't mind my curiosity!)
<sb0>
Dar1us: smoltcp and bare metal rust on zynq
<Dar1us>
wow, very cool :)
<Dar1us>
I haven't got much past blinky LED with rust on STM32
<sb0>
I want to use a red pitaya to retrofit a michelson laser wavemeter from 1983 and add fourier transform capabilities
<sb0>
the whole thing would cost <$1k instead of ~30k from thorlabs, with similar capabilities
<sb0>
FT can show many things about diode laser modes, and unlike SFPIs don't involve unobtainium wavelength-limited mirrors with finicky alignment and FSR issues
<Dar1us>
sb0: sounds like a pretty cool hack if you can get it working
<sb0>
the wavemeter has a diagnostics connector with the outputs from the photodiode amps, so that'll be easy to connect
<rjo>
sb0: lots of tooling for rust on US+
<sb0>
and it's already working with the original fringe counting and PLL electronics, which surprisingly survived, and outputs nice sine waves on the diags connector
<sb0>
rjo: thanks
mauz555 has joined #m-labs
mauz555 has quit [Read error: Connection reset by peer]
mauz555 has joined #m-labs
proteusguy has joined #m-labs
Dar1us has quit [Ping timeout: 264 seconds]
Dar1us has joined #m-labs
Dar1us has quit [Ping timeout: 265 seconds]
Dar1us has joined #m-labs
harryho has quit [Remote host closed the connection]
<ZirconiumX>
I have a question about intermediate result precision; if you take "(x * y) >> 4", where x and y are 16-bit values, what precision is the `(x * y)` performed at?
<ZirconiumX>
Verilog I think would do it at 16-bit precision and then end up truncating the result
<whitequark>
ZirconiumX: at full precision
<whitequark>
i.e. `x * y` is wide enough to represent any multiplication result
<ZirconiumX>
So, 32-bit precision, then?
<whitequark>
yeahyeah
<whitequark>
*yeah
<ZirconiumX>
Thank you
<ZirconiumX>
Back to getting confused with fixed-point math, then
sb0 has quit [Quit: Leaving]
mauz555 has quit [Remote host closed the connection]
mauz555 has joined #m-labs
<mtrbot-ml>
[mattermost] <hartytp> @astro what’s the best way of controlling pwm in your code?
<ZirconiumX>
wq: Would you recommend control registers be written using a Record, or with a bunch of Signals?
<whitequark>
what sort of control registers?
<ZirconiumX>
Data inputs come in as register writes for this
<ZirconiumX>
Things like input coordinates
<ZirconiumX>
Interrupt status
<whitequark>
if it's a bunch of signals that are inherently ordered and are sometimes written or read together, use a Record
<whitequark>
a Record is basically the same as Cat(f1, f2, f3)
<ZirconiumX>
Right, thank you
cedric has quit [Ping timeout: 246 seconds]
cedric has joined #m-labs
cedric has joined #m-labs
cedric has quit [Changing host]
<ZirconiumX>
Another nMigen thing: how do you share something between nMigen modules? For example, a framebuffer that the pixel pipeline needs to read/write from, and the video circuitry needs to read
<ZirconiumX>
Maybe take it as a parameter in __init__, store it in self and then use it in elaborate?
<mtrbot-ml>
[mattermost] <hartytp> @astro reading over the code and getting up to speed
<mtrbot-ml>
[mattermost] <hartytp> (CH_EN is bit 15)
<emily>
I also wonder about large-scale organization questions like ZirconiumX's; in Clash the types tell you how everything plugs together, but in nmigen I'm not sure what you're meant to do.
<_whitenotifier>
[nmigen] dlharmon commented on issue #200: nextpnr does not propagate clock constraints across input buffer - https://git.io/JeY45
<_whitenotifier>
[nmigen] dlharmon closed issue #200: nextpnr does not propagate clock constraints across input buffer - https://git.io/Jeqwc
<whitequark>
emily: it's pretty much all by convention
<whitequark>
and oMigen's conventions weren't all that consistent. I'm working on making them more consistent as I go, but a lot of it is certainly subjective
rohitksingh has joined #m-labs
rohitksingh has quit [Ping timeout: 245 seconds]
rohitksingh has joined #m-labs
lkcl has quit [Read error: Connection reset by peer]
lkcl has joined #m-labs
emily has quit [Excess Flood]
emily has joined #m-labs
<mtrbot-ml>
[mattermost] <astro> @hartytp bit 15 of 16-bits = byte 0 bit 7 of byte 0 of 2-bytes
<mtrbot-ml>
[mattermost] <astro> @hartytp I still have to move PWM setup out of board initialization to make it remote-controllable.
<mtrbot-ml>
[mattermost] <astro> @hartytp the pid.rs is still unmodified from ionpak
<mtrbot-ml>
[mattermost] <hartytp> Ack
<mtrbot-ml>
[mattermost] <hartytp> Thanks!
jfng has quit [Remote host closed the connection]
marble[m] has quit [Read error: Connection reset by peer]
xobs has quit [Read error: Connection reset by peer]
jryans has quit [Read error: Connection reset by peer]
jayaura has quit [Write error: Connection reset by peer]
rjo[m] has quit [Remote host closed the connection]
jayaura has joined #m-labs
<mtrbot-ml>
[mattermost] <astro> @sb10q the allocator is needed for the owned_box lang_item, needed for the "logos" parser crate. the compiler started complaining when I had already written some of the parser code and I'd love to sink more time into this... but a usable prototype has higher priority for now.